DEV Community

Cover image for I built a SimCity where five AI mayors run the city, and you just watch
Kunal
Kunal

Posted on

I built a SimCity where five AI mayors run the city, and you just watch

GridFall is a 3D city builder where you don't build anything. Five AI mayors do.

Each mayor runs on a different model and owns one district of the same city. Every game day they read the map, argue in public, propose laws, vote, build roads and power plants, raise or cut taxes, and expand into the wilderness. When a disaster hits (and an AI "Chaos Director" makes sure one does), they have to deal with it. You watch, inspect anything, and step in when you want to.

GridFall on day 12: a Chaos Director banner announces that a pressurised sewage main has burst. Mayor DeepSeek-V4's speech bubble over the city reads
Day 12. The Chaos Director has burst a sewage main, and each mayor answers in its own voice.

It's open source, made with Godot 4.7 and Blender, and it runs offline out of the box (no API key needed). If you like it, a ⭐ on the repo helps a lot:

GitHub logo KunalSiyag / gridfall

A SimCity-style city run by 5 GMI Cloud AI mayors and ~100 AI residents. Godot 4, built with Factory AI Droid.

GridFall — a SimCity-style city run by GMI Cloud AI

GridFall is a 3D SimCity-style city builder made with Godot 4.7 (Forward+), Blender, GMI Cloud inference and ACE-Step 1.5 audio. You don't build the city. Five autonomous AI mayors do, each running on a different GMI Cloud model. Every other layer of the city also has a GMI model behind it. You watch, inspect and intervene.

GridFall was built with Factory's Droid coding agent, which wrote the Godot code, the Blender asset pipeline and the tests. Every mayor, resident and city agent runs on GMI Cloud inference.

The AI city

Role Model What it does
Mayor Argon-4 (NW Civic Campus) google/gemini-4-argon Utility-first planner
Mayor DeepSeek-V4 (NE Tech Corridor) deepseek-ai/DeepSeek-V4-Flash-0731 Systems engineer
Mayor Kimi-K3 (Central Plaza) moonshotai/kimi-k3 Coalition builder
Mayor Qwen-3.8 (SW Eco Quarter) Qwen/Qwen3.8-Max Fiscal pragmatist
Mayor Grok-4.5 (SE Boomtown) x-ai/grok-4.5 Growth maximalist
Citizen Voices MiniMaxAI/MiniMax-M3 Residents
…

(Built with heavy AI assistance. Details at the end.)

Who runs the city

Every role in the city is an AI agent with its own model (on GMI Cloud inference):

Role What it does
5 mayors (Gemini, DeepSeek, Kimi, Qwen, Grok) Each runs one district with its own style: utility-first planner, systems engineer, coalition builder, fiscal pragmatist, growth maximalist
About 100 residents Decide each day whether to go to work, how to commute, where to spend, whether to protest, and whether to move away
GridFall Gazette Writes a daily newspaper and editorial
Council Speaker Rules on the ordinances the mayors propose and vote on
Chaos Director Picks disasters that test each city's real weak spots
Grid Operator Decides who loses power first in a blackout
Street Inspector Click any tile, and whoever is standing there tells you what's wrong

Once a day, each mayor gets an ASCII map of its district, the stats, open lots, land it can annex, yesterday's results, the other mayors' posts, letters from its residents and the morning headline. It replies with JSON: a private thought, a public post, up to seven actions, a law to propose and its votes. The simulation checks every action and rejects invalid ones with a reason, which the mayor reads the next day. You can read every private thought, so you see why a mayor did something, not just what it did.

The city underneath

The AI only makes decisions. A real simulation decides what happens next:

  • Zoning and growth: residential, commercial and industrial demand, three density levels, land value, traffic, pollution and crime maps.
  • Utilities: a power network with load shedding (coal, solar, wind), water pumps, sewage and garbage.
  • Services and big projects: police, fire, hospitals, schools, parks, plus a stadium, train station, university and airport.
  • Budgets and laws: a budget for each district and 10 citywide ordinances.
  • Disasters: fire, blackout, sewage burst, gridlock, smog, earthquake, flood and tornado.

Incidents never end on a timer. A broken water main stays broken until residents with the right skills and paid city crews put in enough work to fix it. Fire trucks, ambulances and police drive the road network from the nearest station, with sirens.

A building fire in GridFall: flames rise from a brick building inside an orange coverage ring, while fire trucks park on the street outside
A fire. Crews drive in from the nearest station and stay until the work is done.

Buses stop at stops that appear next to homes and shops, delivery and garbage trucks run their routes, boats sail the river, and planes take off from the airport.

A GridFall neighbourhood: red and white buses on the main road, a white truck, wind turbines behind the houses and coloured zone lots

Nothing appears instantly

Every build order opens a construction site that goes through real stages: clearing, excavation, foundation, frame and finishing. Machines work it (excavators, dump trucks, cement mixers, tower cranes), and you can watch it fill in: trees come down, the pit widens, rebar goes in, the slab pours, the frame rises floor by floor.

Builds take realistic time. A house takes about two days, a tower six, a stadium twelve and an airport fifteen. Residents with construction skills help on the nearest site and get paid for it, and the mayors plan around the wait.

Three construction sites: an excavator in a dirt pit with spoil heaps, a dump truck and loader on a cleared lot, and a cement mixer next to a freshly poured slab

A frontier to grow into

The city starts at 32×32 tiles in the middle of a 192×192 world of forests, lakes and river. Mayors annex new land one 16×16 plot at a time, competing with each other for it. Surveyors map the land just past the border, and everything further out sits under a haze that lifts as the city grows. Only claimed land is simulated every tick, so the big world stays cheap: about 60 fps on my RTX 3050 laptop.

GridFall zoomed out on day 4: the small city sits in a clear patch of forest, the land around it is dimmed, and the rest of the world fades under a pale haze
Day 4, fully zoomed out. The rest of the world waits under the haze.

When the AI is down, the city keeps going

Every AI call falls back in order: a live model response, then a replay cache of real recorded responses (22 game days are included in the repo), then a hand-written heuristic for that role. The UI shows which one answered every call. That's also why you can play without any API key.

Run it yourself

You need Godot 4.7. Then:

git clone https://github.com/KunalSiyag/gridfall.git
cd gridfall

# First run only: import the models and textures (a few minutes)
godot --headless --path . --import

# Play offline: recorded AI responses + heuristics, no API key needed
GRIDFALL_OFFLINE=1 godot --path .
Enter fullscreen mode Exit fullscreen mode

To run the mayors live, set GMI_API_KEY and start it without GRIDFALL_OFFLINE. I checked these steps on a fresh clone: the import finishes and the offline smoke test passes.

Controls: WASD to pan, mouse wheel to zoom, right-drag to rotate, Space to pause, 1–4 for speed. The Disasters tab lets you drop an earthquake or a tornado on any tile, and the Powers tab lets you send a decree to every mayor.

What's next: multiplayer

The next big step is multi-city multiplayer. Several cities on one shared world, each player's mayor running on the model and API key that player brings. Same frontier, same land grabs, same disasters, but now the mayor next door belongs to someone else.

If you want to see that happen, ⭐ star the repo and follow me here on DEV. I'll post when it lands.

GridFall at night: the districts lit up, glowing windows in the towers and street lamps along the roads

How this was built

GridFall was built with Factory's Droid coding agent, which wrote the Godot code, the Blender asset pipeline and the tests, while I set the direction and reviewed the results. The 3D models are procedural Blender geometry with Poly Haven CC0 textures, plus some Kenney CC0 kits. This post was drafted with AI too, and I reviewed it.

If you're into agent-run worlds, Settlement takes a similar view on showing why each agent acted, and 100 LLM agents running a town economy is a great read on what breaks when agents run an economy for months.

Questions, ideas for the multiplayer version, or a disaster you'd like the Chaos Director to have? Leave a comment.

Top comments (0)