Gemfall a match-three game controlled across three builds

Gemfall on NES, SNES and N64

One controller plays three builds of a new puzzle game. Compare selected game state after each move, then press “Break it” to watch the check catch a difference. The game’s 176-line rules file is the same in all three builds Reported. It is a small test game, so it does not show that any game ports unchanged.

Try it: and move the cursor across all three boards. Press Break it to send an extra move to one version, then Reset all to bring them back together.

NESROM emulator

Loading…

The NES ROM in an emulator. A saved title-screen state aligns its starting board with the other builds.

How this pane runs

loading

SNESROM emulator

Loading…

The SNES ROM in an emulator.

How this pane runs

loading

N64Source rebuild

Loading…

Not an emulator. This is the N64 game’s own source code rebuilt to run in a browser, with the console’s picture-drawing chip written again in software.

How this pane runs

loading

Loading the machines…

One controller for all of them. Choose Take control, click a board, or Tab to the game before using the keyboard. Tab away to return to the page. Keyboard: arrow keys move, Z = A, X = B, Enter = Start. Or tap the buttons. Pick a piece with A, move to the piece beside it, press A again to swap them; three in a line clear. Each press is one step; holding a key does not repeat. The comparison is provided as text; playing requires reading the visual boards.

Starting…

“Break it” changes the SNES cursor with an extra press, so the counter turns red.

Why I built this

How do we learn the smart ideas from the past while looking forward?

I want to understand useful ideas in games well enough to carry them into new experiences. Gemfall starts with a smaller, checkable question: which rules can stay the same when the machine changes?

I built this new game with AI coding agents as a controlled experiment. One rules file is shared across three platforms, with different code around it. The comparison makes disagreements visible, so a working-looking result is not the only thing we have to judge.

Learning those ideas from existing games is the harder work ahead. Here, we designed the rules and kept them separate from the platform code. Matching selected state does not prove every behavior is identical or that the rules themselves are correct.

What stayed the same, and what was rewritten

The rules of Gemfall (how pieces match, fall, refill and score) are one file of 176 lines. That file is byte-for-byte the same in the NES, SNES and N64 builds Reported. The console-specific code draws the picture, reads the controller and coordinates the game loop. Seed handling, cascade timing, on-screen text and the N64 observation code also differ.

the rules file, unchanged input-timing file (38 lines), shared unchanged by the SNES and N64 console-specific game loop, display and controller code

Counted with a line count of the source files, comments and blank lines included: NES main.c 95 + platform.s 160; SNES main.c 77 + snes_display.c 49; N64 main.c 135 + n64_display3d.c 242. Not counted: each console’s development kit, the build scripts and the artwork. The N64 number is larger because its display code draws a tilted 3D board.

What the comparison checks

After each move finishes, the page reads each build’s board, score, combo, random-number state, cursor and selection. Green means those values match. While a move is in progress the counter says it is waiting. Different animation timing can produce different pictures between comparisons.

Try “Break it” to send an extra cursor movement to the SNES. The counter turns red even though the pieces have not changed. “Reset all” restores the common starting state.

The rules file is available to inspect. The review results record the browser checks, a deliberate corruption test, a three-minute input stress run and a separate comparison of integer widths. They come from a local review of the demo before it was added to this site on November 11, 2026; the hosted page has not been checked the same way Reported. The file manifest identifies the shipped ROMs and browser code by SHA-256.

Speed and limits

Code and licences

The game uses project-made geometric artwork. The live comparison uses jsnes (Apache-2.0) and SnesJs by angelo_wf (MIT). The NES loader was adapted for ES modules. The N64 ROM built from the same source is kept as evidence; it does not run on this page. The ROM toolchains include cc65, PVSnesLib by alekmaul and libdragon. The browser core was compiled with Emscripten, which includes musl runtime components. See the distribution notes.

File details on this page

Format, size and a short SHA-256 identifier, measured when this page was built.