How to engineer an AI harness for game development(kylekukshtel.com) |
How to engineer an AI harness for game development(kylekukshtel.com) |
kkukshtel: You should keep that info, with links, even if its links to your site. Dont burden the reader.
Edit: I read the first half of the article then skimmed the rest (I dont use LLMs outside of occasional searches).
I've been a gamedev for five years. I have a hunch LLMs will not take over game development because of the necessity to control many, many small details to shape a great experience for the player, and because some parts of development cannot be described with words.
Small details: My hunch is when it comes time to polish and fine tune all the moving parts, this process will remain much faster to do by hand. It will be faster to update a specific field or line of code and test/iterate than to prompt your way through that process (the last 20% of the work takes 80% of the time)
Describing without words: An artist with a vision can only bring that vision to life with body movements. It is not possible to communicate all the details that go into a great piece of art with words. The colors, lines, shapes, positioning, specific emotions, history... is beyond spoken language.
The author appears to be on track to learn an important lesson about LLMs and art. LLMs have completely solved the coding side of game development. But this was never the hard part. Not even close.
The fixed randomness and determinism thing sounds great on paper (all of this does), but in reality this is an extremely confining way to build a video game. Ensuring you maintain determinism across many platforms is where things get super nasty.
If you want a turnkey AI game development experience, why not double down on diffusion? This sidesteps virtually all of the tooling and integration concerns. There is no game engine to integrate with if you use a diffusion model.
This is not quite true. Currently you still need to give them guidance on what type of architecture would best work for your game, or after many iterations on gameplay you'll end up with terrible performance and a complete mess of a codebase. I expect that will be solved sooner rather than later, though.
PS no, I am not interested in your alternative harness that will supposedly 100% trust me bro fix all these issues
But many top games have complex engines and online services that require technical mastery beyond the current AI capabilities. For those genres, engineering is a huge barrier of entry.
For a not so extreme example, you won't vibe code Cyberpunk 2077 while just taking care of art and gameplay ideas. Gosh, humans could barely pull that one off!
Why 'nasty'? I agree it's a problem to solve, but you just use a fixed-point math library and it's fine. Determinism is freeing, not confining. It allows you to do things like rollback netcode, replays and easy debugging. You can't just say that 'reality' happens to be what you in particular are used to.
Assuming the agent didn't put in a native nondeterministic trig function deep in the code instead of using the library one, it's an easy mistake to make and hard to debug in a big game. It won't even show unless you have a robust CI matrix. It can indeed be "nasty" to maintain.
Also determinism might work for simulation state, but shader/gfx differences across platforms can be really nasty and a library can't save you. Not even something like WebGPU. Also if you're doing any sort residency streaming dependent on GPU timings trying to make that deterministic will be a nightmare.
It's definitely not my intention to try and describe ways for making game development be more turnkey. I'm more trying to directly address ways to make non-one-shot (read: actual) game development be more tenable when an agent is involved.
I learned that one the other day - I've been building a little RTS game with a replay mechanism, and replays in Safari broke where they worked in Chrome. Opus 5.5 fixed it by replacing calls to things like Math.sin() and Math.cos() with its own deterministic functions: https://gist.github.com/simonw/7df96ed7296c69b70a9990102cae0...
Meta level, just push your agent to make things more legible, it’ll figure it out.
One other observation, remember that your agent is infinitely patient. So prompts like “build an interactive design doc with videos of each game mechanic in the style of Factorio dev diaries” can make reviewing changes easier. The general idea, all the small QoL dev tools that you don’t have time for, you can just spawn a side agent to build; if they are orthogonal to your main thread you can just progress them in the background.
One thing I think game dev has not (AFAIK) invested as much in is observability. There’s a lot of perf instrumentation available in debug builds, but things like measuring DPS, health, etc as an exported metric time series I have not seen before. I think agents will benefit from this disproportionately more than humans, eg for inspecting progression curves and balance.
Oh no they're not. I built dozens of small games for the web and five games in Swift and they're spectacular, getting better since day one. Not like Call of Duty but just fun and bug-free enough to play them every day
For example, the Thing approach is reasonable for a small game, but it's a dead end for a performance budget or layered subsystems. In a reasonably sized 3D game, iterating and copying 30 subsystems of 1000's of Things is impossible to do in frame time, the only fix is a total rewrite of literally everyThing. That's why there's ECS, SOA, etc. which needs a different kind of harness.
Also, art completely dominates the production cycle of modern games, which (even if AI generated) needs its own category of harness not mentioned here. And AI can be very good at optimizing, but samply won't diagnose your overdraw, and GPU needs its own ablation and attribution.
For the time being there's no panacea and we still need "game developers", though the bar for prototypes (and certain genres) is lowered.
I’ve worked on games with intentional determinism, and it’s a very valuable tool. A playtester can hand a dev a recording of the game inputs (including clock) for whatever bug they encountered, and the dev can fast forward to the exact point and repro it 100%. The amount of time saved chasing down difficult bugs is enormous.