For Developers
How a 2009 Flash game became online co-op
There was no source code: one compiled Flash file, 1,855,972 bytes. Everything here, from the 32 levels to the physics, was recovered from it, ported to TypeScript, and given rollback netcode so two people in two browsers play as if they shared a keyboard.
Netcode
One frame of input delay, online
The real engine, running rollback in your browser: prediction, correction and re-simulation, frame by frame.
See it run →Recovery
Rebuilt from the file, not remade
What the SWF's first sixteen bytes say, what was inside it, and the tools that took it apart.
Open the file →Architecture
Determinism, and what it buys
The system, the four hazards that break lockstep physics, the security perimeter, and what is tested.
Read the design →Numbers
The numbers this design rests on
From the benchmarks and the test suite that ship with the code.
| Levels | 32 | Adventure 17, puzzle 9, speed 6, each pinned by a digest in CI. |
|---|---|---|
| Tick | 26 fps | A 38.5 ms frame, the SWF's own rate, on a fixed-step accumulator. |
| Input | 3 bits | Per player per frame. Each packet repeats the last 16 frames. |
| Session cost | ~700 B/s | Including that redundancy; about 34 bytes per input packet. |
| Input delay | 1 frame | Measured, against lockstep's 5 on the same build. |
| Re-simulate a frame | ~0.04 ms | So rewinding is always cheaper than the 38.5 ms a frame has. |
| Snapshot | ~4.7 ms | One snapshot, refreshed every ~8 settled frames: 1.4 MB, not 17 MB. |
| Determinism | 3 engines | V8, SpiderMonkey and JavaScriptCore agree on digest aba863c1 after 600 frames. |
| Soak | 640,000 frames | About seven hours of play, run twice and compared. |
The repository
Four parts, one direction of dependency
engine/ | TypeScript | The simulation, the renderer and the netcode. No network, no accounts; runs in Node. |
|---|---|---|
app/ | Static SPA | Sign-up, friends, invitations and the game, served from a CDN. |
supabase/ | Postgres | Migrations, row level security and its tests, and the authenticated TURN credential broker. |
tools/ | Python | What turned the SWF into everything else. Run once; nothing in a build needs it. |