Remix.run Logo
▲ How to engineer an AI harness for game development(kylekukshtel.com)
70 points by kkukshtel 6 hours ago | 27 comments
▲armcat 4 minutes ago | parent | next [-]

This is very cool and on a lower level (more in the trenches) compared to what I did earlier in the year (i did a small writeup and built some skills [1]).

Because I am so-and-so pixel artist, the biggest unlock for me has been in rapidly iterating with graphics assets and sprites, and it's actually helped me become a better artist and animator (I built my own little tool for this [2]). The rest Codex or Claude Code seem to handle incredibly well (plus I have 30 years of programming behind me).

[1] https://github.com/acatovic/gothicvania-codex-demo

[2] https://github.com/acatovic/ai-game-studio

▲YesBox an hour ago | parent | prev | next [-]

> [I give a small introduction to myself and my own work, that I’m omitting here, as you’re on my website]

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.

▲kkukshtel an hour ago | parent [-]

I honestly didn't except this to get traction on HN so I'm updating the blog post now. I just read some recent post too that was like "mistakes technical blogs make" that I think brought up this same point yet here I am! Thanks for the tip.

▲bob1029 4 hours ago | parent | prev | next [-]

> I stand by a lot of what I’ve said, but am in the process of shipping a project where I’ve also used none of this. I think the scale I’m targeting here is really larger projects.

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.

▲apf6 9 minutes ago | parent | next [-]

> But this was never the hard part. Not even close.

This is revisionist history. Coding was definitely one of the hard parts!

▲pton_xd 3 hours ago | parent | prev | next [-]

> LLMs have completely solved the coding side of game development.

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.

▲LogicFailsMe 3 hours ago | parent [-]

Indeed, not even wrong. And it will whiff on the most basic gameplay issues. But it is still genuinely impressive how fast it can build a pretty but unplayable unfun thing out of nothing. And that's after many rounds of planning with it as it proceeds to ignore all that planning just because it can.

PS no, I am not interested in your alternative harness that will supposedly 100% trust me bro fix all these issues

▲glimshe 3 hours ago | parent | prev | next [-]

I partially agree. Coding is not the hardest part for a large portion of indie games. You can in theory build an AI-coded game that sells well if you have the right art and gameplay.

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!

▲rrradical 3 hours ago | parent | prev | next [-]

> 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.

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.

▲avaer 2 hours ago | parent [-]

> Why 'nasty'? I agree it's a problem to solve, but you just use a fixed-point math library and it's fine.

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.

▲mypalmike 2 hours ago | parent [-]

Unless the GPU output is feeding back into the game loop simulation, there’s no nightmare.

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.

▲wccrawford 2 hours ago | parent | prev | next [-]

I think it's more generous to say it's not the only hard part. It's certainly very, very hard for a lot of people.

▲simonw 3 hours ago | parent | prev | next [-]

> Ensuring you maintain determinism across many platforms is where things get super nasty.

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...

▲kkukshtel an hour ago | parent | prev [-]

hello, author here!

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.

▲mycocola 36 minutes ago | parent | prev | next [-]

Just like writing, the biggest threat to game development isn't the LLMs themselves, but a failure to disclose LLM usage. Humans want to read things humans wrote, and humans want to play what humans made.

▲eamsen 12 minutes ago | parent [-]

Humanity is at a crossroads: Should we judge creative work by its authorship or by its merits?

Is something beautiful worth less if it was made by a probabilistic machine?

▲theptip 3 hours ago | parent | prev | next [-]

This matches what I came up with on a small project. The biggest ones being screenshots and separated simulation.

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.

▲gcampos 3 hours ago | parent | prev | next [-]

A lot of the points the author made about game dev with AI are things that I notice in my experience as well. That is why me and a friend started to work on https://folly.gg an AI game maker that internalizes several of these learnings.

▲mawadev an hour ago | parent | prev | next [-]

I started coding because of gamedev, seeing this and potentially having some agents take care of the coding part is a blessing. I doubt this works as advertised but imagine iterating on stuff with a couple prompts and you can alt tab back into blender or libresprite. Very cool, lets put economics and employment aside

▲roger23 3 hours ago | parent | prev | next [-]

I was able to get a decent FPS out of around 40k lines (excluding tooling). Tooling consisted mostly of level editing and asset conversion which I tried to keep out of the main code-base.

▲avaer 2 hours ago | parent | prev | next [-]

AI can definitely do all aspects of game development now, but this advice seems to mostly apply to small indie titles or experiments.

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.

▲kkukshtel an hour ago | parent [-]

"Thing" style systems are very common in AAA. I link to the interview with the Dreams (Media Molecule) team where they describe a system very much like this. ECS is also not mutually exclusive here.

▲nsagent 5 minutes ago | parent [-]

Dreams did use a standard ECS [1] and despite being a first-party title it's not widely considered to be a AAA game (based on size of the team and budget compared to typical AAA games). There might be some AAA studio that eschews the approach, but it's very common for speed and efficiency, especially on consoles.

That said, I'm glad you shared your thoughts and experience. It's helpful to see what people try.

[1]: https://youtu.be/mFBmoCv5EcQ?t=1982

▲wslh an hour ago | parent | prev | next [-]

I recommend to also take a look at Godogen[1][2] which includes other insights as well. I also tried it to produce 2D animations of fairy tales.

[1] https://github.com/htdt/godogen

[2] https://hn.algolia.com/?q=godogen

▲Kuyawa 3 hours ago | parent | prev [-]

"LLMs are Bad At Games"

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

▲yonaguska 2 hours ago | parent | next [-]

did you build games before the advent of llms?

▲polotics an hour ago | parent | prev [-]

keyword here is "small" maybe?