The Tower Defense — Five Tower Types, Real Combo Mechanics
Procedural maze. Five towers (archer, cannon, frost, lightning, buff). FROST + CANNON adjacent shatters frozen enemies for 2x. LIGHTNING + WATER tile chains further. BUFF stacks. 30 waves.
What this is
Procedural top-down tower defense. A 1-2 tile path snakes through a 20×20 grid from spawn to exit, generated by weighted random walk biased toward the goal. Off-path terrain has buildable green tiles + obstacles (rocks, water). Five tower types: archer (single-target high DPS), cannon (AoE explosion), frost (slow aura), lightning (chain to 3 targets), buff (boosts adjacent towers' damage by 50%). Combos recompute on every place/upgrade/sell via `recomputeAdjacencies()`. FROST + CANNON adjacent: frozen enemies in the cannon's AoE shatter for 2x damage with cyan combo particles. LIGHTNING + WATER tile adjacent: chain count +2 dynamically. BUFF stacks across 8-neighbors. 30 waves with 10-second prep periods. 5 enemy types including a healer and a boss every 5 waves.
Why this is mind-blowing
Bloons TD made millions on the App Store. Plants vs. Zombies sold hundreds of millions. Tower defense as a genre is built on combo placement, and that's exactly what this nails — 1688 lines, one paragraph.
Single-file top-down tower defense in three.js. Procedural maze path.
Five tower types with combo mechanics: archer (single target DPS),
cannon (AoE), frost (slow), lightning (chain), buff (boosts adjacent).
FROST + CANNON stacks devastate. 30 waves. Resource economy from kills.
Particle effects.
Paste this into Claude, Cursor, or Copilot. Change one thing that matters to you.
What I learned shipping it
- Combo mechanics that recompute via 8-neighbor adjacency on every place/upgrade/sell turns 'placing towers' into 'designing a kill zone.' The strategy IS the placement.
- Cluster-bomb cannon AI (target the enemy with the most neighbors in AoE radius) is one line of decision logic that produces emergent skill expression.
- Weighted-random-walk path generation biased toward goal gives a winding maze in 30 lines without needing A* or hand-authoring.