xanarch-td/GDD.md
2026-06-03 21:53:16 -04:00

157 lines
4.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Squadron TD Clone — Game Design Document
## Overview
A 18 player cooperative/competitive tower defense game inspired by Squadron Tower Defense (SC2 Arcade). Players choose a **builder race**, place towers that transform into fighters during combat, manage a worker economy, and optionally send bonus enemies at opponents. Survive 31 waves to win.
---
## Core Loop
```
Pick builder race → Place towers → Wave combat → Collect income → Send enemies → Repeat
```
Each round:
1. **Build phase** — players spend minerals to place/upgrade towers.
2. **Combat phase** — towers transform into fighter units and engage the wave automatically.
3. **Income phase** — mineral income is paid out based on cumulative sends and upgrades.
---
## Player Count & Teams
- **Solo (1):** one lane, self-sends only.
- **Co-op (24):** shared team security system, each player holds their own lane.
- **PvP (4v4):** two teams; players send enemies across to opponents.
---
## Lanes & Security System
- Each player defends a **lane** of creep pathing.
- All lanes converge on the **Security System** (shared HP pool per team).
- If the Security System reaches 0 HP, the team loses.
---
## Builder Races
Each race has a unique tower roster, stats profile, and upgrade tree. All races are balanced around different timing windows.
| Race | Profile | Strengths |
|---|---|---|
| Ghost | High damage, low HP (glass cannon) | Early & late game |
| Fortress | Low damage, high HP + buffs/debuffs | Early & mid game |
| Phantom | Evasive, mixed melee/ranged | Mid & late game |
| Ancient | Slow, extremely high damage AoE | Late game |
Each race has roughly **812 towers** in a **tier tree**:
- Tier 1: base units (cheap, unlocked immediately)
- Tier 2: upgrades from Tier 1 (requires minerals + sometimes gas)
- Tier 3: capstone units (high cost, powerful)
Upgrading a tower **in place** morphs the sprite and updates stats.
---
## Towers / Fighters
Towers placed during build phase transform into **fighter units** during combat. Fighters are fully AI-controlled.
### Tower Data Fields
| Field | Type | Notes |
|---|---|---|
| id | String | Unique identifier |
| race | String | Builder race |
| tier | Int | 13 |
| cost_minerals | Int | Build cost |
| cost_gas | Int | Upgrade cost (0 for tier 1) |
| hp | Int | Fighter HP |
| armor_type | Enum | Light / Medium / Heavy / Unarmored |
| attack_type | Enum | Normal / Explosive / Concussive / Chaos |
| damage | Int | Base damage per hit |
| attack_speed | Float | Attacks per second |
| range | Float | Attack range in tiles |
| move_speed | Float | Fighter move speed |
| upgrades_to | String? | Next tier tower ID |
| strong_vs_waves | [Int] | Wave numbers this unit excels at |
### Armor/Attack Type Matrix (damage multipliers)
| | Normal | Explosive | Concussive | Chaos |
|---|---|---|---|---|
| Light | 100% | 75% | 150% | 100% |
| Medium | 100% | 100% | 75% | 100% |
| Heavy | 100% | 150% | 50% | 100% |
| Unarmored | 100% | 75% | 100% | 100% |
---
## Economy
### Minerals
- Passive income per round (base ~50, slight scaling).
- Bonus income earned cumulatively by **sending** units or upgrading the Security System.
- Spent on: building/upgrading towers.
### Gas
- Generated by **worker units** each round.
- Spent on: sends, Security System upgrades, supply cap raises.
### Workers
- Each player starts with a few workers.
- Build more workers early — aim for ~20 by wave 25.
- Workers cost minerals; balance worker vs. tower investment.
### Sends
- Spend gas to send bonus creeps into an opponent's lane (or self in solo).
- Each send type adds a permanent per-round income bonus.
- Send income is cumulative — early sending snowballs economy.
---
## Waves
31 total waves. Each wave definition:
| Field | Notes |
|---|---|
| wave_number | 131 |
| creep_type | Enum: Light, Armored, Mixed, Boss |
| creep_armor | Armor type |
| creep_count | Number of units |
| creep_hp | Base HP |
| creep_speed | Move speed |
| bounty | Minerals per kill |
- Waves 110: economy building phase, lighter creeps.
- Waves 1120: increasing pressure.
- Waves 2130: heavy creeps, economy should be near max.
- Wave 31: boss/final wave.
---
## Security System
- Shared team HP pool (e.g. 20 HP per player slot).
- Creeps reaching the exit drain 15 HP depending on type.
- Can be upgraded for gas (increases max HP and/or armor).
---
## Victory / Defeat
- **Win:** Survive all 31 waves with Security System HP > 0.
- **Lose:** Security System reaches 0 HP.
- Scored by: waves survived, sends sent, Security System HP remaining.
---
## Stretch Features (post-MVP)
- Chaos Mode (random race each round)
- Spectator mode
- Replay system
- Persistent leaderboard