frogger

frogger · games · schema v1

Interactive Frogger game module (clean-room TypeScript port of Adrian Eyre's React Frogger, MIT-licensed). FULL CV-gate control with NO keyboard exposure on the module: five gate inputs (up_gate / down_gate / left_gate / right_gate / start_gate) are rising-edge triggered to play the game. The start_gate auto-fires once on module-spawn (a synthesized first-tick rising edge) so the user sees a running game by default — the upstream React app's pre-game InfoBoard ("click Start Game") is bypassed via this synthetic pulse. The same start_gate is rising-edge triggered by external CV to restart at any time. Three gate outputs fire one 5 ms pulse per event: home_gate (a frog reached one of the 5 home slots — fires up to 5 times per level), dead_gate (frog hit a vehicle, fell in water without a raft, or the per-level timer ran out), level_gate (all 5 homes filled — level complete). One knob: TIME (10..120 s, default 60) sets the per-level timer budget. Game logic runs at visual cadence on the main thread (no audio worklet); pure deterministic state stepper in frogger-state.ts. vizPassthrough: the on-card 14×13 grid canvas can be portaled into a containing GroupCard for cross-domain video out (same mechanism MODTRIS / PONG / SCOPE use). See docs/design/game-modules.md for the multi-user follow-up path.

A playable Frogger arcade game wrapped as a CV/gate module — the gameplay IS the patch's modulation source. A frog at the bottom hops up a 13-row board (grass banks → a 5-lane road of cars/lorries → a river of logs/turtles → the five home pads at the top), avoiding traffic and drowning, before a per-life timer runs out. You DON'T touch the card to play — you patch gates into its four direction inputs (a sequencer, clock, LFO-through-comparator, or manual gate buttons drive the frog), and the game emits gate pulses on the events it produces: every home pad reached, every death, and every level cleared. So a clock pattern steering the frog becomes a generative trigger source whose rhythm depends on how the game unfolds. The game auto-starts once when the module is first placed (a synthetic START pulse) so you see it running immediately; the START input restarts it any time. The board renders on the card's 2D canvas and, because the module is vizPassthrough, that canvas can be portaled into a containing GROUP card for cross-domain video — there is no dedicated video output port. The TIME knob sets the per-life countdown ceiling.

the faceplate

froggerup_gategatedown_gategateleft_gategateright_gategatestart_gategatehome_gategatedead_gategatelevel_gategateaudiocvgatepitch
5 inputs · 3 outputs · 1 params

inputs

idcablewhat it does
up_gategateMove the frog UP one row on each rising edge — one hop toward the home pads per pulse (the move only fires on the gate's leading edge, so a held-high gate hops once, not continuously).
gate / trigger
down_gategateMove the frog DOWN one row on each rising edge — one hop back toward the start bank per pulse.
gate / trigger
left_gategateMove the frog LEFT one column on each rising edge — one hop per pulse.
gate / trigger
right_gategateMove the frog RIGHT one column on each rising edge — one hop per pulse.
gate / trigger
start_gategateStart a fresh game on each rising edge — resets the board, lives, score and timer and begins a new run. One synthetic pulse is auto-fired the first time the module is placed (so a game is already running by default); after that, pulse this to restart at any time (e.g. wire DEAD or LEVEL back here for an endless self-restarting loop).
gate / trigger

outputs

idcablewhat it does
home_gategateFires a 5 ms pulse each time the frog reaches a home pad — if a single move scores more than one home (e.g. the last pad completing a level), it emits that many distinct staggered pulses so a downstream counter or envelope sees each one. Patch into a drum/envelope trigger to sonify successful crossings.
gate / trigger
dead_gategateFires a single 5 ms pulse each time the frog dies (hit by traffic, drowned in the river, or the life timer expired). A trigger you can route to a crash sound, a sample, or back into START for auto-restart.
gate / trigger
level_gategateFires a single 5 ms pulse each time a level is cleared (all five home pads filled). Use it as a progression trigger — bump a sequence, change a scene, or fire a fanfare.
gate / trigger

params

idlabelrangedefaultcurve
initialTimeTime10..120linear

controls

controlwhat it does
TimeThe per-life countdown ceiling in seconds (10..120, default 60) — how long the frog has before the timer runs out and DEAD fires. Lower it for a frantic game (faster death pulses), raise it for a relaxed run. MIDI-learnable via the on-card knob.

source

frogger.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo