Built Four features that make the ground itself something you buy, so that shaping the route stops costing a gun. Phases 1–3 shipped — Rampart, Tar, Cut and the detour readout are in the game. Phase 4, the Detour Dividend, was deliberately not built; see the phases below for why. The page is kept as the record of the argument, and the board halfway down is still a live mockup you can play with.
All three verbs and the readout are live. Everything below this section is the original proposal, unedited apart from the phase list — a proposal rewritten after the fact to match what was built stops being a record of why it was built.
blockingPlacementRefusal. A second copy is how the two would have drifted, and
a rampart that skipped either of its two loops would have been the one way left in the game
to build a softlock.saveGame already
serializes the whole level, so cut tiles ride along inside it.Twenty-nine assertions in tools/smoke.mjs cover the three verbs,
including that a rampart blocks pathing, that a resumed one still does, that tar slows a creep
standing on it and not one beside it, and that a rampart cannot seal the base.
The wiki opens by saying TerraTD is a tower defense game about shaping the route. There is exactly one way to shape it: place a tower. Towers are the walls, so every tile of shape is also a gun you bought, and the cheapest gun in the shop is —
This is measurable without guessing, because the game already measures it. The map-quality
gate's mazeGain lays wall segments near the current route one at a time and
keeps only the ones that make the walk longer — the same greedy the generator uses to decide
whether a map is worth serving you. Give it a budget in tiles and it reports the exchange
rate between walls and route.
Run below, in your browser, on maps generated from a fixed seed — so this table is the current generator's answer, not a screenshot of an old one.
Two curves in that table have never been reconciled with each other. The quality gate models a player who builds —. The economy models a player who can afford a small fraction of that for most of a run. The generator certifies a map as mazeable using a budget the wallet does not issue.
—
src/core/level.js has three tile values — GROUND, ROCK, LANE — and a player can
change none of them. Rock cannot be walked, built on, shot over or removed, and nothing that
happens in a run ever touches it. On Maul maps that is roughly a third of the arena sitting
outside the game.
Past tier 4, overcharge is the only sink, and by design it never touches range or fire rate — a tower that grew its footprint every level would redraw your maze under you. That is the right call for a stat upgrade. It also means that once your last tile is placed, a run has no board decisions left in it: the maze you have at wave 20 is the maze you die with, and every purchase after that is the same button at —
Four features. Three of them are ways to spend coins on the ground instead of on a gun, all placed on the same tiles, from the same wallet, under the same rules as a tower. The fourth is the readout that makes the other three legible.
tryPlaceTower. Rampart, Cut and Tar all go through that same check, so none of
them can build a softlock — and Cut, which removes a wall, can never fail it at all.
Because the interesting tension is supposed to be shape versus firepower, and today that tension is hidden inside a Sword's price tag. A tower bought as a wall is a purchase you are quietly overpaying for and slightly embarrassed about. Split the two and the decision becomes explicit: a Rampart produces nothing, ever, and the tile it takes is a tile no gun will stand on. You are choosing to buy walking time instead of damage, and you can see the exchange rate while you do it.
Overcharge exists because a run's income has to have somewhere to go, and its cost grows faster than its power on purpose so that spending is unbounded while board power is not. Cut borrows the shape of that curve for the opposite kind of purchase: instead of another increment on a number, each one changes the map. Late-run money buys you a new switchback carved through rock that was never yours — expensive, escalating, and never the same twice.
Lane is the author's reservation: this ground was never yours, and it exists so you cannot wall a spawn shut. Tar does not block anything, so it does not touch what the rule is protecting — and it gives Maul maps the one thing they lack, which is any decision at all about the corridors that make them Maul maps. This is the most arguable of the four; see the risks.
Same money, same maps, same measurement as the table above — the only thing that changes is whether shape is priced as a gun.
The number the whole game is about is currently invisible. The path field needed to compute it is recomputed on every build already, so this is a division and a HUD pill.
Route length across every spawn, over the same map's shortest route with your towers removed. It is ×1.00 on an empty board and it is the only honest score of how well you are playing the game's stated verb.
A real generated map, seeded so everyone reading this page gets the same ground. Pick a verb, then tap tiles. The route redraws, the detour recomputes, and a placement that would strand a spawn is refused exactly as the game refuses one now.
Loading the map…
Rampart and Cut are fully live here: both re-run the real BFS, and both refuse exactly what the game refuses. Two things are mockup-only — Tar is drawn but not simulated, because there are no creeps on this board for its slow to act on, and taking a placement back is free, where in game a Rampart would sell back at the same — everything else does.
npm run endless before deciding anything
else is needed.lv.tiles mid-run. Resume
is free — saveGame already serializes the whole level and
resumeFromSave rebuilds the path field from the restored tiles — but the map's
identity is no longer purely its seed, which matters to anything that compares two runs of
the same daily map.npm run endless before and after, and
expect WAVE_HP_GROWTH or TOWER_OVERCHARGE_COST_GROWTH to move.
Do not eyeball it.IDEAL_MAZE_ADDED_PER_DIAG is aimed at the wrong player.