Parent
Spec 27: #162
What to build
Race mode: 1–N players play the same game simultaneously with the identical layout and item sequence; the first to reach the finish line wins the moment they cross it (Snake: eat N apples; merge-drop: build the target tier). If every run ends before anyone finishes, most progress wins. Interacting with a cabinet offers Solo or Race; race entrants ready-up, a countdown starts once ≥2 are ready, and during the race each player sees opponents' live progress bars beside their own game. The loser was still playing when it ended — no dead waiting — and a one-click rematch restarts the lobby. Solo mode is the same system against the clock, recording best times.
Server-side: a race manager modeled on the existing board-manager pattern — per-space serialized dispatch, Redis-mirrored snapshots with TTL, space-scoped broadcasts, disconnect forfeits after a grace window. The server is lobby + relay + arbiter only: it hands out the shared seed, relays throttled progress events (~1/sec per racer), and declares the result — it never simulates gameplay. All wire shapes (join/leave/ready/start/progress/finish) are strict zod schemas in the shared contract package; clients run their own deterministic sims from the shared seed.
Acceptance criteria
Blocked by
Parent
Spec 27: #162
What to build
Race mode: 1–N players play the same game simultaneously with the identical layout and item sequence; the first to reach the finish line wins the moment they cross it (Snake: eat N apples; merge-drop: build the target tier). If every run ends before anyone finishes, most progress wins. Interacting with a cabinet offers Solo or Race; race entrants ready-up, a countdown starts once ≥2 are ready, and during the race each player sees opponents' live progress bars beside their own game. The loser was still playing when it ended — no dead waiting — and a one-click rematch restarts the lobby. Solo mode is the same system against the clock, recording best times.
Server-side: a race manager modeled on the existing board-manager pattern — per-space serialized dispatch, Redis-mirrored snapshots with TTL, space-scoped broadcasts, disconnect forfeits after a grace window. The server is lobby + relay + arbiter only: it hands out the shared seed, relays throttled progress events (~1/sec per racer), and declares the result — it never simulates gameplay. All wire shapes (join/leave/ready/start/progress/finish) are strict zod schemas in the shared contract package; clients run their own deterministic sims from the shared seed.
Acceptance criteria
Blocked by