Linterna
A game engine built for AI agents to drive.
Linterna is a 2D game engine written in Rust. It has no editor: agents write, run and test games through a command line, a library and an MCP server that share one set of commands.
In development. Not released yet.
What makes it different
- Every run replays exactly
- Give it a seed and the player’s inputs, and it rebuilds the same world, bit for bit. The simulation uses fixed-point integers instead of floating point, so it is designed to give the same result on any machine. An agent can replay a bug, jump to any tick, and compare two versions of the code exactly.
- Agents can see any frame
- Any frame can be captured as an image, headless and on demand, so an agent can look at the game without a window open.
- Game state is data
- An agent can query the state of the world directly, as data, instead of working it out from the screen.
- No editor
- Everything is text, schemas and commands. Gameplay code is Rust too, with no scripting language.
What it is for
- 2D now, 3D later
- The first games are 2D, drawn with wgpu. 3D comes after that.
- Survival, simulation and adventure games
- The first real game will be a top-down survival game.
- Huge generated worlds
- Positions are stored as a chunk number plus an offset inside it, so procedurally generated worlds can be very large without losing precision.
- Very large numbers of entities
- Survival and simulation games need hordes on screen at once, so the engine is tested with 100,000 and 1,000,000 enemies.
Where it stands
Linterna is in development and runs on one Mac for now. These are the first numbers, from day one.
- First demo, 100,000 enemies
- 8.8 ms per frame (approximate) In a window, with every enemy chasing the player around an arena.
- Simulation, 1,000,000 enemies
- 69 ms per tick (approximate) On the CPU, so that many enemies move in slow motion for now. Drawing them takes about 4 ms.
- Simulation on the GPU
- Not yet planned Later, the simulation moves to compute shaders. Each GPU kernel gets a Rust twin, and the build fails unless both give the same state every tick.
Measured during development on one Mac. The first demo was a quick prototype and the real renderer is being rebuilt step by step, so these numbers will change.
What comes next
Game API
A
Gametrait any game implements, which then gets replays, seeking, state hashes, screenshots and a window. Pong is the first game, on purpose small.The agent interface
The commands agents use, over MCP and the command line.
A survival game
A top-down survival game with procedurally generated worlds, built on the engine.
Follow along
Each step goes in the devlog, including what went wrong.
Latest: Day one: building an AI-first game engine with a team of agents