# Tower Defense

Build a tower defense: enemies pathing along lanes, wave spawning, towers that...

- Repository: https://github.com/gamedev-skills/awesome-gamedev-agent-skills (6445 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill tower-defense -g -a claude-code -y`
Codex: `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill tower-defense -g -a codex -y`
Cursor: `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill tower-defense -g -a cursor -y`
Gemini CLI: `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill tower-defense -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add gamedev-skills/awesome-gamedev-agent-skills`

## Description

Build a tower defense: enemies pathing along lanes, wave spawning, towers that auto-target and fire, an economy, and lives. Use for a tower-defense/wave-defense game, or balancing waves and economy.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Tower Defense

A playbook for tower defense, enemy pathing, wave spawning, tower targeting, and the
economy that ties them together. This is a **compositional** skill: it orchestrates pathing,
AI, and UI into a TD loop. It does not re-teach pathfinding; it defines the systems and the
balance levers (DPS vs. HP vs. income) that decide whether a TD is tense or trivial.

## When to use

- Use when building a game where the player **places towers** that automatically attack
  **waves of enemies** following a path, spends earned currency to expand/upgrade, and loses
  if too many enemies leak through.
- Use when designing wave composition/pacing, tower targeting priorities, or the gold economy.

**When _not_ to use:** the player directly controls a shooter → `fps-shooter`. Free-form base
building with needs → `survival-crafting`. For the pathfinding algorithm itself, use `game-ai`.

## Core loop

**Prepare (place/upgrade towers with current gold) → start the wave → enemies path toward the
goal while towers auto-fire → earn gold from kills → survive the wave → repeat against a
harder one.** The tension is a planning puzzle: is my current DPS enough for what's coming,
and can I afford the answer?

## Must-have systems

1. **Enemy path**, waypoint lanes, or grid + pathfinding for maze TD (refs).
2. **Wave spawner**, timed, scripted sequences of enemy types with per-wave scaling.
3. **Towers**, range, fire rate, damage, projectile/hitscan, splash; placement validity.
4. **Targeting**, per-tower priority (first/last/closest/strongest/weakest) (refs).
5. **Economy**, gold from kills + wave bonuses; tower/upgrade costs; sell refund.
6. **Lives / leak**, enemies reaching the goal cost lives; 0 = game over.
7. **Wave/prep UI**, lives, gold, next-wave preview, start-next-wave control.

## Design knobs

The rest: https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/HEAD/skills/genres/tower-defense/SKILL.md
