Copy everything below the line into Claude Code / your AI agent. Adjust the Tech Choices section first if you prefer GDScript over C#.
You are an experienced Godot 4 game developer. Build a minimal colony simulation game inspired by RimWorld's core loop. Work in small, testable increments — after every phase the project must run without errors.
- Engine: Godot 4.3+ (Mono/.NET build)
- Language: C# (.NET 8), idiomatic modern C# (pattern matching, records for data)
- Rendering: 2D top-down,
TileMapLayerfor terrain, simple coloredSprite2Dplaceholders (no art assets — useColorRect/generated textures) - Architecture:
- Composition over inheritance; Godot nodes for presentation, plain C# classes for simulation logic
- A central
GameManagerautoload (singleton) owning the tick loop and job dispatcher - Simulation runs on a fixed tick (e.g. 10 ticks/sec), decoupled from render framerate
- No external dependencies beyond Godot itself
- Map: 64×64 tile grid. Tile types: grass, dirt, water (impassable), tree (resource), rock (resource). Randomly generated with simple noise.
- Colonists: 3 pawns. Each has:
- Needs: Hunger and Rest (0–100, decay over time)
- A simple state machine:
Idle → SeekJob → MovingToTarget → Working → Idle - A* pathfinding on the tile grid (use Godot's built-in
AStarGrid2D)
- Job system (the heart of the game):
- Global priority-ordered job queue:
Eat>Sleep>Build>Chop/Mine>Haul - Jobs are claimed by one colonist, released on failure/completion
- Needs above a threshold auto-generate personal jobs (eat when hunger > 70)
- Global priority-ordered job queue:
- Resources & hauling: Chopping trees drops Wood, mining rocks drops Stone. Items lie on the ground; haul jobs bring them to a stockpile zone.
- Building: Player designates blueprints (wall, bed, table) via a build menu. Blueprints require wood delivered to them, then a colonist performs work to complete them.
- Player interaction:
- Left-click drag: designate trees to chop / rocks to mine / stockpile zone
- Build menu (simple UI bar) to place blueprints
- No direct pawn control — pawns act only through the job system (RimWorld-style)
- UI: Per-colonist need bars, resource counters (wood/stone), current-job label, game speed controls (pause / 1x / 3x).
- Food loop: Berry bushes on the map; harvesting gives food items; colonists eat from stockpile or ground.
Combat, raids, animals, temperature, mood/mental breaks, medical, skills/traits, research, save/load, sound, art, multiplayer, mods, z-levels.
- Phase 1 — World: Project setup, tile map generation with noise, camera pan/zoom (WASD + scroll).
- Phase 2 — Pawns & movement: Spawn 3 colonists,
AStarGrid2Dpathfinding, click-to-move debug command (removed later). - Phase 3 — Job system core: Job queue, claiming, state machine. First job type:
ChopTreevia drag-designation. Tree disappears, wood item spawns. - Phase 4 — Needs: Hunger/rest decay, need bars UI,
Eat(berry bushes) andSleep(sleep on ground for now) jobs auto-generated from thresholds. - Phase 5 — Stockpiles & hauling: Stockpile zone designation, haul jobs, resource counter UI.
- Phase 6 — Building: Blueprint placement, material delivery, construction work, walls block pathfinding, beds improve rest recovery.
- Phase 7 — Polish: Game speed controls, mining, tables (eat at table = faster), small bug pass.
- Every phase ends with a runnable game — never leave the project broken between phases.
- Simulation state (needs, jobs, inventory) lives in plain C# classes, testable without the scene tree.
- Keep files under ~300 lines; split by responsibility (
JobSystem.cs,Pawn.cs,MapGenerator.cs, …). - Prefer Godot built-ins (
AStarGrid2D,TileMapLayer, signals) over hand-rolled systems. - Comment the why on non-obvious decisions (tick loop, job claiming), not the what.
- After each phase, summarize: what was built, how to test it manually, known limitations.
Begin with Phase 1. Before writing code, briefly confirm the project structure (folders, autoloads, main scene) you intend to use.