337 points · by htdt · 8mo ago · 205 comments
Getting LLMs to reliably generate functional games required solving three specific engineering bottlenecks:
1. The Training Data Scarcity: LLMs barely know GDScript. It has ~850 classes and a Python-like syntax that will happily let a model hallucinate Python idioms that fail to compile. To fix this, I built a custom reference system: a hand-written language spec, full API docs converted from Godot's XML source, and a quirks database for engine behaviors you can't learn from docs alone. Because 850 classes blow up the context window, the agent lazy-loads only the specific APIs it needs at runtime.
2. The Build-Time vs. Runtime State: Scenes are generated by headless scripts that build the node graph in memory and serialize it to .tscn files. This avoids the fragility of hand-editing Godot's serialization format. But it means certain engine features (like `@onready` or signal connections) aren't available at build time—they only exist when the game actually runs. Teaching the model which APIs are available at which phase — and that every node needs its owner set correctly or it silently vanishes on save — took careful prompting but paid off.
3. The Evaluation Loop: A coding agent is inherently biased toward its own output. To stop it from cheating, a separate Gemini Flash agent acts as visual QA. It sees only the rendered screenshots from the running engine—no code—and compares them against a generated reference image. It catches the visual bugs text analysis misses: z-fighting, floating objects, physics explosions, and grid-like placements that should be organic.
Architecturally, it runs as two Claude Code skills: an orchestrator that plans the pipeline, and a task executor that implements each piece in a `context: fork` window so mistakes and state don't accumulate.
Everything is open source: https://github.com/htdt/godogen
Demo video (real games, not cherry-picked screenshots): https://youtu.be/eUz19GROIpY
Blog post with the full story (all the wrong turns) coming soon. Happy to answer questions.
FWIW, I’m a platform engineer who is actively mourning the loss of reliability and care given to production code. I just think games aren’t an area where this is nearly as much of an issue.
And saying the code doesn't matter is just ignorant. In plenty of great games the art doesn't matter. In plenty of others the code doesn't matter. Or the dialogue. But the reverse is just as true. In a game with tight, fluid player controls, the code to make that happen takes just as much creativity and skill and human touch as any other form of art. A driving sim made by someone deeply uninterested in the code they write will never feel good to play.
It is just so disingenuous to say that people who focus more on the code side of game development aren't creators. If I can make a demo with a black rectangle jumping around on some red rectangles and hand it to someone and have them say it feels like they're jumping around as a cat, with no art or animations, I'd say that took creativity and a human touch that ai is nowhere near being able to emulate.
I do think AI can emulate it - one of the earliest headlines I remember is an AI piece winning a digital art competition. The piece was great and the influence of the (human) artist was obvious.
If something is beautiful, I can't be assed to care what kind of paint was used to create it. If you trust human beings to continue to appreciate art as we have done since the beginning, there's not going to be any intractable issues.
When did the discussion become about trusting the audience? I think the discussion has always surrounded whether it's worthwhile to treat art as a problem that needs solving.
That's news to me as a game dev. I only get a few milliseconds every frame in which all my calculations need to run. If my program is built on spaghetti code, performance suffers and it becomes very noticeable very quickly.
In the context of making a personal project it will never ever matter whether you know how to code or not as long as you enjoyed the process.
It probably stems from a place of fear and pride.
I'm planning to do a proper full game with more iteration and publish it as a playable build, not just a video. That should give a much better sense of actual quality ceiling.
The "Racing game" appeared to be a car following a set path with a freecam and there didn't seem to be any gameplay mechanics in the snowboarding one, just a physics entity wildly crashing down a hill with no consequences or score.
The asset generation costs are tracked precisely. The current cost table: images are 5–15 cents depending on resolution (7 cents at 1K default, 10 cents at 2K, 15 cents at 4K). 3D models via Tripo3D run 30–60 cents depending on quality tier (a full 3D asset including the reference image is 37 cents at medium). Visual QA (Gemini Flash) is essentially free at this scale.
A typical game needs maybe 10–20 images and a handful of 3D models, so total asset costs usually land under $3. For something like the snowboarding game, you're looking at roughly $5–8 all-in — closer to your $5 bucket than $50. And image gen costs are dropping fast, Grok Imagine is 2 cents per image now, which is on the migration roadmap.
Last summer I built a factorio-like automation game with older models and over time the game really started to take life.
It helps to not have to sink most of your initial motivation energy on setting up the most basic mechanics like player movement physics from scratch and demo level templates.
I use cluade code to help work in godot, but I dont try to use claude as a one shot tool anymore. I haven't gotten good results out of it and I haven't seen any good results out of it elsewhere.
And when you realize that apps that are vibe-coded are to apps what the games here are to actual games, things get really worrying.
Oh well, back to my Claude Code CLI anyway but I know it's generating a huge amount of crappy code.
i do think LLMs need a physics skill though. very consistently they are bad at writing physics related code. at least without a lot of prompting and feedback
Let there be games! And games there shall be, millions of generated games.
Can I go back to the 80's please?
Things will change rapidly in the nest 12-36 months and people with vision will outlast "craftsman" 100 to 1.
You'll need to find a publisher, journalists, etc to market your game. You'll ask your friends what they are playing instead of scrolling the store page. Trusted platforms will promote games that are actually worth looking at. This problem already exists on modern platforms like Steam but AI is supercharging it.
If you want to test this, find yourself a record store and pick up a few LPs less than a few bucks from bands you've never heard. You might get something really great or it might be terrible.
Trust signals are going to be quite influential going forward, and that will get exploited too. I think we're going to see the return of high effort, high trust games journalism. Not necessarily as the commercial victor, but as a community we will rally around people and outlets we trust.
It will take at least a full decade for people to realize the slop isn't helping, has made us all collectively mediocre and will seek out people with real specializations. By then I sure hope those who are specializing haven't lost the motivation to do great things and moved on to other fields.
There are still... dozens of us left!
instead we will see something like flash or game maker, with new art styles driven by what agents make easy, and what children think is fun.
games have immediate feedback loops about quality. either theyre fun or theyre not.
I like the knittling analogy that was made by the OpenClaw inventor recently. Programming will continue to exist as a hobby, not as a profession.
Oddly I feel AI is getting me off the endless learn new tech churn. I was looking at a few odd ball programming books on my shelf, graphics programming from scratch and retro game dev (c64 edition and nes editions) and thinking I might now have time to work through these instead of learning technology x.
https://gabrielgambetta.com/computer-graphics-from-scratch/
And I'll be manually coding as I want to learn!
you make a good point. I lost interest around "MCP" in all this; now we're up to people not understanding map reduce and manually garbage collecting for the AI.
I have the Minix book, somewhere...
Equally true for today's AI coding agents
How is that a good thing? Sounds insanely dystopian to me. Especially considering all the other jobs that will be affected too.
meanwhile in reality many jobs still exist that could be automated..Why? because people dont let others automate their joy of life away.
its how it always goes.
people will be programming professionally, and such programs will be used by businesses.
The same people who were going to make something good will still make something good, the code imo has very little to do with it.
Passion is necessary but insufficient by itself to make good things
In some ways the kind of complaining I see is like complaining about a chef's meal because the chef didn't mine the ore to make his knife.
Look in the specific case of this post... none of the games are "good".. however.. one-shoting games WITH ASSETS.. seems pretty impressive to me.
There's levels to it, it's not black and white.
And floppies, sure, the 3.5" ones had some shovelware, included in trade magazines and whatnot. Maybe someone has a directory listing of a floppy from this era showing what it was like, i'd be interested; i know about AOL disks, too.
But CD-ROM. never before could humans distribute 200 games / software packages so easily. my first computer with a cd-rom had a hard disk 350MB larger than a CD-ROM. 2 shovelware CD-ROMs was more than my PC could handle!
If you want to handcraft something, do it. How popular it is among other people isn't relevant.
*Atari 1980 (20 games) vs Steam 2025 (20,008 games)
I've switched to emulators, a bluetooth controller and zero android games (and zero ios games on my work phone). But yeah it was/is horribly enshittified already. And what people predicted did happen.
The fact that the app store allows updates means existing games get systematically worse. Even the games I used to enjoy, and bought 5 years ago, like collossatron now have ads after every play.
LLMs are really good at C# (and tscn files for some reason), so that solves the "LLMs suck at GDScript" problem. Also, C# can be cheaper in terms of token usage (even accounting for not having to load the additional APIs): one agent writes the interfaces, another one fills in the details.
Saying this because I had really enjoyed vibecoding a Godot game in C# - and it was REALLY painful to vibecode with GDScript.
The original reasoning: GDScript is the default path in Godot, nearly all docs and community examples use it, and the engine integration is tighter (signals, exports, scene tree). C# still has some gaps — no web export, no GDExtension bindings.
But you're right that from the LLM side, C# flips the core problem. Strong training data, static typing for better compiler feedback, interfaces for clean architecture. The context window savings from not loading a custom language spec could be significant.
Main thing I'd want to test is whether headless scene building — the core of the pipeline — works as smoothly in C#. Going to experiment with this.
This always puzzled me about Godot. I like Python as much as the next guy (afaik GDScript is a quite similar language), but for anything with a lot of moving parts, wouldn't you prefer to use static typing? And even simple games have a lot of moving parts!
But it's gotten much better.
I was starting from scratch and mainly relying on Opus/Sonnet 4.
I also kept running into the Godot 3 vs 4 issue before adding specific guidance about this into CLAUDE.md
Be happy to find out I’m wrong.
The way unity solves this is with some kind of proprietary compiler. They translate the C# into C++, and then compile that into webassembly.
Whereas others (incl. Godot) need to ship the .NET runtime in the browser. (A VM in a VM.)
It makes me sad that Unity doesn't open source that. That would be amazing.
I looked at the video, awful results, better start with a template.
As Two Minute Paper's always says, it's not just about what this looks like at the moment, it's about what this might look like another three breakthroughs down the line.
While you can't guarantee further breakthroughs, at the rate of advancement and pace of improvement, you would have to be brave to bet on no further breakthroughs.
Models can be used more efficiently, at the moment, but you have to understand what you are doing, and not trying to one-shot anything.
Well done htdt.
I tried using Claude Code to build an RPG game with Godot and GDScript, using free to use assets: a total failure :/
The game was supposed to be many implementation steps long but I asked Claude to first produce a one area demo, so I could test the assets and choose the one I liked. First it produced some garbage using the assets randomly. Then it tried to copy from an existing demo but it had not idea where a door or a path were and at a certain point it even admitted it with something like: "I can't design an usable and nice area: I either make it functional and ugly or I copy and adapt the existing demo but I will have no clue about what is what"
I've never even attempted to develop games before so I'm sure I don't even know the basic concepts, but this use case definitely didn't work for me.
Maybe it could generate the code of the game if I provided the full design?
Godogen closes that loop: after writing code, it captures screenshots from the running engine and a vision model evaluates them. That's the difference between "compiles but broken" and "actually playable."
And yes — providing design docs helps a lot. The pipeline generates those automatically (visual reference, architecture, task plan), but you can provide your own and customize the skills to match your vision.
Something I’m surprised about is the lack of unit testing. Agents are remarkably good at creating tests and GUT testing is pretty well developed; having some good unit tests would really assist in the subsequent steps where you polish controls, add features, etc. Without these, I think things will get off the rails pretty quickly.
I feel like this could be a real positive thing if you had spent some effort writing about how and why this is useful, and targeted this more for learning + artist assistance versus just generating a complete game. Gamers universally do not want more AI slop, but tools that artists and programmers could use to automate busywork or learn the engine would have been much better.
I had assumed with the complex mix of scripts and the scene graph in Godot wouldn't be a good fit (personally trying and failing to make games in it by hand in the past may have been a factor)
Perhaps I'll give this approach a go if inspiration strikes!
Claude’s the only one I’ve got working with GoDot.
I compiled 202 tips from 10 'important' CC users into a repo and plugin. You might want to ask CC to review it and see if any of it is worth implementing in your skills as well: https://github.com/4riel/cc-bible
You've basically got two approaches right now - use a openpose style controlnet representing a walk cycle in conjunction with img2img OR you can try using a walk LoRA with WAN to generate video and then clip out 4-8 frames that represent a good loop from the video.
[1] https://drive.google.com/file/d/1ozZmWcSwieZQG0muYjbj7Xjhhlz...
I think it's quite impressive without even trying it. I think more and more tools like this will pop up soon.
I think this has great value just now, can't wait for it to get better. Keep at it.
Experimenting each night with a new game idea, genre, style, etc. Really fun. Thanks again!
He and I will give this a spin this weekend.
Haven't looked into Bevy but will check it out, thanks.
I think minimizing the amount of human effort in the loop is the wrong optimization, and it's the reason we end up with "slop".
It's the dream of a lot of people to have a magic box that makes you things you can sell, or enjoy for personal leisure. But LLMs are not the magic box. And there may not ever be a magic box. The sooner we can accept that the magic box isn't in the room with us, then the sooner we can start getting real utility out of LLMs.
TLDR: Human taste is more important than building things for the sake of building them.
whats the art creation pipeline?
Btw: Have you looked at Tripo3D models' topology? Is it still so bad that if you want to make small edits you have to retopologize the whole thing first?
FWIW as a disclaimer I'm making my own game not using AI since I value learning the skills myself, but I am interested to see how fast AI tools adopt to gamedev. For now they've been more of a false shortcut in anything else than prototyping and semantic search ("I need to achieve this visual effect, what algorithms should I look up").
That being said, Claude does not structure the project in the way someone familiar with the engine would, and just like any 'real' software, if you don't guide it, the output quickly degenerates. For example, stuff that would normally, intuitively be a child item in a scene, Claude instead prefers to initialize in code for some reason. It does not seem to care about group labels, which is an extremely easy way to identify different (types of) objects that should be treated in the same way in certain cases.
The games in the video look like GameJam projects? I'm not good at Godot, and I could probably hack most of them together in a week or so. I imagine an actual game developer could put some of them together in days.
In order to have LLMs build something good with any framework, not just a game engine, you have to steer and curate the output, otherwise non-trivial projects become intractable past a certain point, and you have a mountain of bugs to sort through.
> The Training Data Scarcity: LLMs barely know GDScript.
I've not found this to be an issue. Claude does just fine when you explain what you want. I've never had it hallucinate stuff, and I've barely seen it look at docs. Granted, I've only had it write 1-2k lines of GDScript, but I've never felt like it was spouting complete nonsense.
> To fix this, I built a custom reference system: a hand-written language spec, full API docs converted from Godot's XML source, and a quirks database for engine behaviors you can't learn from docs alone.
This is the point where I feel like this is nonsense (more than what the LLM-written prose would imply). Maybe this is my inexperience talking, but I feel there is no way that this would be better in any way over any alternative. Especially if you just lazy-load stuff at runtime. Godot already has good docs. They should certainly cover much more than whatever you need to make the games you demonstrated. What is the point of making a duplicate version of the docs, when you have the docs right there? If you really think that Claude can't handle GDScript, you can just use C#?
> The Build-Time vs. Runtime State: Scenes are generated by headless scripts that build the node graph in memory and serialize it to .tscn files. This avoids the fragility of hand-editing Godot's serialization format.
Again, maybe that's my inexperience with Godot, but I have no idea what you're talking about here? When you run, you do get a different node tree (and 'state' I guess?) but where does "hand-editing Godot's serialization format" come into this? Why would you ever need to concern yourself with what Godot does to transform your code after you've written it?
> It catches the visual bugs text analysis misses: z-fighting, floating objects, physics explosions, and grid-like placements that should be organic.
Funnily enough, those are all stuff that text analysis should be better at finding. I personally use logs & actually playing the game.
> Don't post generated comments or AI-edited comments. HN is for conversation between humans.
Maybe you need to read your own rules: https://news.ycombinator.com/newsguidelines.html
This guy is as blatant as it gets, and you can't/refuse to enforce it. Obvious AI writing with all the tells. Your site is going to crap buddy go select which rules you feel like moderating somewhere else and ban me. Never going on here again, enjoy your AI slop.
The starting points of Three.js examples are more of a game than anything here.
Stop saying AI is building games when it can’t even build a standard web page to match a mockup.
Nice set of prompts and skills tho, im grabbing them for personal use.
Godot whole engine is text based. This means you can just let claude rip through the assets and files just fine. It basically just works.
The thing that is critical is to make some documentation about the axis systems and core classes (the one on OP project is pretty good, ive grabbed it) and then you set your claude.md to point at the godot source code so that the bot can doublecheck things.
Ive been playing with multiple engines, and godot is by far the best one to use with the AI. Unreal engine is too heavy on binary files that coding tools cant parse, and Unity is closed source which leaves the bot with no reliable documentation or way to check what the game apis are doing. Godot is small enough that the bot can understand it and works fine for games that arent too complicated.
Im using it to build a spiritual remake of daggerfall as a procedural open world rpg, right now its at 60.000 lines of code, quite advanced. I got it running on a steamdeck at 60 fps even with 4 kilometers of draw distance with thousands of trees and procedural terrain thanks to doing tons of custom shaders and a few engine edits.
So be aware that supporting text only will become slow once the scenes are big enough.
If I'm not mistake how Claude Code or AI agent work, they need everything in 'context' and few tricks to reduce the context size. Sure, but given the number of files you have, how much of the context is consumed by all those claude files vs actual user input?
Filtering at load time based on what the agent actually needs makes a huge difference. Curious if the orchestrator/executor split causes issues with state handoff between the two context forks.