Tombstone
ZenRisk
May 2000 – Aug 2000 · age 18
What it was
A hot-seat, Risk-style world-conquest board game, a personal clone written straight against the Win32 API with no framework, mostly in a single week of May 2000. The whole world lived in one text file: six continents, 42 territories with card types, a seed point for each, and an adjacency list packed into a 252-byte bitmap. There was no polygon data at all. Each turn the game blitted a black-and-white border map and flood-filled every territory from its seed point in its owner's colour. To find which country you clicked, it flood-filled a highlight at the mouse and checked which seed's colour had changed. A single "Next" button drove a phase machine through land grab, placement, fortify, attack and move, with dice dialogs, card cash-ins, and "We Have a Winner" at the end.
Wins, for the age
- At eighteen, Jeff made the paint bucket both the renderer and the hit test. The black borders were the only geometry the game knew, and it was enough. A primate who did not own the geometry used the screen as the data structure.
- Put the entire map, rules data and adjacency in a text file the code merely interpreted, the data-driven shape Doom's WADs had made famous, arrived at on the way to a playable game.
- Modelled turns as an explicit phase enum advanced by one button, instead of event soup.
- Packed a 42×42 adjacency matrix into bits, so the whole graph fit in 252 bytes.
What it taught
- Ship a playable thing before making it pretty. This was the first complete game loop on Windows.
- Data-driven rules age far better than clever rendering hacks. The text file is still a good design; the flood fill is a museum piece.
- Arrays have ends. The graph constructor cleared 42 columns of a six-byte row, writing past every row, and survived only because it ran once at startup.
- Latent bugs hide in lucky constants: the wild cards sat in slots the draw never reached, so the cash-in branch written for them could never fire.
Genealogy
Ancestors: Zen Net: the games lobby of the winter before, where games were the point. Descendants: Ant Colony: the next game, a real-time strategy engine. Defense Map Ed: paint the walls of a map, and every cell knows the way out. BSG Prototype: a whole board game, Battlestar Galactica, written as rules in code twenty years later.
Epitaph
Here lies ZenRisk, which conquered the world with a paint bucket and never learned to draw a border of its own.