Tombstone
Goat: The Battlestar Server
2019 · age 37
What it was
The Node.js game master at the heart of Goat: a small state-machine library plus the rules of the Battlestar Galactica board game written as commands. The library loads a JSON state file, runs the game as a series of steps, and saves the entire state after every one, so a crashed server restarts exactly where it was, kept alive by a two-line restart loop. Each rule is an async function that pushes state to a player's tablet, awaits their tap, and continues, so a multi-player turn reads as plain straight-line code. Tablets found the laptop by listening for a UDP beacon every 200 milliseconds. The rules that exist cover setup, roles, skill checks, some crises and the line of succession. The rest were thirty-two TODOs, and the server's first line required a module that was never saved, so it could not start.
Wins, for the age
- At thirty-seven, with a day job and no team, Jeff wrote rules as awaited commands where the turn structure is the call stack, landing within a year of Temporal's human-in-the-loop signals (2020).
- Crash-only design in two lines: a JSON file as the only state plus a loop around
node. It found on its own what Erlang/OTP's let-it-crash supervision (1998) had already found. - Zero-configuration discovery for a table of tablets, the same shape as Bonjour and mDNS (2002), rediscovered because nobody at game night should have to type an IP address.
- One screen document served player, observer and board by switching on a single role variable.
What it taught
- The rules are the product. Engine, editor, players and protocol all shipped in some form, and the thirty-two TODOs were the game.
- Two copies of a library is one too many: the copies drifted, and the newer frame reader read a 16-bit id the writer had written as 32 bits.
- A missing require is how a project ends. What was never committed never ran again.
- A server that executes JSON from any client needs a session token, even among friends.
Genealogy
Ancestors: none on record beyond its umbrella. The first game master this primate wrote. Descendants: BSG Prototype: rules as awaited commands, finished on a new runtime. Part of: Goat.
Epitaph
Here lies the Battlestar server. The beacon was broadcasting, the tablets were listening, and the module that held the game was never saved.