{"id":50137675,"url":"https://github.com/codewithagents/loopolis-city-builder","last_synced_at":"2026-05-23T23:07:14.060Z","repository":{"id":359565084,"uuid":"1246654027","full_name":"codewithagents/loopolis-city-builder","owner":"codewithagents","description":"A SimCity-style indie city builder built with C# + Godot 4. Developed with AI agents.","archived":false,"fork":false,"pushed_at":"2026-05-22T16:30:31.000Z","size":894,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T17:54:26.154Z","etag":null,"topics":["game","simcity","simulation"],"latest_commit_sha":null,"homepage":"https://www.codewithagents.de","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codewithagents.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-22T12:13:02.000Z","updated_at":"2026-05-22T16:30:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/codewithagents/loopolis-city-builder","commit_stats":null,"previous_names":["codewithagents/loopolis-city-builder"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/codewithagents/loopolis-city-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithagents%2Floopolis-city-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithagents%2Floopolis-city-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithagents%2Floopolis-city-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithagents%2Floopolis-city-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewithagents","download_url":"https://codeload.github.com/codewithagents/loopolis-city-builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithagents%2Floopolis-city-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33415032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"ssl_error","status_checked_at":"2026-05-23T22:14:43.778Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game","simcity","simulation"],"created_at":"2026-05-23T23:07:13.347Z","updated_at":"2026-05-23T23:07:14.054Z","avatar_url":"https://github.com/codewithagents.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Loopolis\n\n\u003e A SimCity-style city builder where every decision has visible, mechanical consequences.\n\n**Plan → Build → Zone → Watch → React → Expand → repeat**\n\nPlace a power plant, run roads, zone land — watch your city grow or collapse based on the systems you've built. Small enough to be approachable in five minutes, deep enough to keep you planning for hours.\n\n---\n\n## What makes it interesting\n\n- **Power as a density unlock** — basic cottages grow without power; townhouses, apartments, and commercial strips need the grid connected. You feel the moment electricity arrives.\n- **Services shape happiness** — Fire stations, police, schools, and hospitals each have real road-graph coverage radii. A neighborhood without a school shows it.\n- **Era Charters** — at Town (500 pop), City (5 000 pop), and Metropolis (25 000 pop) you pick one of three permanent specializations. Merchant → Trade Corridors → Empire of Steel locks in a commercial identity for the whole run. Green Canopy → Green Utopia means pollution simply stops mattering. 27 distinct paths per scenario.\n- **Events that demand decisions** — fires burn buildings down if you don't pay to intervene. Crime waves tank happiness. Power outages cascade. Every 60 ticks of calm ends.\n- **Organic building growth** — you zone land; the simulation decides what grows. A 1×1 house upgrades to a 2×2 townhouse upgrades to a 4×4 apartment — if you've built what it needs.\n\n---\n\n## Systems\n\n| System | Description |\n|---|---|\n| Power Network | BFS flood-fill from plants; roads and power lines conduct |\n| Population | Road-adjacent growth; density unlocked by power |\n| Commercial \u0026 Industrial | Activity-based; adjacency demand boosts |\n| Pollution | Tile-level emission; happiness penalty per residential tile |\n| Happiness | Service coverage, neglect decay, commute penalty, tax modifier, park bonus |\n| Events | Fire, crime, power outage, demand slump — player intervention for $600–$1500 |\n| Era Charters | 3 × Town + 3 × City + 3 × Metropolis = 27 permanent run identities |\n| Policies | GreenCity / IndustrialHub / CommercialBoost / OpenCity — active modifiers |\n| Service Fatigue | Capacity degrades over time; renovation decisions at City scale |\n| Land Value | Per-tile float; plateaus, forests, parks, power, happiness all contribute |\n| Road Traffic | Dijkstra worker routing; real edge load; chokepoints visible |\n| Save / Load | Full round-trip: charters, fatigue, milestones, road graph all persisted |\n\n**1 025 tests · 0 failures**\n\n---\n\n## Architecture\n\n```\nsrc/Loopolis.Core/        — Pure C# simulation. Zero Godot dependencies.\nsrc/Loopolis.Runner/      — Headless CLI runner + persistent IPC server.\ntests/                    — NUnit test suite (~10s full run).\ngodot/                    — Godot 4 presentation layer (renderer, UI, input).\n  shared/                 — File-based IPC: state.json ← Runner, command.json → Runner\n```\n\nThe simulation is a self-contained C# library. Godot reads state and renders it. The two layers communicate through JSON files — which also means agents and scripts can drive the simulation without opening the editor.\n\n---\n\n## Getting started\n\n**Requirements**\n- [.NET 10 SDK](https://dotnet.microsoft.com/download)\n- [Godot 4.4.1 .NET edition](https://godotengine.org/download)\n\n**Run tests**\n```bash\ndotnet test\n```\n\n**Play (standalone — Godot runs its own simulation)**\n```bash\nDOTNET_ROOT=/path/to/dotnet \\\n  /path/to/Godot_mono \\\n  --path godot/ --editor\n# Open scenes/World.tscn → F5\n```\n\n**Play (server + viewer — simulation runs headless, Godot connects)**\n```bash\n# Terminal 1\ndotnet run --project src/Loopolis.Runner -- server default --speed 2\n\n# Terminal 2\nDOTNET_ROOT=/path/to/dotnet \\\n  /path/to/Godot_mono \\\n  --path godot/ --editor\n# Open scenes/World.tscn → F5\n```\n\n---\n\n## Controls\n\n| Key | Action |\n|---|---|\n| Click tile | Place selected zone |\n| Middle-drag | Pan camera |\n| Scroll | Zoom |\n| P | Pause / Resume |\n| B | Toggle Advisor Bar |\n| V | City stats panel |\n| M | Minimap |\n| Ctrl+S / Ctrl+L | Save / Load |\n| ? | All shortcuts |\n\n---\n\n## Headless / agent control\n\nThe runner accepts JSON commands over a shared file channel — no Godot required:\n\n```bash\ndotnet run --project src/Loopolis.Runner -- server default --speed 10 \u0026\nSESSION=$(grep 'session=' /tmp/loopolis.log | head -1 | sed 's/.*session=//')\n\n# Place tiles\necho \"{\\\"cmd\\\":\\\"place_zone\\\",\\\"x\\\":16,\\\"y\\\":15,\\\"zone\\\":\\\"Road\\\",\\\"sessionId\\\":\\\"$SESSION\\\"}\" \\\n  \u003e godot/shared/command-${SESSION}.json\n\n# Skip 500 ticks (stops early on events or milestones)\necho \"{\\\"cmd\\\":\\\"skip\\\",\\\"ticks\\\":500,\\\"pauseAfter\\\":true,\\\"sessionId\\\":\\\"$SESSION\\\"}\" \\\n  \u003e godot/shared/command-${SESSION}.json\n\n# Select a charter once the Town milestone fires\necho \"{\\\"cmd\\\":\\\"select_charter\\\",\\\"charter\\\":\\\"Merchant\\\",\\\"sessionId\\\":\\\"$SESSION\\\"}\" \\\n  \u003e godot/shared/command-${SESSION}.json\n```\n\nState is always available at `godot/shared/state-${SESSION}.json` — population, balance, happiness, charter state, building list, events, and more.\n\n---\n\n## Built with AI agents\n\nLoopolis is developed at **[CodeWithAgents.de](https://www.codewithagents.de)** — a project exploring what software looks like when AI agents are first-class collaborators, not just autocomplete.\n\nEvery feature in this repo was designed, implemented, tested, and reviewed through an agentic workflow: a planning agent designs the feature, a simulator agent writes the C# and tests, a reviewer agent checks the diff, a release agent creates the PR, a balancer agent runs scenarios and checks the numbers, and a player agent plays the game and reports what feels wrong.\n\nThe headless IPC architecture exists specifically so agents can play and evaluate the simulation without human involvement.\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithagents%2Floopolis-city-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithagents%2Floopolis-city-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithagents%2Floopolis-city-builder/lists"}