Architecture
A single self-contained browser client, a Node match server that owns the simulation and the money flow, and an escrow contract on Robinhood Chain.
System map#
Design rules#
| Rule | Why |
|---|---|
| The client is hostile | It sends four booleans plus a super flag. No position, score or effect is ever read from it. |
| Physics stays deterministic | No clock, no Math.random(), no DOM. Otherwise prediction fights the server forever. |
| Only the local player is predicted | Predicting everything made the two simulations fight and jitter. |
| A pot is never stranded | Failed settlement refunds; stale locks are swept; crashed-process locks are refunded at boot; reclaim() backs it all on-chain. |
| Flags never take money | Anti-cheat output is for human review only. |
| The online game is the single-player game with netcode bridged in | A from-scratch client was thrown away because it lost the look and feel people already know. |
Scale#
1,000players per core
33 mstick under load
49%CPU at 1,000
3 KB/sper player
Measured on one core: 1,000 concurrent players at a 33 ms tick using 49% CPU and 220 MB. Cost is dominated by network egress, not compute.