Day one: building an AI-first game engine with a team of agents
Why build an engine at all
I have been making games in Godot. It is a great engine, but it was designed for a person clicking around an editor. AI support is bolted on afterwards. I think the future of game development is agentic: AI agents will write most of the code, test it, and play the game. So I want an engine built for them from the start.
Here is what “built for agents” means for us:
- No editor. Everything is text, schemas and commands. An agent works with the engine through a command line, a library, and an MCP server that share one command set.
- Every run is reproducible. Give the engine a scenario, a seed and the player’s inputs, and it produces the same world, bit for bit, on any machine. An agent can replay a bug, jump to any tick, and compare two versions of the code exactly.
- The agent can see. It can capture any frame as an image, headless and on demand, and query the world’s state as data.
- It is fast. The first goal is a ridiculous number of enemies on screen at once, because survival and simulation games need it, and because it keeps us honest about performance.
It is written in Rust, with all gameplay code in Rust too (no scripting language), and it renders with wgpu. For now it targets this one Mac. The design leaves room for iOS, Android, Windows and the web later.
The first decisions
Determinism through integer math. Floating-point results can differ across CPUs, GPUs and compilers. So the whole simulation uses 16.16 fixed-point integers, with positions split into a chunk number plus a local offset, so worlds can be huge without losing precision. Floats exist only in the presentation layer: the camera, interpolation, and drawing. Those are never part of the game state.
Two implementations, proven equal. The horde simulation will eventually run on the GPU as compute shaders. Every GPU kernel will have a Rust twin, and the build fails unless both produce identical state hashes every tick. Today, only the CPU side exists.
A merge gate. This was borrowed from another project of mine. Agents work in small steps of at most 300 lines, and every step must pass cargo xtask gate before it merges. The gate checks that:
- a new test fails before the change and passes after it;
- existing tests and assertions were not weakened;
- the previous step’s tests still pass against the new code;
- lint, formatting, licenses and the no-floats rule all pass;
- the 100,000 and 1,000,000 enemy simulations are identical across single-threaded, multi-threaded, replayed and seeked runs.
The first demo
By the evening there was a working demo: 100,000 enemies chasing a player around an arena, in a window, at about 8.8 ms per frame. That is just over the 8.33 ms budget for this Mac’s 120 Hz display. A simulation tick took about 5.7 ms on the CPU.


At 1,000,000 enemies, rendering was still cheap: about 4 ms to build the instance buffer and one instanced draw call. But a CPU tick took about 69 ms, so the game ran in slow motion. That is expected. It is the reason the simulation moves to the GPU later.
That demo was a throwaway spike, built in parallel so we had something to look at on day one. The real renderer is being built step by step through the gate. Its first offscreen render, generated in a test:

How the work actually happened
Almost all the code was written by AI agents. I made the decisions, and one Claude session coordinated:
- Claude subagents: one fresh implementer per task, plus a separate reviewer for each task.
- Codex: wrote two hidden test scenarios with 2 million and 4 million enemies. The gate runs them, but the implementing agents never see them. That makes it hard for an agent to tune its code to the tests.
- Antigravity (Gemini): ran an adversarial audit of the gate, looking for ways an agent could make a failing change look like it passes. It found real holes, and a Claude reviewer verified each one before we fixed it.
Some things went wrong, and they were instructive:
- Codex refused the fuzzing task. OpenAI’s safety filter flagged “fuzz our own file parsers” as a cybersecurity risk. Claude took it over.
- We filled the disk. Every gate run makes a temporary copy of the repo with its own build directory. Forty-four leftover copies took about 28 GB, and the disk hit 99% full. The gate now cleans up after itself and refuses to start when the disk is low.
- We were too focused on the benchmark. Halfway through the day, I asked whether we were building an engine or a horde benchmark. Fair question. We reordered the roadmap: next comes a general Game API, with Pong as its first test, then the agent interface, then a real game.
- The gate is a security problem. If agents write most of the code, the gate is the thing they will be tempted to game. The audit found ways to disable tests through package manifests, macros and cached build directories. Hardening it is ongoing work.
What is next
- The windowed app, headless captures and full-screen frame benchmarks.
- Game API v0: a
Gametrait any game implements. Each game then gets replays, seeking, state hashes, screenshots and the window for free. Pong is the first game, and it is deliberately small. - The agent interface over MCP and the command line.
- The first real game: a top-down survival game with procedurally generated worlds.
The engine does not have a name yet.
Since this post, the engine has a name: Linterna.