Bash.tv → GitHub → itch.io

Tower defense and defensive strategy games. Paths (fixed lanes or open maze-building), placement grids with path-blocking checks, tower types, targeting rules (first, last, strongest, closest), projectiles and splash, upgrades and selling, economy per wave, enemy types with armor and speed, wave scheduling and boss waves, early-call bonuses, game speed controls, touch-friendly placement, and a ...

Download skill (.zip) Files on GitHub

Tower defense development

Core: place and upgrade towers between and during waves so enemies never reach the exit.

Starter template

A playable starter for the game-scaffolding template is in assets/starter/. A fixed path with build tiles, three towers (single target, splash, slow), first-in-line targeting, upgrades, selling, eight scripted waves with a boss, an early-wave bonus and lives.

python3 <game-scaffolding>/scripts/scaffold.py my-game --title "My Game" --starter <this skill>/assets/starter

Controls: Tap a tower in the bar, then a tile; tap a tower to select or upgrade. Keys: 1-3, arrows + Enter, X sells, N calls the next wave. Esc pauses. All numbers to tune are in src/config.js; the gameplay is in src/scenes/play.js. Building, path blocking, waves and targeting were tested.

Structure

Play scene: grid map, path (fixed waypoints, or a flow field for open maps), towers, enemies, projectiles, wave director, wallet, build UI. States: build (between waves) / wave / victory / defeat.

Growing the starter (tested modules)

  1. Grid + flowField(grid, exit) (pathfinding): every enemy follows one field. Recompute when a tower is placed.
  2. Block check: before placing, test with the tower added: astar(start → exit) must still succeed, or refuse with a red ghost.
  3. Towers: { range, fireRate, damage, type, target: "first" }; find targets with a spatial grid query (game-spatial-partitioning).
  4. Projectiles: leadAngle for slow bullets, instant hits for lasers, splash = radius query (projectile-system).
  5. Enemies: hp, armor, speed, resist (combat-system dealDamage); slow effects with Effects.
  6. wave-spawning with scripted waves, skipBreak() as “call next wave early” (+ bonus gold).
  7. game-economy Wallet: kill bounty + wave bonus; tower costs and upgrade costs; sell at 70%.

Targeting options

first (furthest along the path: default), last, strongest, closest. “First” uses flow-field distance to the exit.

Balance

UX

Show range circles on hover / selection, a placement ghost (green / red), enemy path preview, health bars, game speed ×1/×2/×3, and pause. Touch: tap a tile → radial menu of towers; tap a tower → upgrade / sell. Big tap targets.

Pitfalls

Flow field not updated after placement (enemies walk through towers), allowing fully blocked paths, invisible enemy types, and late waves that are only HP sponges.