Inspiration

Every tower defense I have played asks the same question: where do I put my guns? The map is fixed, the path is drawn for you, and your only real decision is which tile to stand on.

I wanted to ask the other question. What if the path were the thing you built?

That is the whole game. The enemies walk a lattice — nodes and conduits — and you can buy new conduits. A junction splits one lane into three. A gate aims that junction so all of it goes one way. Two junctions and two gates fold three lanes into a single killing corridor of your own design. The towers matter, but the route is the strategy, and the route is yours.

What it does

Shape the Wave: Bastion Nine is a portrait tower defense you play with one thumb. Ten authored waves, 255 machines, roughly seven minutes to a win.

You defend a seawall through two currencies that never mix. Salvage buys machines that shoot. Flux buys the route they walk. That separation is deliberate: with one pool, a player under pressure always buys damage and never builds board, and the construction system dies in its first playtest.

Four devices, and each owns exactly one verb:

  • Railspike kills down a LINE — a lance up its channel, piercing several machines at once
  • Stormcoil kills in a CLUSTER — a radial discharge that pays more the tighter the knot
  • Flux Shepherd MOVES a lane sideways by hand, and leaves what it carries destabilised
  • Gravity Well LENDS ITS LANE — it deals no damage and kills nothing, but a machine standing in its field belongs to the well's lane as well as its own, so your guns can shoot where they otherwise could not reach

Nine structures build the board itself: junctions, gates, loops that send machines back up a row for a second pass, extensions that grow the lattice, and tiles that make one node worth more than the rest.

At level 2 every device makes a permanent choice of three mutations. A Railspike becomes SWEEP (fires both ways), RECOIL (two volleys) or LANCE (+35% on the last target). You cannot undo it.

How I built it

The build is deliberately austere: zero dependencies, zero asset files, fully offline. No engine, no framework, no libraries. Every pixel is drawn in Canvas 2D and every sound is synthesised from oscillators at runtime, which is why the whole game is a single 0.17 MB index.html with nothing in a vendor folder — there is nothing to put there.

It is developed across 32 readable ES modules and assembled into one unminified file by a build step, with module boundaries preserved as banner comments so the shipped file reads like the source it came from.

The simulation is strictly deterministic. Math.random is banned anywhere under src/sim/, and the packager fails the build if it appears. Two identical runs resolve identically, down to the pixel — because a formation the player authored has to resolve the same way every time, or planning is a lie.

Underneath is a test suite of 673 checks running the real simulation at the real fixed timestep, plus a regression recorder that replays four full scenarios and compares 944 recorded frames byte-for-byte on every field. Every balance change had to be attributed against that recording before it was allowed to move.

Challenges I ran into

The Gravity Well was redesigned three times, and a playtest killed each version for a specific reason.

It began as a vulnerability aura — everything inside the circle took more damage. The verdict: "that makes it basically the same as a storm coil with more added benefit." True. A damage multiplier in a circle is the Stormcoil's job with the damage removed.

So it became a funnel that gathered machines into its lane. That fixed the measurement problem outright and broke two others: "it pulling enemies to its lane makes the flux pointless, and two gravitys conflict." Also true — lateral movement is the Shepherd's verb, and two funnels side by side each gathered into their own lane and cancelled, which is a device that punishes you for building a second one.

The third version stopped acting on machines at all and started acting on distance. It lends reach. It moves nothing, so it cannot compete with the Shepherd — and two of them can only ever ADD, because reach lent cannot be un-lent.

Two branches were built, tested, measured and cut. The design called for PENETRATION (+2 pierce) and CHAIN (+1 link). Both passed their own tests. Both were then swept against the full schedule and moved the reference board by exactly zero Core, because the authored waves never stand five machines in one column inside one band. A rule can be real, correct, tested — and worth nothing.

The hardest lesson was that tests lie. Mutation testing — deliberately breaking a rule to see whether anything goes red — found that roughly a third of the early invariants proved nothing at all. One passed by array order. One asserted a distance ceiling a clamp already guaranteed. One sat in a pose where the rule under test was never exercised.

Accomplishments that I'm proud of

The fold: two gated junctions pouring three lanes into one is worth +3 Core on its own, and it is the clearest statement in the build that shaping the board pays more than adding another gun.

Nine rounds of playtesting, and every single one changed something. Two wells once pinned a machine for 33.5 seconds; a ring of three hung a run outright. Those are fixed, and the reasons are written down.

Most of all: the whole thing runs offline from one readable file. No install, no network, no dependencies, playable with the sound muted.

What I learned

A guarantee made per-device is not a guarantee. This project learned it four separate times. A rule that bounds one Gravity Well says nothing about three of them passing a machine round a ring. Whenever a rule bounds one thing, ask what three of them do.

Measure on a board that leaks. One reference board was so strong that every new purchase measured as worth exactly zero on it — it was a ceiling, not a measurement. That nearly killed three features that worked.

Discovery has to be designed, not assumed. Fresh players came back with "cool looking but I have no idea what's going on." The fix was not more text. The game already contained the answer and had used it exactly once: the opening wave highlights one socket, names one verb, and lets the board show the consequence. That loop had never been pointed at anything else. Now the grid reveal glows one node and asks for one junction — and the lane visibly splits three ways, which teaches more than a paragraph could.

What's next for Shape the Wave: Bastion Nine

Synergy. Right now the systems interact in a few deliberate places: a machine on a diagonal is invisible to a Railspike but not a Stormcoil, and a Router counts your towers and takes the branch you left undefended.

The next layer makes that the rule rather than the exception — towers, upgrades, nodes and machines interacting through a few shared verbs so combinations produce new behaviour instead of bigger numbers. The clearest gap today is the Flux Shepherd, which moves a machine one column while the grid has no idea it happened. A device whose verb is change where this machine is and a system whose verb is change where machines go should have a great deal to say to each other.

Beyond that: a wider board, an enemy that rewrites your lattice while you defend it, and an endless mode that keeps escalating past wave ten.

Built With

Share this project:

Updates

Submission history