Tombstone
kitchen
Jul 2007 โ Mar 2008 ยท age 25โ26
What it was
The 2007 to 2008 rebuild of Jeff's Cauldron game engine. The premise: describe the data once, in a small class language, and let a home-made compiler generate everything that touches it: C++ classes with reflection and two serializers, C# mirrors for the editors, field maps for the scripts. On top sat a render queue that was simply a sort, a typed scripting language with its own compiler and virtual machine, a model importer, a GUI editor, and a tower-defense game that exercised all of it. Of 55,000 lines, about 40,000 were emitted by programs Jeff wrote first. The last build compiled with zero errors, the game was playable, and the skinned dwarf meant to replace the monster could only stand in bind pose.
Wins, for the age
- At twenty-five, alone, Jeff put a schema compiler at the center of an engine: one description producing C++, C#, both serializers, editor metadata and script bindings. Protocol Buffers went public in 2008; this ape with a keyboard got there at the same time, not second.
- Loaded game data as a memory image, vtables patched in from a static prototype. Zero-copy object graphs, six years before Cap'n Proto made the idea famous in 2013.
- Wrote a script VM whose tree walker rewrote its own nodes into opcodes on first visit, arriving alongside TraceMonkey (2008) rather than after it, and ran a 60 Hz game loop on it with no garbage collector.
- Closed the loop from grammar to pixel with one playable game.
What it taught
- Code generation as architecture: generate the boring layers, test the generator, hand-write only the interesting parts.
- Compilers end to end: grammar, typed AST, free-variable analysis, lambda lifting, an IR, a lowering pass and an interpreter.
- Rendering as data flow: sort first, bind once, count the binds.
- One person cannot also own three optional subsystems: a second driver, a task engine and a physics service all stalled as prototypes.
Genealogy
Ancestors: Ant Colony: MilkShape models and the unfinished wish to put them in a game. Cauldron v2: the engine it replaced, so generation could move to the center. Inferno: the flat-image loader and schema compilation, built in the same months. ZMLC: the header-shaped schema language and its two serializers. Descendants: Adama Core: one described document as the truth for every layer. Farm Cron: the instinct to build a platform beneath a small product. RPG Spine: one schema generating the code, the save format and the editors, again. Tiles: the game's tile grid, turned into an autotiling art pipeline. Parts: Kitchen Cauldron, Kitchen Demo Game, Kitchen Fork, Kitchen Grill, Kitchen Pantry, Kitchen ZMLC2.
Epitaph
Here lies kitchen. It described its world once, let its own programs write forty thousand lines of the rest, and stopped on the evening a dwarf was about to walk.