Thu 2026.11.26
rea-games: checking a rebuilt game against a recording of the original
Today's pick: rea-games
rea-games is a product that checks a game rebuilt in another engine. First it records how the original game behaves. Then it compares the rebuild with that recording. It also comes with a skill that lets a coding agent record, port and check a game.
It is today’s pick because you can check an agent’s game port without playing it.
In four panels
1The problem
- Original gameState changes with time and random numbers
- Agent’s rebuildWritten in another engine or language
- Tests or a screenshotNo expected results, one moment per screenshot
- You play it yourselfYou check thousands of frames by hand
Without expected results that record how the original behaves, you have to play the port yourself to see whether it follows the original’s rules for thousands of frames.
2How it works
- Original gameRuns with its time and random number functions replaced
- RecordingInputs, random numbers, state at each step
- RebuildReads a recording and prints its own states as JSON
- verifyPrints where the states first differ
Ran today
rea-games is a CLI that records how an original game behaves. It checks a rebuild by comparing it with that recording.
3What is different
Beforerea-games
What it compares against
Tests, expected results, mockups (Claude Code)A recording of the unmodified original
Trade-offOnly games that rerun the same way can be recorded
What it checks
One screenshot (Claude Code)Every recorded state and the random number count
Trade-offIt does not compare what is drawn on screen
4Running it
The 2048 port with the chance of a new 2 tile changed from 0.9 to 0.8
Terminal, the modified 2048 port $ node bin/rea-games.mjs verify 2048 --port web ok board-fills-then-over.json (5 inputs) FAIL corner-3.json: port exited 1: | Node.js v22.23.5 => 3/19 cases identical, 44 inputs, 47 recorded statesAs in the README’s example, only 3 of the 19 recordings passed.

- Found on
- GitHub
- Built with
- JavaScript, Node.js, Rust, GDScript
The problem
When you ask a coding agent to port a game to another engine, it is hard to check whether the port behaves exactly like the original. In the Claude Code docs, Anthropic recommends giving the agent a check that ends in pass or fail. Their examples are a test file, a script that compares output with expected results, and a browser screenshot to compare with a design mockup. A game’s state keeps changing with time and random numbers, so one screenshot shows only one moment of it. Without expected results that record how the original behaves, you have to play the port yourself to see whether it follows the original’s rules for thousands of frames.
How it solves it
Erkam Yaman published rea-games on GitHub on November 25, 2026.
rea-games is a CLI that records how an original game behaves. It checks a rebuild by comparing it with that recording. The original runs unmodified. rea-games replaces only the original’s time and random number functions from outside. So running it again with the same inputs gives the same result. A recording holds the inputs, every random number the original generated and the game state at each step. A rebuild can use any engine and language. For the check, it only has to read a recording on standard input and print its own states as JSON. verify checks that every state matches the recording. It also checks that the rebuild used random numbers as many times as the original. If a state does not match, verify prints the path to the first value that differs. There is also a agent skillInstructions, sometimes with scripts, that an AI agent uses for a specific task. for Claude Code and Codex. With it, an agent records the original and writes a spec of the game’s rules. Then it builds the port and checks it.
What is different
First, rea-games differs in what it compares against. The Claude Code docs’ examples compare against tests, expected results or mockups that you prepare. rea-games compares against a recording made by running the original unmodified. Random numbers are not regenerated from a seed. The numbers the original generated are recorded and passed to the port in order. According to DECISIONS.md, a port cannot reproduce a random number generator from another language. The trade-off is that rea-games can only record some games. The same inputs must give the same result after it replaces the game’s time and random number functions. According to the README, network games and games whose state cannot be read from outside are not supported yet.
Second, rea-games differs in what it checks. A screenshot check can compare only one moment on screen. rea-games compares the game state at every recorded step, and it also checks how many times the port used random numbers. For 2048, it compares the state after each of the 24,044 inputs in all the recordings. The trade-off is that it does not compare what is rendered on screen. According to the repository’s pitfalls.md, the play page of the Blocks port, a falling-blocks game, did not draw the settled blocks or grid lines. A bug in the bundling script caused it. verify still passed.
How it was built
- The repository has 75 commits, all dated November 25, 2026. The author names include Kam (59 commits), Pure Tech and renovate[bot]. No commit has a Co-authored-by trailer.
- DECISIONS.md says the repository was built unattended and its first version was written in one session. It does not say which tool was used. docs/STATUS.md lists what was checked and what was not.
- The CLI and the recording scripts use only Node 22, with no npm packages.
Running it
I cloned the repository into a separate directory and ran it with Node 22 in a shell with an empty environment.
- Checking. I checked the 6 web ports with
verify all --port web. In all 170 recordings, each port’s states matched the recording. The check took 24.6 seconds. I did not run the Godot or Rust (Bevy) ports. - Adding a bug on purpose. In the 2048 port, I changed the chance that a new tile is a 2 from 0.9 to 0.8. As in the README’s example, only 3 of the 19 recordings passed. The 3 that passed are short recordings with 5 to 30 inputs. For 7 of the 16 failures, the output gave the path of the first value that differed, such as
[13].grid[2][0]. - A hidden cause. The other 9 failures showed only
port exited 1andNode.js v22.23.5. I fed each of those 9 recordings to the port directly. Each run printed an error saying the port asked for more random numbers than the original used. When a port ends with an error,verifyshows only the last two lines of standard error. When Node 22 exits on an uncaught error, it prints a blank line and a version line after the error message. So the last two lines never include the message that explains the cause. In pitfalls.md, the maker recommends reading the cause of each failure. For these 9 failures, I had to run the port separately to see it. The maker filed this as issue #7 on the day rea-games was published, and it is still open. - Recording again. I recorded the original 2048 again with
record 2048. The 19 new recordings were byte for byte the same as the ones in the repository. It took 0.2 seconds. - Tests. When I ran
node --test, all 26 tests passed.
$ node bin/rea-games.mjs verify 2048 --port web
2048 / web
ok board-fills-then-over.json (5 inputs)
FAIL corner-3.json: port exited 1: | Node.js v22.23.5
=> 3/19 cases identical, 44 inputs, 47 recorded states$ node games/2048/ports/web/run.mjs < corner-3.json
Error: port asked for more random numbers than the original used
at Game2048.rng (file:///tmp/run/app/games/2048/ports/web/run.mjs:6:54)
at Game2048.addTile (file:///tmp/run/app/games/2048/ports/web/game2048.mjs:41:24)
Node.js v22.23.5Not checked
- A port an agent builds from scratch. Install the rea-games plugin in Claude Code and run its skill on an open-source game that is not in the repository.
- A game recorded in a browser. Record Dino again with
record dino, which runs the original in Playwright. Then check that the result matches the repository’s recordings. - The Godot and Rust (Bevy) ports. Install cargo and Godot 4.4, then run
verify all. It shows whether ports in other languages also give the same result from the recorded random numbers alone.
Verdict
It works. A 2048 port with an added bug failed the check on 16 of its 19 recordings. But in 1.1.0, more than half of the failures showed only a Node.js version line in place of the cause. To see the cause, I had to run the port separately. On November 26, the maker merged commit 3c9984c to fix this. It is worth trying if you want to check a game an agent ported to another engine.
What to take away
- When you compare a rebuilt game with the original, record the random numbers the original generates and pass them to the rebuild as they are. The 6 web ports in rea-games took the recorded random numbers, and their state matched the original at every step.
- When you make a check fail on purpose, also see whether each failure shows its cause. When I changed one probability in the 2048 port, more than half of the failures did not show the cause.
Getting started
git clone https://github.com/erkamyaman/rea-gamescd rea-games && node bin/rea-games.mjs verify all --port web
- You need
- Node 22. No npm packages are needed.
- Recording browser games needs Playwright with Chromium. Checking Rust ports needs cargo, and checking Godot ports needs Godot 4.4.
- Cost
- Free under the MIT License.
Steps select 1 ran.
Progress
- Day 3Active
- Day 7Upcoming
- Day 15Upcoming
- Day 30Upcoming
- Day 90Upcoming
- Day 180Upcoming
- Day 365Upcoming
Latest check Day 3, Sat 2026.11.28
- Commits since launch
- 75 → 106
- Stars
- 170 → 412
- Last commit
- 2026.11.27
- When a game port fails, `verify` now shows the actual error instead of the Node.js version line. Entry 047 found this problem.
- CI now checks that the published play pages match the web ports.
- A game with no recordings now fails the check.
- Added Mines, a minesweeper game, with its behavior spec, recordings and a web port.
- Screen readers now read the board and game state of Mines, Bricks and Paddles.