Swarm¶
Top-down arena shooter: survive waves of drones with a pooled bullet system and deterministic spawns.
Fly with WASD, aim with the mouse and hold the left button (or Space) to fire. Clear five waves to hold the arena; three hits and the hull is gone. R restarts.
tools/run.sh swarm # play
tools/check.sh swarm # import, load and lint
tools/test.sh swarm # headless tests
tools/smoke.sh swarm # windowless boot
tools/verify.sh swarm # all three
What it exercises¶
Swarm exists to put four pieces of the framework under load at once:
| Framework piece | Where it is used |
|---|---|
Session |
scripts/game.gd -- waves survived are objective progress, kills are score, the hull is the failure budget. |
ObjectPool |
scenes/main.tscn BulletPool -- every shot is acquired, and released on a hit or at the arena edge. The pool's max_size is a hard ceiling on live bullets. |
StateMachine |
scripts/enemy.gd -- spawning, chase, attack, dead, stepped from _physics_process. |
Rng |
scripts/wave_planner.gd -- a wave is a pure function of the seed and the wave number, so a seed replays a run. |
Layout¶
scenes/ main.tscn (the arena), ship.tscn, enemy.tscn, bullet.tscn, ui/hud.tscn
scripts/ arena.gd, ship.gd, enemy.gd, bullet.gd, wave_planner.gd, game.gd, ui/hud.gd
resources/ drone.tres and brute.tres, two EnemyStats instances
assets/ generated by `python3 tools/gen_assets.py swarm`
tests/unit/ the headless suite
Both enemy kinds share scenes/enemy.tscn and differ only by their EnemyStats resource, which is what lets WavePlanner compose a wave out of kind names without touching the scene tree.
Physics layers (project.godot [layer_names]): 1 world, 2 player, 3 pickups, 4 triggers, 5 enemies, 6 player_bullets, 7 enemy_bullets.
The framework lives in addons/godotgo, symlinked to framework/addons/godotgo.