← BX Foundry

Breathing Earth an NES demo

The renders before dithering →
The title screen: BREATHING EARTH in tall gold letters over the moonlit bottom of a well

Breathing Earth is an experimental demo for the Nintendo Entertainment System, designed by Benj Edwards as the start of a larger game. It runs on a pre-rendered first-person dither engine: every view of the cave was ray-traced on a modern computer, then dithered down to the NES's colors and packed into the cartridge. Walking plays those pictures at 30 frames a second, like the full-motion video of early-1990s games, and turning is a smooth sideways pan. You start at the bottom of a well. There is no story yet: a cave to explore, a map, and three creatures in the dark.

Click Play, or press any game key.

Keyboard: arrows, X = A, Z = B, A or Enter = Start, S = Select. A gamepad works too.

The cave

36 cells joined by 40 tunnels: a timbered torch gallery two levels up, inclines and a mine shaft down, a great cavern with a fire bowl and stalagmites, a crystal grotto, an underground lake, and the Orb Hall, a carved sphere around a glowing stone. A Syphian waits in the torch gallery and another in the great cavern; an urlik rises out of the lake. The earth breathes: a low rumble rises and falls, and water drips in the dark.

The engine

Each of the cave's 144 views, the 560 in-between pictures of its steps, and the 42 poses of its creatures was rendered by a ray tracer, then dithered in linear light to four NES palettes chosen by a search over the console's colors. The cartridge rebuilds each picture from tile sets that it swaps three times down the screen, and streams a new picture into video memory every two frames. The sword arm is drawn with sprites over the picture.

See the renders before dithering, next to the pictures the cartridge shows.

The cartridge

Written in 6502 assembly for an MMC3 cartridge with 512 KB of program ROM, 256 KB of graphics ROM and 8 KB of RAM. Designed by Benj Edwards, made with Claude Code. Tested in emulators (Mesen, MAME, and the one on this page); it needs a flash cart that handles a full-size MMC3.

Download the ROM (for emulators and NES flash carts)

Moonlight falls down the well shaft into the dark at the bottom of the well
The bottom of the well
A timbered gallery with wall torches, the frames repeating into the dark
The torch gallery
The great cavern: firelight from the fire bowl on tall stalagmites
The great cavern
The crystal grotto, lit blue by glowing crystals
The crystal grotto
The underground lake: a lit column and blue lights reflected in still water
The underground lake
Inside the Orb Hall, a round room in blue light around a glowing stone
The Orb Hall
A Syphian, a scaly creature with a crest of feathers, stands in the torch gallery; the player's sword is raised
A Syphian in the gallery
The sword swings across the Syphian; five hearts at the top left
A swing
The urlik, a giant serpent, rises out of the dark lake
The urlik
The map: the cells visited, inked on parchment
The map (Select)