-
Notifications
You must be signed in to change notification settings - Fork 68
Porting an existing Visual Pinball PinMAME game
Game logic for many Visual Pinball tables is done using VBScript. A table contains a main script that references other scripts that are included with a Visual Pinball installation. The scripts all work together and connect the playfield to a game controller such as Visual PinMAME.
Out of the box, Visual Pinball Engine can do a lot without any scripting at all!
This guide will show how to port an existing VPX Terminator 2: Judgement Day table to Visual Pinball Engine.
For most of the setup, we can refer to this page.
Make sure you are using Unity 2020.3.10f or greater.
Install the following packages:
-
VisualPinball.Engine
(0.0.1-preview.46 or greater) -
VisualPinball.Engine.PinMAME
(0.0.1-preview.42 or greater) -
VisualPinball.Unity.Hdrp
(0.0.1-preview.58 or greater)
Setup the VPE scoped registry:
Clone the repositories:
git clone https://github.com/freezy/VisualPinball.Engine
git clone https://github.com/VisualPinball/VisualPinball.Unity.Hdrp
git clone https://github.com/VisualPinball/VisualPinball.Engine.PinMAME
Build the PinMAME Unity Plugins:
The PinMAME libraries are large and change often, so they are not stored in the git repo. We only need to do this once.
cd VisualPinball.Engine.PinMAME
git checkout feature/audio
cd VisualPinball.Engine.PinMAME
dotnet build -c Release
Verify the plugins have been created by looking in the Plugins/<RID>
folder:
You will need to find an existing VPX Terminator 2: Judgement Day table. (Not sharing where to find one)
Create a new Basic Indoors (HDRP)
Scene and save the scene as T2VPE
Select the Main Camera
, and set Post Anti-aliasing
to SMAA
Select the Plane
, and change the Transform Y Position
to -0.1
Import the VPX Terminator 2: Judgement Day table:
You will need to find an existing Terminator 2 L8
ROM. (Not sharing where to find one)
- If you are on Windows, make sure you have a working install of VPinMAME. Place the ROM in the VPinMAME's roms folder:
- If you are on MacOS or Linux, make a
.pinmame/roms
folder in your home directory and place the ROM here:
The service manual is vital to find the connections between the table and PinMAME. Manuals are available at IPDB
Reviewing the table script is also important to understand how the table is set up.
- If you are on Windows and have Visual Pinball installed, you can view the script using the
View
->Script
menu command.
- If you are on MacOS or Linux, you can use the
vptscript
command line tool to extract the script. Once extracted, you can usedos2unix
to remove the carriage returns^M
:
brew install node libvips dos2unix
npm install --global vpx-js
vptscript "Terminator 2 - Judgment Day(Williams 1991).vpx" --save
dos2unix "Terminator 2 - Judgment Day(Williams 1991).vbs"