A physics game from the web, ported to a real Nintendo Entertainment System cartridge by an AI coding agent,
then put online so two people can play it in their browsers. This is how it works, how it was checked, and what is still imperfect.
128 KBcartridge program (MMC3 board)
6502assembly language, all of it
4computer levels, Easy to Ultra
7 + 26original songs and sound effects
3TV systems: NTSC, PAL, Dendy
1½ daysfrom the first line to online play
1The request
Violent Checkers, the original web game at bxfoundry.com/violentcheckers, is checkers where you don't move your pieces,
you flick them, and they crash into each other with real physics. Impacts hurt both pieces, a hard enough shot
destroys them, pieces that reach the far wall become Kings, Kings that come home become Queens, and two Queens smashed
together fuse into a giant Super Queen.
On October 15, 2026, Benj Edwards gave Claude Code, Anthropic's AI coding agent (running the Claude Opus 5.5 model),
this instruction:
"Port the latest version of Violent Checkers the HTML web game to the NES, make it one or two player and run on a
real NES with AAA production values."— Benj Edwards, BX Foundry
The agent read the web game's source (its rules, its computer player and its physics), designed the cartridge, and wrote
the game, the art tools, the tests and the documentation. A second Claude agent, working in parallel, wrote the sound
driver and the music. Benj directed the work, played it, and asked for the online edition the next day.
2Choosing the cartridge
An NES game is a cartridge as much as a program: the board inside decides how much code fits and how graphics reach the
screen. The edition uses the most common advanced board of the NES era, Nintendo's MMC3, with:
128 KB of program memory in 8 KB banks. The 6502 processor can only see 32 KB at once, so code is split into banks
(the rules, the computer player, the music, the effects and screens, the menus) that are switched in as needed.
8 KB of graphics RAM instead of graphics ROM. Most NES cartridges carry their pictures in fixed ROM; here the
game draws its own tiles while it runs. That is what lets damaged, cracked and crowned pieces be drawn on the fly (see section 4).
8 KB of extra work RAM for the computer player's private copy of the board and the drawing tables. The console
itself has only 2 KB.
The MMC3's scanline counter, which can interrupt the processor partway down the screen. The game uses it for
the big callout banners ("FIGHT!", "DOUBLE KILL", "KINGED!") that slide open over the board.
It is built for real hardware:
Every write to the graphics chip happens in the safe window between frames.
The controllers are read in a way that a known sample-channel glitch can't disturb.
The board is a standard MMC3 layout, which flash cartridges support.
The same cartridge runs on American and Japanese consoles (NTSC), European ones (PAL), and the Dendy, a Russian clone.
At power-on the game times one video frame to tell which it is on, and adjusts its speed and music tuning to match.
3Physics on a 1.79 MHz processor
The web game uses Matter.js, a full physics engine running in floating point. The NES has an 8-bit processor with no
multiply instruction, no division and no floating point. So the edition has its own small physics engine, written for
exactly this game: round pieces of equal mass on a walled board.
Positions and speeds are 24-bit fixed-point numbers (whole pixels plus fractions), so slow pieces glide
smoothly instead of jumping a pixel at a time.
To match the feel of the web game, the agent ran the web game's own physics engine on a computer, shot pieces at each
other under controlled conditions, and measured what came out: how much speed a struck piece takes (bounciness 0.8),
how lively the walls are (0.78), how fast pieces slow down (about 1.6% a step), the top speed, and when stopped pieces
are declared at rest. The NES engine was then tuned until the same shots gave the same results.
Damage, Destroy shots and the Velocity Shield (a Destroy shot into a royal piece bounces off) are decided inside the
collision code itself, at the moment of impact, as in the web game.
424 round pieces and no flicker
The NES can show only 8 sprites (moving objects) on any line of the screen. A checkers board has up to 6 pieces in a
row, each one made of several sprites, so drawing every piece as a sprite would make them flicker badly, the classic NES
look the edition wanted to avoid.
The answer was to paint pieces at rest into the background. The board is a grid of 576 small tiles. When a piece
stops, the game builds new tiles that show the board square with the piece blended in, writes them into graphics RAM, and
points the board at them. Identical tiles are shared, so the opening position needs only 9 new tiles. Only the pieces that are
actually moving are sprites, and when nothing is moving there is no flicker at all.
This takes care: the console only lets the game touch graphics memory during the short gap between video frames, so
every change is queued and fed in a little at a time, within a strict budget. A piece stays a sprite until its painted
version is completely in place, so a half-drawn piece never shows.
Aiming: the dotted line shows the shot, the meter on the left the power. The status line previews the damage.A callout banner, opened by a split screen partway down the frame.First blood: shards, sparks and smoke are sprites from a shared particle pool.
5The rules, unchanged
The rules come straight from the web game's latest version (4.0): the damage formula and who takes more of it, the
75% power Destroy shot, Kings with double health and 1.5× damage, Queens that take half damage and deal double,
demotion of a royal piece whose shot touches nothing, Super Queen fusion, a draw when both sides are wiped out at once,
and the end-of-match statistics. The web game's hidden rocket is in there too.
The options menu and two of the seven How to Play pages.
6A computer player that thinks while the screen moves
Easy plays like the web game's original computer player: a random piece, the nearest target, some power. The
three higher levels work like the web game's newer player, in miniature:
Every possible pair of shooter and target (and wall shots for crowning) is traced along a straight line and scored with
a fast damage model.
The best 2 (Medium), 4 (Hard) or 6 (Ultra) candidates are then played out with the real physics on a private
copy of the board, and the results are judged with the weights the web game's player learned. Ultra also looks
at the best reply the other side would have.
The shot is aimed with a little error that shrinks with the level.
The NES can't do all that in one frame, so the computer thinks in the spare time between frames, in small slices,
while the game keeps animating at full speed. It takes about 1.3, 1.8 and 2.4 seconds to decide at the three higher levels.
The same damage model drives the player's own aiming preview ("HIT 37 · TAKE 75", "KILL!").
To check the levels, the computer played itself hundreds of shots at a time: Hard beat Easy 8–0, Ultra beat Hard 4–2,
and Hard against Hard went 3–1 with one draw, which showed that neither side has a built-in advantage.
7Sound: an original soundtrack
All the music and effects are original. The NES has five sound channels: two square waves, a triangle wave, noise, and a
channel that plays 1-bit delta-compressed samples. The sound agent built:
A music driver that runs 60 times a second and costs about 1,200 processor cycles a frame on average, around 4% of the processor.
A compiler that turns songs written as text scores into the driver's compact format.
Seven pieces of music: title, battle, results, victory, defeat and draw jingles, and a "get ready… FIGHT!" sting.
The battle music switches to a darker arrangement when a side is down to 3 pieces, and speeds up at the last piece.
26 sound effects, including a rising buzz for the power meter, an "armed" blip at Destroy power and a sampled crunch for heavy hits.
A spoken "FIGHT!": computer speech, converted to the NES's sample format.
One detail took a while. The voice has to land exactly as the FIGHT! banner opens, and at first they were about 20
frames apart. The sound runs on the console's real frame clock, while the game's own clock falls behind whenever a frame
is too busy to finish, as the opening pieces drop in. Timing the banner on the same clock as the music fixed it on all three TV systems.
8Testing without a console
Most of the checking was automated, using an accurate NES emulator (Mesen 2) driven by scripts with no screen:
Scripted plans that press buttons on given frames, take screenshots, and read the game's memory.
An audit of every write to the graphics chip, to prove the game never touches it while the picture is being
drawn. A real console would show garbage where an emulator might not.
A robot player that plays whole games through the controller, and long runs of the attract demo to look for hangs.
The sound checked frame by frame: a model of the driver predicts every write to the sound chip, and the
cartridge's actual writes must match it. This was done on NTSC, PAL and Dendy.
Every menu screen and How to Play page photographed and checked for text running off the edge.
A second emulator (Nestopia) to catch anything that only works by luck in the first.
These tests found real bugs:
The computer misjudged a shot that crowned a piece.
A difficulty description wrapped a stray letter onto the edge of the frame.
A jingle restarted itself because a countdown wrapped around.
The voice and the banner were out of step (section 7).
9Online: one console, many screens
The online edition uses the same approach as BX Foundry's Atari Multiplayer Arcade.
Nobody streams video. Instead:
The server runs the real cartridge in an NES emulator (Nestopia, compiled to WebAssembly), 60 frames a second,
with the seated players' controllers.
two bytes a frame → ← your controller
Every browser runs its own copy of the same NES. It gets one snapshot, then just the controller presses
for every frame, and makes the picture and the sound itself.
Because the emulator is deterministic, the same presses give the same game everywhere: the two players and everyone
watching see the identical match. Every second the server sends a fingerprint of its console's memory, and a browser whose
copy drifts asks for a fresh snapshot. A small buffer of frames smooths out bumps in the connection.
What Violent Checkers needed on top
Someone has to play an empty side. If a player leaves mid-match, the computer takes over that side. The cartridge
was changed so a controller can say "nobody is here". The obvious signal, all four directions pressed at once, is impossible
on a real D-pad, but the emulator quietly removes impossible presses before the game sees them. So the signal is
A + B + SELECT + START held together. The game treats that as no buttons pressed and hands the side to the computer.
New challengers. When someone sits down at a side the computer is playing, they take it over at once, with a
"NEW CHALLENGER!" banner. If the computer was thinking about its move, it stops and lets the human play. This works on a
real console too: in a one-player game, press START on the second controller to take over Black.
Many games at once. Anyone can press NEW to start a separate game from the title screen, so a match in
progress is never interrupted. Each game has its own link to send a friend. Someone who just arrives is always taken to
a title screen: a game where someone is waiting for an opponent, a game nobody is using, or a fresh one.
Turn-based fairness. The arcade normally removes players who stop pressing buttons. In checkers, the player waiting
for the other side's move isn't idle, so that wait doesn't count.
A player left mid-match: the computer plays on for them.The online page: the game, the players, the list of games running, and the NEW button.
10What is still imperfect
The biggest kills, with a burst of particles and a banner at once, cost the processor about two extra frames. The
game freezes for a moment on those hits anyway, so the slowdown is hidden.
The NES colours the background in 16×16-pixel blocks, so where a red and a black piece share a block, one of them has to
stay a sprite. Usually that's one or two pieces, which can flicker in a crowded row.
The web game leaves blood stains on the board. On the NES they would use up the same colour blocks, so blood here is spray only.
11Credits
Violent Checkers was created by Benj Edwards / BX Foundry.
NES Edition: the port, the art, the tests and the online edition were made by Claude Code with Claude Opus 5.5,
directed by Benj Edwards. The sound driver and music were made by a second Claude agent.
Online play: the lockstep engine of BX Foundry's online arcades, with Nestopia UE
(GPL v2) compiled to WebAssembly.