Step 1: Installation and Testing the Install (Windows)
Step 1: Install the environment.
Installing the PyProcGameHD/SkeletonGame environment requires installing a number of packages. The easiest way to get up and running is to use the Windows one-click installer. You can download the Windows All-in-One Installer here (Current as of 11/2020).
This will install P-ROC/P3-ROC Drivers, Python 2.7, SDL2, PySDL2, PyProcGame, PyProcGameHD, SkeletonGame, and so on.
I’m working on one-click installers for other platforms but they are far from done. Manual installation on OSX is described here.
Note: If you have previously run the installer, as of 6/6/2017, the new installer will install Python 2.7.13 and the dependencies required to run on Python 2.7; you should remove c:\Python26\ from your path before running the new installer.
Step 2: Run the sample game.
2a) Unpack the assets
Once the environment is installed you should confirm that everything is working. A sample game is included in:
C:\P-ROC\PyProcGameHD-SkeletonGame-dev\SampleGame –assets for that project are located in a file in that folder called UNZIP ME.zip; if you intend to run the sample you should unzip the folder.
2b) Run the sample game
Open a windows command-prompt (Win-R and type CMD.exe), switch to the folder that contains the game, and run it. To do that, after opening the command prompt, type the following:
cd c:\P-ROC\PyProcGameHD-SkeletonGame-master\SampleGame python T2Game.py
These two lines will change the current working directory (i.e., folder), and then run the python file named T2Game.py in that folder.
If this works, you should see the progress bar pre-load the assets (images, animations and sounds), and then the game should start showing the “attract mode”
2c) Simulate play
To simulate game play: Pressing ‘S’ will simulate pressing the Start Button on the cabinet and should start the game. The game should complain that balls are missing. Hold down the ‘1’ key to simulate closing the leftmost switch in the ball trough while pressing ‘S’ so the game will think all three balls are in the trough when the player is pressing start. – release both ‘S’ and ‘1’ –press the ’d’ key briefly to simulate the ball hitting the shooter lane switch –press keys like ‘7’ ‘8’ ‘9’ to simulate hitting playfield switches –Hold down the ‘1’ key to simulate closing the leftmost switch in the ball trough –the game will think all three balls are in the trough and end the ball–
If this worked, your environment is set and the simulator is working.
Step 2d) Optional: the graphical switch tester:
The graphical switch tester allows you to use an image of your playfield, layout the buttons and lamps on that image, and then test your machine by interacting with a GUI on top of that image.
If you have installed the GUI tool from the installer, a
run_gui_SampleGame.bat file was created in
c:\P-ROC\GUITool. Double-click that to run.
The contents of that file are, essentially:
python switchMatrixClient.py -y t2.yaml -i playfield.jpg -l t2.layout
config/t2.yaml is the path to the machine configuration file *
playfield.jpg is a playfield image shrunk to fit the screen. *
t2.layout is a layout file saved from this tool (a first run will not include this
-l t2.layout argument)