Tombstone
DefenseMapEd
Oct 2007 · age 25
What it was
A two-day map editor for a tower-defense game that was never built. The window was a toolbar over a 50-by-25 grid of small tiles: grass, dirt, marble, stone, wood, entrances, exits, spawn points and stairs, each cell with a height from 0 to 9, all painted by dragging a hatched rubber-band rectangle. The heart of it was a flow-field solver. Every exit was seeded as a goal and a wavefront expanded outward through eight neighbors, leaving in each open cell an arrow pointing the cheapest way out, so any number of creeps could navigate by a single lookup. Walls marked destructible were broken only when no ordinary path remained. The editor redrew the arrows live after every stroke. Beside it sat a data model generated from a schema into both C# and C++. There was no save, and the editor never used the model.
Wins, for the age
- At twenty-five, Jeff made flow fields the answer to many agents sharing one destination, three years before Supreme Commander 2 made flow-field navigation famous in 2010.
- Deferred wall destruction to a last resort, collected separately and applied only when the map left no other way.
- Kept arrows from zigzagging by letting straight steps beat diagonal ones on ties, and hid the whole world behind a small environment interface so the solver knew nothing about tiles.
- Generated one schema into two languages, finding on their own what the CORBA IDL generators had already found. A mammal who needed sleep got a working solver on the first day.
What it taught
- Flow fields beat per-agent search when many agents share a goal, and a live field in the editor is the right feedback loop.
- Generate the data model from a schema for every language that will touch it. That became a habit here.
- An editor without save is a demo. The hard part worked on day one; the easy part was never added.
- Marking a cell done on first sight is not Dijkstra with diagonal costs. A test against a reference path would have caught the approximation.
Genealogy
Ancestors: CIS541: a hand-drawn navigation-map editor for a robot. Zen Risk: a painted game map read cell by cell. Descendants: Kitchen Demo Game: the tower defense finally built, with a flow field inside.
Epitaph
Here lies DefenseMapEd, which could tell every creep the way out of a maze it could not save.