Day two: the first game, and it runs in your browser
On day one the engine could simulate a horde and nothing else. Today it got a renderer, a window, and a general way to write games. Its first game is Pong, and you can play it in your browser.
It has a name
The engine is called Linterna, Spanish for lantern. It fits what the engine is for: it lets an agent see into a running game.
A renderer and a window
The real renderer replaced yesterday’s throwaway demo, one tested step at a time. Here is what it does:
- One draw call. Sprites are drawn on the GPU with one instanced draw call per frame.
- Smooth motion. Positions are blended between simulation ticks, so motion is smooth at the display’s frame rate.
- Screenshots without a window. Any tick of any game can be captured as a PNG with no window open.
On this Mac, with 100,000 enemies on screen at the display’s native resolution (3024 by 1898), the median frame took 1.73 ms, about 577 frames per second. The simulation tick took 5.8 ms. The renderer is not the bottleneck.
A way to write any game
The Game API is a small Rust trait. A game owns its own state, and tells the engine three things:
- how one tick changes that state;
- how to hash the state;
- what to draw.
Every game then gets the rest for free:
- a fixed tick rate;
- exact replays;
- jumping to any past tick;
- headless screenshots;
- the full state as JSON;
- a window.
Pong is the first game on it. It is small on purpose, but it needed real pieces: collision, two players, a computer opponent, and score digits on screen.
These are the commands an agent uses with it:
linterna game-run pong --ticks 600runs a match headless and prints its state hash;game-capturesaves any tick as an image;game-statedumps the state;game-verifyreplays a recording and reports the first tick where anything differs.
Same game, every device
The game in your browser is the same Rust code as the desktop build, compiled to WebAssembly, and it runs the same simulation.
On the play page, press “Run 3,600 ticks”. It plays about a minute of computer against computer and prints a hash of the final state. On this Mac the hash is 125a5681757a3348, and your browser should print the same.
That works because the simulation never uses floating-point numbers, only whole-number math. Floating-point results can differ between chips and compilers, and whole numbers do not.

The download is about 0.9 MB.
What the gate cost us
Every change has to pass an automated gate before it merges. The gate checks that:
- tests fail before the change and pass after it;
- old tests were not weakened;
- the simulation stays identical across every way it can run.
Yesterday, an audit by a different AI model found real ways a change could cheat the gate. Today, automated security reviews kept finding more, one after another. We fixed the important ones. Existing test files are now locked, and any exception names the exact file it applies to.
But we spent too long on it. Each fix triggered more reviews and more gate runs, and the runs happen one at a time, so most of today went to waiting rather than building. We have now frozen the gate’s rules, and new findings go on a list for later.
We also made the gate faster. It no longer runs the 1,000,000-enemy determinism check on changes that cannot affect the simulation, which took a documentation-only check from 423 seconds to 241.
What went wrong
- The disk filled up again. Several agents ran builds at once while another project built on the same Mac. Free space dropped below 10 GB twice, and work paused until we cleared space.
- A test run broke the repository. One agent ran the gate’s own tests inside a git command that sets environment variables. Those variables leaked into the tests’ temporary repositories, and one test rewrote the real repository’s settings. Nothing was lost, and the gate now clears those variables for everything it runs.
- The 1,000,000-enemy benchmark failed. At 100,000 enemies the full-screen benchmark was excellent. At 1,000,000 it never finished.
- Part of the cause was load: the gate was running its own 1,000,000-enemy checks at the same moment.
- Part was a real design flaw: when the simulation falls behind, the app runs up to eight ticks before drawing a frame, so slow ticks turn into frames that take seconds.
- The fixes: run the simulation on its own thread, slow game time down gracefully when it cannot keep up, and later move the simulation to the GPU.
What is next
- Faster at 1,000,000. Profile the simulation and fix the frame pacing.
- The agent interface. One command set over MCP and the command line, so agents can open, step, rewind, inspect and capture any game.
- A watch mode. I can watch, live, whatever an agent is testing or playing.
- The first real game. A top-down survival game with procedurally generated worlds.