StarCraft: Brood War shipped in 1998 and is still played competitively today. Under the hood it is a deterministic, lockstep simulation engineered for the dial-up internet. Here is how every piece fits — explained from the real, reverse-engineered source.
In the late 1990s, two players connecting over a 56k modem could fight a battle with hundreds of units, projectiles, and effects — without ever sending the units over the wire. The trick: don't send the game, send the inputs. Every machine runs the same simulation, and as long as that simulation is perfectly deterministic, they all arrive at the same result, frame for frame.
That single decision — lockstep determinism — ripples through everything: the math is fixed-point so two CPUs never disagree on a rounding bit, the random number generator is seeded and synchronized, the netcode buffers commands a couple of frames ahead, and a rolling checksum constantly asks every machine "do you still agree with me?" If two machines ever diverge, the game has desynced — the cardinal sin of lockstep design.
This site walks that architecture from the top down, using OpenBW — an open, faithful reverse-engineered rewrite of the original engine — as the source of truth. Real function names, real constants, real code.
OpenBW is an independent, open-source re-implementation of the Brood War engine, written largely by Vegard Mella (handle tscmoo). It exists for preservation, research, and AI: it runs headless and on Linux, drives machine-learning frameworks like TorchCraft, and lets bots and tools simulate games without Blizzard's original executable. It is not made by Blizzard and ships none of Blizzard's code.
Two things follow. First, OpenBW's simulation is reverse-engineered to match original Brood War bit-for-bit — the fixed-point math, the RNG, the order logic — because that's what lets it replay real games correctly. Second, the machinery around the simulation — the netcode and desync checksum you'll see in sync.h — is OpenBW's own design, not a copy of Blizzard's. Throughout the site, ⬡ BW vs OpenBW notes flag where the original game works differently or where the detail is OpenBW-specific.
Six chapters, each going deeper than the last. Start at the history, end inside the per-frame update loop.
Blizzard, 1998, a crunch-born classic, and why a 27-year-old RTS became a national sport in Korea.
🔁Send inputs, not state. Why every machine runs the identical game and what happens when one disagrees.
📡Modems, IPX, and Battle.net. How dial-up constraints shaped a design still used 27 years later.
🎲Fixed-point math, a seeded LCG, and the rolling desync checksum. Play with all three, live.
⚙️One frame, start to finish: units, orders, the iscript animation VM, pathfinding, and the memory model.
⏯️A replay file is tiny because it stores no graphics — just a seed and a stream of commands. Determinism does the rest.