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. The part that matters most already works: the simulation gives the same result, bit for bit, whether it runs on one thread or many, is replayed from its inputs, or jumps back to an earlier tick. We checked this with 100,000 and with 1,000,000 enemies. Speed is still early, and these are the first rough numbers.
- First demo, 100,000 enemies
- 8.8 ms per frame (approximate) A starting point, just over the 8.33 ms a 120 Hz display allows. Every enemy chases the player around an arena, in a window.
- Simulation, 1,000,000 enemies
- 69 ms per tick on the CPU (approximate) Too slow for now: that many enemies move in slow motion. Drawing them takes about 4 ms. This is why the GPU work comes next.
- Simulation on the GPU
- Next the next step for speed 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 two: the first game, and it runs in your browser
Testing
Get an email when you can test it
Leave your email and we will write when Linterna is ready for testers. Nothing else, and every email has an unsubscribe link.