Project Omega¶
Town Hall Pinball Studios is working on a customized pinball machine. The overall plan is to:
- Use an existing pinball machine, “No Fear”
- Completely rebrand it with a new play-field, backglass, and cabinet artwork
- Design a new theme
- Design a new ruleset
- Design and/or use new animations, sound effects, and music
We are using the P-ROC to interface with the pinball machine and our own software to implement the game.
Since the name of the game has not yet been decided, this repository will be called “project-omega” for now. It will be renamed in the future.
Feel free to clone the repository and see development in action. This code can be run without an actual pinball machine. Anything and everything can be broken at anytime.
User’s Guide¶
Getting Started¶
You do not need a pinball machine to explore the software. Follow the steps below to create a virtual machine for development.
Running¶
Setup a development environment as follows:
Open a terminal (open Cygwin in Windows) and clone the repository:
mkdir town-hall-pinball
cd town-hall-pinball
git clone https://github.com/town-hall-pinball/project-omega.git
Initialize the virtual machine with:
cd project-omega
vagrant up
Wait for the command to complete, and run the software as follows:
vagrant ssh
pingame -d -s
A dot-matrix display should appear. Use Control-C to exit.
Extras¶
Now install the extras pack for additional fun:
cd /vagrant/resources
curl -O http://blackchip.org/town-hall-pinball/extra.tar.gz
tar xf extra.tar.gz
rm extra.tar.gz
Next¶
Tour¶
Start the software with:
pingame -d -s
When the dot-matrix display appears, use the mouse to click on it to obtain focus. Attract mode starts after the “Project Omega” banner.
Use the flipper buttons [
and ]
to cycle through the attract mode
panels.
Press 1
(one) to insert a coin.
Press 7
to enter service mode. In service mode, use the following keys:
7
: Enter8
: Next9
: Previous0
: Exit
Using the service buttons, go to Utilities -> Server -> Enable Server and change the value to Yes. Open your web browser to view the web console:
Press the Exit button and, go to Browsers -> Music. The Next and Previous buttons will change the current song. Use Enter to restart the song.
Visit the other browsers for Sounds, Fonts, Images, and Movies. When
in the font browser, use the flippers [
and ]
to rotate the text.
Explore other areas of the service mode. Once done, keep hititng Exit until you are back at the attract mode.
In the web console, the lamp matrix should be flashing to indicate a light show is running in attract mode.
In the web console, click on the magnifying glass icon to execute a ball search.
Click on the dotm-matrix display and A=activate an easter egg with the
following flipper sequence using [
for the left flipper, ]
for the
right flipper, and l
(elle) to hit the ball
launch button:
- left
- left
- left
- right
- right
- right
- ball launch
Make a selection, and use s
for the start button.
Keyboard Bindings¶
Key | Action |
---|---|
, | Slingshot, Left |
. | Slingshot, Right |
0 | Service, Exit |
1 | Coin, Left |
7 | Service, Enter |
8 | Service, Down |
9 | Service, Up |
[ | Flipper, Left |
] | Flipper, Right |
d | Trough, 4 |
l | Ball Launch Button |
s | Saucer |
control-s | Buy Extra Ball Button |
shift-s | Start Button |
Machine Reference¶
Coils by Device¶
Device | Name | Number | Tags | Notes |
---|---|---|---|---|
C01 | popper | 40 | ||
C02 | auto_plunger | 41 | ||
C03 | magnet_right | 42 | ||
C04 | kickback | 43 | ||
C05 | magnet_center | 44 | ||
C06 | magnet_left | 45 | ||
C07 | knocker | 46 | ||
C08 | drop_target_down | 47 | ||
C10 | slingshot_right | 49 | ||
C11 | slingshot_left | 50 | ||
C12 | drop_target_up | 51 | ||
C14 | trough | 53 | ||
C15 | saucer | 54 | ||
C16 | toy | 55 |
Coils by Name¶
Device | Name | Number | Tags | Notes |
---|---|---|---|---|
C02 | auto_plunger | 41 | ||
C08 | drop_target_down | 47 | ||
C12 | drop_target_up | 51 | ||
C04 | kickback | 43 | ||
C07 | knocker | 46 | ||
C05 | magnet_center | 44 | ||
C06 | magnet_left | 45 | ||
C03 | magnet_right | 42 | ||
C01 | popper | 40 | ||
C15 | saucer | 54 | ||
C11 | slingshot_left | 50 | ||
C10 | slingshot_right | 49 | ||
C16 | toy | 55 | ||
C14 | trough | 53 |
Flashers by Device¶
Device | Name | Number | Tags | Notes |
---|---|---|---|---|
C17 | flipper_return | 56 | ||
C18 | spinner | 57 | ||
C19 | circle_center | 58 | ||
C20 | ramp_right | 59 | ||
C21 | toy | 60 | ||
C22 | insert_explode | 61 | ||
C23 | ramp_left | 62 | ||
C24 | outside | 63 | ||
C25 | auto_fire | 64 | ||
C26 | insert_top_left | 65 | ||
C27 | insert_top_right | 66 | ||
C28 | popper | 67 |
Flashers by Name¶
Device | Name | Number | Tags | Notes |
---|---|---|---|---|
C25 | auto_fire | 64 | ||
C19 | circle_center | 58 | ||
C17 | flipper_return | 56 | ||
C22 | insert_explode | 61 | ||
C26 | insert_top_left | 65 | ||
C27 | insert_top_right | 66 | ||
C24 | outside | 63 | ||
C28 | popper | 67 | ||
C23 | ramp_left | 62 | ||
C20 | ramp_right | 59 | ||
C18 | spinner | 57 | ||
C21 | toy | 60 |
Lamps by Device¶
Device | Name | Number | Tags | Notes |
---|---|---|---|---|
L11 | circle_6 | 80 | ||
L12 | circle_7 | 81 | ||
L13 | circle_8 | 82 | ||
L14 | circle_9 | 83 | ||
L15 | circle_10 | 84 | ||
L16 | circle_11 | 85 | ||
L17 | playfield_left | 86 | ||
L18 | circle_12 | 87 | ||
L21 | circle_center | 88 | ||
L22 | circle_5 | 89 | ||
L23 | circle_4 | 90 | ||
L24 | circle_3 | 91 | ||
L25 | circle_2 | 92 | ||
L26 | circle_1 | 93 | ||
L27 | playfield_right | 94 | ||
L28 | playfield_center | 95 | ||
L31 | scoop_center_arrow_1 | 96 | ||
L32 | u_turn_right_arrow | 97 | ||
L33 | scoop_center_arrow_2 | 98 | ||
L34 | scoop_center_arrow_3 | 99 | ||
L35 | scoop_center_circle | 100 | ||
L36 | scoop_center_arrow_4 | 101 | ||
L38 | orbit_left_sign | 103 | ||
L41 | u_turn_left_arrow | 104 | ||
L42 | u_turn_left_circle_1 | 105 | ||
L43 | u_turn_left_circle_2 | 106 | ||
L44 | u_turn_left_circle_3 | 107 | ||
L45 | scoop_left_arrow_1 | 108 | ||
L46 | scoop_left_arrow_2 | 109 | ||
L47 | scoop_left_arrow_3 | 110 | ||
L48 | playfield_far_left | 111 | ||
L51 | orbit_left_arrow_2 | 112 | ||
L52 | ramp_left_circle_2 | 113 | ||
L53 | orbit_left_circle_3 | 114 | ||
L54 | ramp_left_circle_3 | 115 | ||
L55 | ramp_left_circle_1 | 116 | ||
L56 | ramp_left_arrow | 117 | ||
L57 | orbit_left_arrow_1 | 118 | ||
L61 | saucer_arrow_1 | 120 | ||
L62 | saucer_arrow_2 | 121 | ||
L63 | ramp_right_circle_1 | 122 | ||
L64 | ramp_right_circle_2 | 123 | ||
L65 | ramp_right_circle_3 | 124 | ||
L66 | inlane_left | 125 | ||
L67 | outlane_left | 126 | ||
L68 | kickback | 127 | ||
L71 | standup_target_top | 128 | ||
L72 | standup_target_bottom | 129 | ||
L73 | inlane_right | 130 | ||
L74 | outlane_right | 131 | ||
L75 | ramp_right_arrow_1 | 132 | ||
L76 | ramp_right_arrow_2 | 133 | ||
L77 | orbit_right_arrow_1 | 134 | ||
L78 | orbit_right_arrow_2 | 135 | ||
L81 | shoot_again | 136 | ||
L82 | toy_left | 137 | Skull, left eye | |
L83 | ramp_left_sign_bottom | 138 | ||
L84 | ramp_left_sign_top | 139 | ||
L85 | toy_right | 140 | Skull, right eye | |
L86 | ball_launch_button | 141 | ||
L87 | buy_extra_ball_button | 142 | ||
L88 | start_button | 143 |
Lamps by Name¶
Device | Name | Number | Tags | Notes |
---|---|---|---|---|
L86 | ball_launch_button | 141 | ||
L87 | buy_extra_ball_button | 142 | ||
L26 | circle_1 | 93 | ||
L15 | circle_10 | 84 | ||
L16 | circle_11 | 85 | ||
L18 | circle_12 | 87 | ||
L25 | circle_2 | 92 | ||
L24 | circle_3 | 91 | ||
L23 | circle_4 | 90 | ||
L22 | circle_5 | 89 | ||
L11 | circle_6 | 80 | ||
L12 | circle_7 | 81 | ||
L13 | circle_8 | 82 | ||
L14 | circle_9 | 83 | ||
L21 | circle_center | 88 | ||
L66 | inlane_left | 125 | ||
L73 | inlane_right | 130 | ||
L68 | kickback | 127 | ||
L57 | orbit_left_arrow_1 | 118 | ||
L51 | orbit_left_arrow_2 | 112 | ||
L53 | orbit_left_circle_3 | 114 | ||
L38 | orbit_left_sign | 103 | ||
L77 | orbit_right_arrow_1 | 134 | ||
L78 | orbit_right_arrow_2 | 135 | ||
L67 | outlane_left | 126 | ||
L74 | outlane_right | 131 | ||
L28 | playfield_center | 95 | ||
L48 | playfield_far_left | 111 | ||
L17 | playfield_left | 86 | ||
L27 | playfield_right | 94 | ||
L56 | ramp_left_arrow | 117 | ||
L55 | ramp_left_circle_1 | 116 | ||
L52 | ramp_left_circle_2 | 113 | ||
L54 | ramp_left_circle_3 | 115 | ||
L83 | ramp_left_sign_bottom | 138 | ||
L84 | ramp_left_sign_top | 139 | ||
L75 | ramp_right_arrow_1 | 132 | ||
L76 | ramp_right_arrow_2 | 133 | ||
L63 | ramp_right_circle_1 | 122 | ||
L64 | ramp_right_circle_2 | 123 | ||
L65 | ramp_right_circle_3 | 124 | ||
L61 | saucer_arrow_1 | 120 | ||
L62 | saucer_arrow_2 | 121 | ||
L31 | scoop_center_arrow_1 | 96 | ||
L33 | scoop_center_arrow_2 | 98 | ||
L34 | scoop_center_arrow_3 | 99 | ||
L36 | scoop_center_arrow_4 | 101 | ||
L35 | scoop_center_circle | 100 | ||
L45 | scoop_left_arrow_1 | 108 | ||
L46 | scoop_left_arrow_2 | 109 | ||
L47 | scoop_left_arrow_3 | 110 | ||
L81 | shoot_again | 136 | ||
L72 | standup_target_bottom | 129 | ||
L71 | standup_target_top | 128 | ||
L88 | start_button | 143 | ||
L82 | toy_left | 137 | Skull, left eye | |
L85 | toy_right | 140 | Skull, right eye | |
L41 | u_turn_left_arrow | 104 | ||
L42 | u_turn_left_circle_1 | 105 | ||
L43 | u_turn_left_circle_2 | 106 | ||
L44 | u_turn_left_circle_3 | 107 | ||
L32 | u_turn_right_arrow | 97 |
Switches by Device¶
Device | Name | Number | Tags | Notes |
---|---|---|---|---|
S11 | ball_launch_button | 32 | user | |
S13 | start_button | 34 | user | |
S14 | tilt | 35 | user | |
S15 | shooter_lane | 36 | ||
S16 | spinner | 37 | live | |
S17 | outlane_right | 38 | live | |
S18 | return_right | 39 | live | |
S21 | tilt_slam | 48 | user | |
S22 | coin_door | 49 | user | |
S23 | buy_extra_ball_button | 50 | user | |
S25 | kickback | 52 | live | |
S26 | return_left | 53 | live | |
S27 | slingshot_left | 54 | live | |
S28 | slingshot_right | 55 | live | |
S31 | trough_jam | 64 | ||
S32 | trough | 65 | ||
S33 | trough_2 | 66 | ||
S34 | trough_3 | 67 | ||
S35 | trough_4 | 68 | ||
S37 | subway_center | 70 | live | |
S38 | subway_left | 71 | live | |
S41 | popper | 80 | live | |
S42 | popper_2 | 81 | live | |
S46 | magnet_left | 85 | live | |
S47 | magnet_center | 86 | live | |
S48 | magnet_right | 87 | live | |
S51 | drop_target | 96 | live | |
S54 | wireform_left | 99 | live | |
S55 | u_turn | 100 | live | |
S56 | standup_target_bottom | 101 | live | |
S57 | startup_target_top | 102 | live | |
S58 | orbit_right | 103 | live | |
S61 | saucer | 112 | live | |
S62 | orbit_left | 113 | live | |
S63 | ramp_left_enter | 114 | live | |
S64 | ramp_left_middle | 115 | live | |
S66 | ramp_right_enter | 117 | live | |
S67 | ramp_right_exit | 118 | live | |
SD1 | coin_left | 8 | user | |
SD2 | coin_center | 9 | user | |
SD3 | coin_right | 10 | user | |
SD4 | coin_fourth | 11 | user | |
SD5 | service_exit | 12 | user | |
SD6 | service_down | 13 | user | |
SD7 | service_up | 14 | user | |
SD8 | service_enter | 15 | user | |
SF2 | flipper_right | 1 | user | |
SF4 | flipper_left | 3 | user | |
SF6 | flipper_right_up | 5 | user |
Switches by Name¶
Device | Name | Number | Tags | Notes |
---|---|---|---|---|
S11 | ball_launch_button | 32 | user | |
S23 | buy_extra_ball_button | 50 | user | |
SD2 | coin_center | 9 | user | |
S22 | coin_door | 49 | user | |
SD4 | coin_fourth | 11 | user | |
SD1 | coin_left | 8 | user | |
SD3 | coin_right | 10 | user | |
S51 | drop_target | 96 | live | |
SF4 | flipper_left | 3 | user | |
SF2 | flipper_right | 1 | user | |
SF6 | flipper_right_up | 5 | user | |
S25 | kickback | 52 | live | |
S47 | magnet_center | 86 | live | |
S46 | magnet_left | 85 | live | |
S48 | magnet_right | 87 | live | |
S62 | orbit_left | 113 | live | |
S58 | orbit_right | 103 | live | |
S17 | outlane_right | 38 | live | |
S41 | popper | 80 | live | |
S42 | popper_2 | 81 | live | |
S63 | ramp_left_enter | 114 | live | |
S64 | ramp_left_middle | 115 | live | |
S66 | ramp_right_enter | 117 | live | |
S67 | ramp_right_exit | 118 | live | |
S26 | return_left | 53 | live | |
S18 | return_right | 39 | live | |
S61 | saucer | 112 | live | |
SD6 | service_down | 13 | user | |
SD8 | service_enter | 15 | user | |
SD5 | service_exit | 12 | user | |
SD7 | service_up | 14 | user | |
S15 | shooter_lane | 36 | ||
S27 | slingshot_left | 54 | live | |
S28 | slingshot_right | 55 | live | |
S16 | spinner | 37 | live | |
S56 | standup_target_bottom | 101 | live | |
S13 | start_button | 34 | user | |
S57 | startup_target_top | 102 | live | |
S37 | subway_center | 70 | live | |
S38 | subway_left | 71 | live | |
S14 | tilt | 35 | user | |
S21 | tilt_slam | 48 | user | |
S32 | trough | 65 | ||
S33 | trough_2 | 66 | ||
S34 | trough_3 | 67 | ||
S35 | trough_4 | 68 | ||
S31 | trough_jam | 64 | ||
S55 | u_turn | 100 | live | |
S54 | wireform_left | 99 | live |
Developer’s Guide¶
Logging¶
Not much is logged by default. To enable additional logging, copy the
debug_sample.py
file in the top-most directory to debug.py
. Uncomment
the loggers to see the following information:
Logger | Description |
---|---|
pin.coil | Firing of coils/solenoids |
pin.command | Command received from a web client |
pin.data | Loading and saving of persistant state |
pin.dmd | Dot-matrix stack, queue, and overlay handling |
pin.event | Global event queue |
pin.gi | General illumination lights |
pin.keyboard | Key down and up events |
pin.handler | Lifecycle events of the game handlers that implement the modes of the game |
pin.lamp | Lamp activitiy. Light shows are not logged as these can be excessive. |
pin.magic | Shows if switch events are accepted, rejected, or trigger by a given magic sequence |
pin.mixer | Music and sounds being played |
pin.resources | Loading of resource assets |
pin.server | Lifecylce events for the web server |
pin.shows | Lifecycle of scripted events to be shown to the user |
pin.sim | Simulator activity as balls move around |
pin.switch | Physical switches |
Documentation and Testing¶
- Documentation: https://readthedocs.org/projects/project-omega
- CI: https://travis-ci.org/town-hall-pinball/project-omega
- Coverage: https://coveralls.io/r/town-hall-pinball/project-omega
Log in to the Vagrant virtual machine and change to the base directory:
cd /vagrant
Adding Resources¶
Place resources in the corresponding directory under resources
.
Create a name mapping to the actual file here:
https://github.com/town-hall-pinball/project-omega/blob/master/pin/game/config/resources.py
To verify, check the resource browsers in service mode found under Utilities -> Browsers