An arcade cabinet that makes new games
Sparkade started with a question: what if an arcade cabinet could make the game you wanted to play?
You can step up to the cabinet, take an optional photo, and describe a game out loud. A few minutes later, Sparkade turns that idea into a complete SNES-style platformer, shooter, or adventure game. If you take a photo, a tiny pixel-art version of you becomes the hero.
I wanted the result to go beyond a simple demo you run in your browser. It needed physical controls, music and sound effects, persistent high scores, a library of finished games, and a UI that never asks for a keyboard or mouse.
From an idea to a playable game
The generation flow is intentionally simple. Sparkade captures a photo, listens to a voice prompt, and asks the player to choose from three game styles. Behind the scenes, it designs the game and generates the levels, characters, music, palette, story, boss, and scoring rules. Every part is validated before the game appears in the library.
To create the player avatar, the cabinet sends the captured photo to Muse Spark for analysis. The model extracts visible features from the photo, and Sparkade uses those details when drawing the pixel-art character for the game.
The model writes data, not code
The most important technical decision was keeping the model away from the game engine itself. I did not want every generation to produce a pile of unpredictable JavaScript and hope it happened to run on a Raspberry Pi.
Instead, Sparkade has three layers:
- A hand-built engine handles rendering, input, physics, audio, scoring, leaderboards, and game-feel details like coyote time, jump buffering, screen shake, and hit-stop.
- Hand-built archetypes provide the rules for platformers, shooters, and adventure games.
- The model produces a bounded JSON specification containing the story, levels, sprites, enemies, music, palette, backdrop, weather, and other game-specific details.
Those specifications pass through strict schemas and semantic checks. If something fails, Sparkade asks the model for a small repair instead of regenerating the entire game. A finished game is only published after every stage passes.
That separation made the generated output much more efficient and reliable. The AI gets plenty of room to be creative, while the parts responsible for making a game feel responsive stay deterministic.
Reworking the mini arcade design
The cabinet is based on the same design I used for my mini arcade cabinets. This version adds an integrated camera and microphone for capturing the player's likeness and voice prompt.
Inside is a Raspberry Pi 3B+, a 1024×600 display, a USB camera and microphone, and arcade controls connected through a Zero Delay USB encoder. The entire enclosure is 3D printed.
The frontend is a Preact interface running in Chromium kiosk mode. Games render with Canvas2D and use WebAudio for synthesized music and sound effects. A Fastify server manages the generation pipeline, while SQLite stores games, jobs, settings, high scores, and generation costs.
Because the cabinet can lose power at any moment, generation jobs are written to disk before they begin and assembled in a staging directory. A game moves into the playable library only after it is complete. Existing games and scores remain safe even if someone pulls the plug halfway through a generation.
This project ended up combining a lot of the things I enjoy working on: product design, game development, AI, electronics, 3D printing, and making something physical that my kids can enjoy. The hard part was not getting a model to generate more content, but rather building enough structure around that content to make the result consistently playable.
Explore the source code on GitHub or watch the full project walkthrough.