Insert
Coin.
How a father and son built a full-size bar-ready arcade cabinet around a hand-coded spaceship game — from Raspberry Pi to coin door, from Scratch block to real hardware.
The brief was deceptively simple: take a game a kid made in Scratch, and turn it into something you'd find bolted to the floor of a bar, ready to eat quarters. No emulator. No MAME library. A real, original, coin-operated arcade cabinet — built from scratch, running a game built from Scratch.
The game at the heart of this build is a pixel art spaceship shooter, designed and coded entirely by Ben's son in TurboWarp — a high-performance fork of Scratch. TurboWarp compiles Scratch's block-based code into optimized JavaScript, running at a locked 60fps with interpolation.
The game features twin-stick controls inspired by arcade classics like Robotron: 2084 and Smash TV: one stick aims and moves the ship, the other aims and fires the weapon — a split-brain control scheme that rewards skill and muscle memory in equal measure.
The export pipeline uses TurboWarp Packager to produce a self-contained Electron app with all extensions bundled for offline use, mouse cursor hidden, no player controls exposed, and native gamepad support enabled. The stage is rendered at 1920×1080 with the compiler active.
Attract mode — the looping demo that runs when no one's playing — lives entirely inside the TurboWarp app itself, cycling through video clips, the high score table, and backstory animation before looping back to the title screen.
- Left stick direction — Aim gun
- Left stick trigger — Boost
- Left stick thumb — Shield
- Right stick direction — Aim ship
- Right stick trigger — Shoot
- Right stick thumb — Special / Switch weapon
- Panel button — Start / Select
- Panel button — Coin Drop
- TurboWarp (Scratch-based, compiled JS)
- 60fps + interpolation, 1920×1080
- Electron app, offline, no cursor
- Native gamepad support
- Custom attract video extension
- Save/load extension (planned)
- High score table persistence
- Coin/credit tracking
Raspberry Pi OS Lite boots headless — no desktop, no GUI. A systemd getty override auto-logs the cloudfall user into TTY1 immediately. No keyboard input required.
.bash_profile detects TTY1 and launches cage — a minimal Wayland compositor purpose-built for single-app kiosk deployments. It replaces the full X11/Xorg stack entirely, reducing attack surface and boot time. seatd handles hardware seat permissions without requiring root.
System Electron (installed via npm) is pointed directly at the TurboWarp app's resources/app folder, bypassing the bundled Electron 22 binary. This is the key to Pi 5 compatibility: Electron 22 segfaults on Pi 5's V3D driver with the modern Wayland stack. Electron 41 does not.
The TurboWarp app comes up fullscreen at 1920×1080, no cursor, no controls visible. Attract mode runs immediately: title screen → gameplay video clips → high score table → backstory animation → loop. No idle timeout — it runs forever until a coin is inserted or a button pressed.
The Ultimarc coin door sends one electrical pulse per coin to a button pin on the UltraStik's I/O connector, which the TurboWarp app reads as the Coin Drop key. The game handles credit counting, configurable coins-per-credit, maximum credit cap, and the Start button transition — all in Scratch blocks.
The physical cabinet follows Holbrook Tech's full-size vertical plans — a well-regarded set of drawings in the arcade DIY community. The aesthetic target is Williams-era: clean lines, bold marquee, and a backlit translite panel above the monitor in the style of classic machines like Devil Zone.
Before committing lumber, a test control panel was built from scrap wood and a dresser front to validate the stick spacing, button placement, and panel ergonomics at full scale. Both UltraStik sticks mount on a black acrylic surface with 10" center-to-center spacing — the same layout as Robotron and Smash TV.
The test rig validated the full electronics stack: Meanwell PSU powering the amp board, audio routing confirmed end-to-end, both sticks identified uniquely by the OS via onboard flash configuration. The adjustable front feet let the panel angle be dialed in during testing before locking to the Williams factory standard of 10°.
Illumination comes from two zones: the marquee (23" × 8", backlit film) and the translite panel above the monitor — both powered from headroom on the Meanwell 12V rail. Phase 2 will add an Arduino driving a shaker motor and flasher lamps, triggered by in-game events over a WebSocket connection.
Style: Williams-era
Panel angle: 10°
T-molding: 5/8"
- Display portrait rotation in Electron layer
- Game-over crash fix (Scratch-side bug)
- Deploy attract mode video extension
- Save/load extension for high scores
- Nightly scheduled app restart via cron
- Validate TurboWarp native gamepad mapping
- Cabinet lumber + construction from plans
- Coin door hardware integration
- Marquee + translite print and backlight
- Speaker selection and final audio
- Arduino flasher + shaker via WebSocket
- Full bar deployment
This build is documented for full reproducibility — hardware choices, wiring decisions, software configuration, and lessons learned are all tracked. The guiding principle: do things properly, even when the work won't be visible.