Coming to America Pinball Machine
Created by Ricardo E James II
- Requirements: MPF installed (virtualenv path set in
gmc.cfg), Godot 4.5 with the GMC addon enabled. - Local setup: run
tools/setup_dev_env.shto create.venvand install MPF. - Configure MPF path: edit
gmc.cfg→ setexecutable_pathto your MPFmpf(.exe). - Virtual run: in
gmc.cfg, setspawn_mpf=trueandmpf_args="-x"for the virtual platform. GMC adds the machine path and text-console flag. - Hardware run: set the FAST port in
config/config.yamlunderfast.net.port(e.g.,COM5). - Start from Godot: open the project, run the main scene; GMC will connect to MPF if configured.
- Keyboard (simulated switches):
Enter= start,v= left flipper,z= right flipper.
-
Layout
- MPF configs:
config/*.yaml(hardware, switches, coils, ball_devices, displays, modes list). - Modes:
modes/<mode>/config/<mode>.yaml. - GMC:
addons/mpf-gmc/*; slides inslides/*.tscn(plus overlays/scripts). - Media/audio:
video/*,sounds/*.
- MPF configs:
-
Mode Flow
- Attract: starts on
reset_complete→ showsslides/attract.tscnand plays opening music. - Base: starts on
game_started, queues location selection, displaysslides/location_choice.tscn. - Selection: flippers set cursor;
s_start_activeconfirms → posts eitherstart_mode_queensorstart_mode_zamundaand ends base. - Hubs:
queens→arriving_in_queens;zamunda→the_prince_awakens.
- Attract: starts on
-
Inputs & Events
- Switch IDs:
s_left_flipper,s_right_flipper,s_start, etc. MPF emits_activeevents automatically. - Keyboard mapping for dev: set in
gmc.cfg(e.g.,enter→s_start,v→s_left_flipper,z→s_right_flipper).
- Switch IDs:
-
Adding a New Mode
- Add mode name to
config/modes.yaml. - Create
modes/<name>/config/<name>.yamlwithmode: start_events,stop_events, and desiredshots,counters,event_player,slide_player,sound_player. - Kick off from a hub via an event like
start_mode_<name>.
- Add mode name to
-
Slides & Media
slide_playerkeys reference Godot scenes, e.g.,slides/location_choice.tscn.- Prefer lightweight scenes that extend GMC/MPF base classes when applicable.
-
Audio
- Busses configured in
gmc.cfg(music,effects,voice). - In
sound_player, setbusandaction(play,stop) to control layering.
- Busses configured in
-
Hardware Notes
- Set FAST NET port in
config/config.yaml(fast.net.port: COMx) for real hardware. - Tune flipper
default_hold_powerto your coils/mechs; current values are placeholders.
- Set FAST NET port in
-
Dev Tips
- To run MPF directly:
tools/run_mpf.sh . -t -x. - Increase logging in
gmc.cfgfor debugging (e.g.,logging_game,logging_media). - Common simulated inputs:
Enter= start,v= left flipper,z= right flipper.
- To run MPF directly: