DEV Community

salvo10f
salvo10f

Posted on

I gave an AI agent one prompt and it built a living city in Godot 4

I've been building games in Godot for a while. Recently I started using AI coding agents (Claude Code, Cursor) to speed things up. They're good at writing GDScript, but they have a fundamental problem: they can't see what they're doing.
The agent writes code, you run the game, something is broken, you describe the problem back to the agent, it tries again. Back and forth. Sometimes for hours on simple placement issues.
So I built something to fix that.
The problem with blind agents
If you tell an AI agent "place a shelf near the printer", it guesses coordinates. Maybe (2, 0, 0). That's inside a wall. So you tell it to move. It tries (3, 0, 0). Now it's floating. You go back and forth 10 times before it lands somewhere reasonable.
The agent has no idea where things are in your scene. It doesn't know where the walls are, where the floor ends, what's already placed. It's writing code with a blindfold on.
What if the agent could actually understand your scene?
I built an MCP server called GodotIQ that gives AI agents spatial awareness. Instead of guessing, the agent calls scene_map and gets back a full map of every node in the scene with positions, distances, and bounds. Then it calls placement with constraints like "near the printer, not inside walls, on the navmesh" and gets back valid coordinates on the first try.
But spatial intelligence is just one piece. The agent also needs to understand how code connects across files. Which scripts depend on which. What happens when you change a signal. Where data flows from the database to the UI. That's the stuff that takes a human developer 30 minutes of grep to figure out.
The city test
I wanted to stress test the whole system. I downloaded three Kenney city kits (roads, suburban buildings, commercial buildings), pointed the agent at the asset folder, and gave it one prompt:
"Build a small city with roads, buildings, a park, moving cars, and a day/night cycle."
No step by step instructions. No hand holding. Just that.
Here's what happened.
The agent started by scanning all the assets with asset_registry. Found 160+ models across three kits. Then it called scene_map to understand the empty scene, placed a ground plane, and started building roads using build_scene with a grid pattern. 41 tiles in one call.
Then it placed buildings. Suburban houses on the west side, commercial skyscrapers on the east. Used spatial_audit to check for overlaps. Zero issues.
Then it added a park with a fountain and benches. Wired up 5 cars with Path3D routes. Added traffic lights with red/green cycling. Wrote a day/night controller that shifts the sky color, toggles building window lights, street lights, and car headlights.
The part that surprised me
After building everything, the agent ran the game and took a screenshot. It looked at the screenshot and said "the road tiles at corners don't connect properly, some are rotated wrong." It fixed the rotations itself. Then took another screenshot to verify.
It did the same with the cars. Noticed they were sliding sideways instead of facing forward along their paths. Fixed the PathFollow3D rotation mode. Verified again with a screenshot.
When night came in the day/night cycle, it checked that building lights actually turned on. They did. It checked that car headlights were visible. They were.
This is the part that got me. The agent wasn't just writing code that compiles. It was verifying that things looked right visually and worked correctly at runtime. Like a human developer would.
How it works technically
GodotIQ is an MCP server. MCP is a protocol that lets AI agents call tools. You install it with pip:
`pip install godotiq`
Add it to your AI client config:
`json{
"mcpServers": {
"godotiq": {
"command": "uvx",
"args": ["godotiq"],
"env": {
"GODOTIQ_PROJECT_ROOT": "/path/to/your/godot/project"
}
}
}
}`
`plaintext

Works with Claude Code, Cursor, Windsurf, VS Code Copilot, and any MCP client.

There are 35 tools total. 22 are free, covering the basics: scene editing, running the game, taking screenshots, simulating input, checking for errors. The other 13 are the intelligence layer: spatial analysis, dependency graphs, signal flow tracing, convention validation. Those require a Pro license.

The free tools alone are already more capable than most Godot MCP servers out there, because the agent can actually run the game, look at screenshots, and verify its own work. The intelligence tools take it further by giving the agent deep understanding of your project's architecture.

What it can't do

I want to be honest. It can't one-shot a complete game from a single prompt. Complex game logic, tight gameplay loops, nuanced game feel, that's still human territory.

What it can do is handle the mechanical work. Scene setup, node placement, wiring signals, creating UI, testing that things work. The boring stuff that eats hours of your day.

I've been testing it on an existing project with 118 scripts and 84 scenes. The agent mapped the entire codebase, found 4 orphan signals nobody knew about, traced a data flow across 8 files in seconds, and produced 668 code warnings with suggested fixes. That would have taken days manually.

Try it

22 tools free, no account needed.

pip install godotiq`

Full docs and Pro info at godotiq.com

The code for the Godot addon is on GitHub: github.com/salvo10f/godotiq

Still iterating. Feedback welcome.

Top comments (0)