Saw a post asking why nobody explains how they actually work with AI. Fair point. Here's my whole setup from a 3D mobile game I built over ~3 weeks (100 commits, shipped to Google Play). No game link until the very end, and only if you want it.
TL;DR
- Coding agent: Claude Code in the terminal (VS Code extension). It writes the GDScript, the Blender scripts, the shaders and the tooling.
- Engine: Godot 4, GDScript, Mobile renderer.
- 3D: Blender, driven by Python scripts run headless, plus the Blender MCP to look at things and iterate.
- Audio: a Python/numpy synth for one-shot SFX, plus processed CC recordings from Freesound for the engine, tyres and music.
- Version control: git, one tested feature per commit, so every step can be reviewed or thrown away.
- The real secret: a design doc the agent treats as law, a short rules file, and a loop where the agent runs the game itself before it reports back.
No Godot MCP. The agent just calls the Godot binary from the command line, and that's enough.
1. The GDD is the whole thing
Most "AI made my game" projects die around week 2 because the codebase turns to soup. Every prompt adds a feature, nothing remembers why, and the agent contradicts itself. The fix is boring: one design doc that is the single source of truth.
How I wrote it
I wrote the first version with the AI, but the decisions were mine. I gave it my reference games, the feel I wanted and my constraints (one thumb, mobile, 60 fps on a 2019 mid-range Android). Then I argued with it section by section. v1 had these sections:
1. Vision (one sentence + 5 pillars + reference games + target player)
2. Core loop
3. Controls
4. Car handling <- the "heart of the game" section, with every tunable and its start value
5. Road generation
6. Crashes / run end
7. Scoring
8. Progression & economy
9. Environment v1
10. Art bible
11. Audio
12. Screens & flow
13. Monetization
14. Analytics
15. Tech stack + exact folder structure
16. Build order (milestones)
17. Polish checklist (must all be true before shipping)
18. Explicitly OUT of scope
19. Post-launch roadmap (context only)
Three sections do most of the work:
- Pillars. "Feel over features", "one thumb", "a run is 20 to 90 seconds", etc. When the agent proposes something, I check it against those.
- Every tunable with a start value. e.g. drift grip, steer rate, camera height 7 m, distance 9 m, pitch 32Β°. The agent makes each one an
@export variable grouped with @export_group, so I tune in the inspector instead of prompting "make it a bit less floaty" 40 times.
- Out of scope. The list of things the agent must NOT build. Without it, it will happily add a multiplayer lobby.
How it stays alive
The rule: no change goes straight into code. Every request I make ("the car feels floaty", "this level has too many straights", "players say they lose without knowing why") first becomes a new numbered section in the doc, then gets built. The doc now has 100+ sections and ~2,400 lines. Later sections override earlier ones and say which ones they replace.
me: "players say they die and don't know why"
β
βΌ
agent writes Β§32 in GAME_DESIGN.md
(what changes, why, numbers, which older Β§ it overrides)
β
βΌ
I read it, push back, approve
β
βΌ
agent implements, runs the game, reports
β
βΌ
commit "Player feedback: ... (Β§32)"
Why bother: in a new session the agent has zero memory. The doc is its memory. It also gives you a commit history that reads like a changelog.
The rules file (CLAUDE.md)
Claude Code automatically reads a CLAUDE.md at the repo root every session. Mine is short, and these are the lines that matter:
GAME_DESIGN.md is the single source of truth. Read the relevant section before working.
Do not add features that aren't in it; ask before deviating from it.
## Stack
- Godot 4, GDScript only, typed where practical.
- Mobile renderer. Portrait 720x1280, stretch canvas_items/expand.
- Target 60 fps on a 2019-era mid-range Android.
## Art
- Flat-shaded low poly. One shared palette material (16x16 atlas, UVs point at a pixel).
- No textures beyond the palette, no normal maps, no PBR.
## Code
- Follow the folder structure in GAME_DESIGN.md Β§15 exactly.
- Every tunable is an @export variable (grouped with @export_group), with the design-doc start value.
- Small composable scenes; one responsibility per script.
## Workflow
- Build milestones in Β§16 order. Don't start the next until I sign off.
- Always run the project after changes (headless import + run) and fix every
error/warning before reporting back.
- After each step: short summary, how to run, 3-5 specific things to try for feel.
## Hard rules
- Never touch monetization/ads code without asking first.
- No features from the out-of-scope section.
The "3 to 5 specific things to try for feel" line is underrated. Instead of "done!", you get "hold left through the second hairpin and check that the exit doesn't snap", which tells you exactly what to test on the phone.
2. The art bible (yes, write one, even solo)
An art bible for an AI workflow isn't a mood board. It's a list of rules the agent can follow and check. Mine is about 10 lines:
- Style: flat-shaded low poly. No textures except one 16Γ16 palette image. No normal maps, no PBR.
- Palette: 8 named core colours with hex codes (white, Majorelle blue, terracotta, ochre sand, sea teal, sky gold, asphalt, dark shade), later extended to a few dozen.
- Shapes: boxy, friendly, slightly exaggerated. Cars have big wheels and short overhangs.
- Camera: exact numbers (height, distance, pitch, FOV, yaw lag, tilt into drift). Locked, no player control.
- FX: what smoke is made of (faceted low-poly spheres, max N per wheel, 1.2 s life), how long skid marks last.
- UI: one rounded font, white with blue accents, no gradients, no drop shadows.
The key: "Done when a screenshot looks like the concept art" is the exit criterion of the art milestone. That gives the agent (and you) something to compare against instead of "make it prettier".
Why one palette texture
Every mesh's UVs point at the centre of one pixel in a 16Γ16 image. So:
- The whole game uses one material. Big draw-call/batching win on mobile.
- Colours stay consistent automatically. You can't accidentally get 14 slightly different reds.
- The agent can recolour anything by changing a colour name in a script. No UV unwrapping, no texture painting.
3. Placeholders first? Yes, aggressively
My milestones (each ends in something playable, and I sign off before the next):
M0 Skeleton project settings, autoloads stubbed, grey plane, cube car that moves
M1 Car feel full handling model, grey endless road, sphere "smoke", skid marks
-> iterate until a 90Β° corner feels great. Add touch input.
M2 Loop crashes, scoring, results screen, instant restart, save best score.
-> it's now "a game". Test on phone. Tune difficulty.
M3 Art pass palette, sky/sea shaders, lighting, props, car #1, camera final
-> done when a screenshot looks like the concept art
M4 Progression coins, garage, 8 cars, save system
M5 Juice/audio SFX, music, popups, screen shake, slow-mo crash, haptics
M6 Ship ads, consent, analytics, icon, store assets, signed build, playtest
Through M0 to M2 the game is literally a cube on a grey road. I spent most of the "feel" time there, because no art fixes a car that handles badly. M0 to M5 took about one day of agent time. The remaining weeks were feel tuning, content and phone performance.
Look tests outside the game. When I wasn't sure about the visual direction, I had the agent build throwaway "sandbox" scenes: a hand-made coast level, an endless corridor street in a pastel city, the same corridor on a hillside at golden hour. I played them, picked one direction, wrote it into the doc, and the agent rebuilt every level that way and deleted the sandboxes (they're still in git history). It's cheap with AI and saved me from polishing the wrong idea.
4. Where do references come from
- Reference games go in the GDD's vision section by name, with what to take from each: one for loop/simplicity, one for art and car collection, one for polish and road variety. I watch gameplay videos and take screenshots for my own eyes. The agent never sees copyrighted art as an asset.
- One concept art image set the target. The palette hex codes were sampled from it. [Say here how you made yours: drew it, an image generator, a paint-over, etc.]
- Real-world references: for a setting based on a real place, I described concrete things (blue-and-white walls, arches, zellige tiles, petit taxis, a seafront promenade) instead of feeding images. The low-poly style forgives a lot as long as the shapes and colours read right.
- For other people's models: Poly Pizza (CC0, Quaternius etc.), recoloured to my palette by script. A
CREDITS.md next to the source files lists each model, author, licence and link.
5. The 3D pipeline: models as code
This is the part I'd push hardest. Every model in the game is a Python script. No .blend files to babysit.
tools/blender/palette.py βββββββββββββββ
(list of named colours = the truth) β run once
βΌ
assets/textures/palette.png (16x16 atlas)
scripts/data/palette.gd (same colours for Godot code/UI)
tools/blender/lowpoly.py (tiny modelling kit: box, cylinder, rock, polygon;
β every face gets UVs pointing at a named palette pixel)
βΌ
tools/blender/build_cars.py
tools/blender/build_props.py blender -b -P build_x.py
tools/blender/build_street.py ββββββββββββββββββββββββββββββΆ assets/models/*.glb
tools/blender/build_alpine.py (headless, no UI) β
(imports CC0 models, recolours) β
βΌ
Godot import, ONE shared palette material
applied to every mesh (materials not exported)
The modelling is plain function calls (simplified example):
car = Part("taxi")
car.box((1.7, 3.6, 0.55), loc=(0, 0, 0.55), color="taxi_red")
car.box((1.5, 1.8, 0.5), loc=(0, -0.2, 1.05), color="cream",
top=(0.8, 0.7)) car.cyl(0.38, 0.3, loc=(0.85, 1.1, 0.38), color="black",
rot=(0, 90, 0), segments=8) ...
export_glb([car.build()], "assets/models/cars/taxi.glb")
Why this beats clicking around in Blender (or asking an MCP to click for you):
- Reproducible. Change the palette or the kit, rerun, and all 16 cars update.
- Diffable. "Make the taxi rounder" is a 3-line diff I can review.
- The agent is good at it. LLMs are much better at writing geometry code than at operating a GUI.
- Conventions are written down at the top of the kit: 1 unit = 1 m, ground at z = 0, props face -Y, cars face +Y, and how glTF converts to Godot's Y-up. That kills the "everything imports rotated 90Β°" class of bugs.
Where the Blender MCP fits
I use the Blender MCP (it lets Claude run Python in a live Blender and take screenshots of the viewport) for the exploration phase:
- Agent builds a rough version live in Blender via the MCP.
- It screenshots it ("look"), I look, we iterate on proportions.
- When it's right, the agent moves the code into a
build_*.py script. The MCP session is a sketchpad. The script is the real asset.
It can also search Poly Haven / Sketchfab / Poly Pizza from the MCP. Handy for finding a CC0 cow or pine tree, which then goes through the recolour script like everything else.
6. Audio pipeline
tools/audio/synth.py (numpy, fixed seeds)
score tick, chimes, whoosh, crash, coin, UI taps... βββΆ oggenc βββΆ assets/audio/sfx/*.ogg
tools/audio/recordings/build.py
downloads CC recordings from Freesound (cached outside the repo)
engine: real exhaust recording cut into 5 constant-RPM loops,
pitch tracked and flattened per band, crossfaded in game by revs
tyres: steadiest stretch of a squeal, high-passed, looped
music: licensed track, levelled to -16 LUFS
βββΆ assets/audio/... + CREDITS.txt (author, licence, link, what was changed)
Lesson learned: synthesized SFX are great for UI blips and chimes. A synthesized engine sounded like a mosquito at top speed. Real recordings, cut properly, fixed it in an afternoon. AI is very good at writing the DSP glue (pitch tracking, loop points, normalisation) once you give it a decent source.
7. The verification loop (why the agent doesn't ship broken stuff)
The agent can't see or feel your game. So give it eyes that are logs.
agent edits code
β
βΌ
godot --headless --path . --import # catches broken scripts/resources
godot --headless --path . --quit-after N # runs the real game, reads errors/warnings
β
βββ errors? βββΆ agent fixes, reruns (it does this on its own)
βΌ
autopilot bot (headless): plays the real game run after run for 10 min,
logs fps / memory / node count every 20 s βββΆ catches leaks + crashes
βΌ
perf bot ON THE PHONE (debug APK + adb):
logs frame pacing, draw calls, per-system timings,
can switch effects off one by one (--no-smoke, --no-sky, ...)
βΌ
me: play on the phone, try the 3-5 things it listed
The perf bot was the biggest single win. The editor said 60 fps. My phone said ~35. With per-system timings from a real device, the agent found the actual culprits (a full-screen grading pass, skid mark meshes that grew more expensive over a run, chunk dressing all in one frame) and got it to 57+ fps on a Redmi Note 12 Pro. Without numbers from the device, it was just guessing.
The same bots drive the store assets: scripts render the icon, take the store screenshots from the locked camera, and record the trailer clips straight from the game. No manual screen recording.
8. Git: one feature, one commit
Git is what lets you move fast with an agent without being scared of it. An agent can touch 15 files in one go. Without git, a bad idea leaves the project half-broken and you can't tell which part to undo.
My rules:
- Commit after every finished, tested step. Agent implements β game runs clean β I try it on the phone β commit. Never two features in one commit.
- The commit message names the design doc section. e.g.
M2: run loop with crashes, scoring and results, Player feedback: speed ramp, crash reason, softer sidewalk (Β§32). Doc, code and history all point at each other, and git log reads like a changelog.
- The agent writes the commit, I review the diff.
git diff before committing is where I catch "wait, why did it change the save system?". If a diff touches files that have nothing to do with the feature, something went wrong.
- Bad direction = throw it away.
git checkout . or git revert costs nothing. I tried things I'd never have tried by hand because undoing was free, e.g. one world got a new mountainside road, the ledges floated at hairpins, so the next commit was "back to its previous street, keeping the sky mountains".
- Throwaway stuff gets a
TEMP: prefix. Debug-only shortcuts (every car unlocked, a sandbox as the default level) are committed as TEMP: ... so they're easy to find and remove before a release.
- Deleted experiments stay recoverable. The look-test sandboxes from section 3 were deleted from the project, but they're still in git history if I ever need them.
- Release commits carry the version. e.g.
1.1.0 (code 5): ... so I always know which commit is on the store.
feature request
β
βΌ
doc section (Β§N) βββΆ agent implements βββΆ headless run clean βββΆ phone test
β
good βββββββββββββββββ΄βββββββββββΆ bad
β β
βΌ βΌ
review diff, commit "β¦ (Β§N)" git checkout . / git revert
(try again or drop it)
I worked on a single main branch since it's solo and every commit is small and tested. If you're less strict about testing before committing, use a branch per feature and merge when it's good.
9. What AI is bad at (honest list)
- Feel. It cannot feel a drift. Handling, camera lag and difficulty need you holding a phone, and exported tunables so you can change them without a prompt.
- Taste. It will make something look fine. It won't make it look good without a concrete target (concept art, palette, numbers).
- Performance on real hardware. It's confident and wrong until it has device measurements.
- Remembering. Every session starts from zero. If it isn't in the GDD or CLAUDE.md, it doesn't exist.
- Scope. Left alone it adds features. The out-of-scope list and "ask before deviating" stop that.
10. If you're starting tomorrow
- Write the GDD with the AI, but you decide. Include pillars, tunables with numbers, folder structure, milestones and an out-of-scope list.
- Write a 30-line
CLAUDE.md that says the GDD is law and the agent must run the game before reporting.
- Grey-box until the core verb is fun on the actual device.
- Write a 10-line art bible with a palette and a "done when it looks like X" target.
- Models, audio and store assets as scripts. Use the MCP to sketch, scripts to keep.
- Give the agent eyes: headless runs, a bot that plays the game, perf logs from the phone.
- Every change goes into the doc first.
- One feature, one tested commit. Review the diff and throw away anything that doesn't work.
Happy to go deeper on any part (the handling model, procedural road generation, the low-poly kit, the perf bot). If anyone wants to see the result, I can drop the link in the comments.
The game this all came from is Smoke Streets, a one-thumb low-poly drifting game set in different environments: https://play.google.com/store/apps/details?id=site.akkaris.smokestreets
Feedback welcome, especially on the feel.