Noita has no room graph, no corridor solver and no level file. Its caves are herringbone Wang tiles stamped into a pixel grid — every one of them rebuilt from nothing but a seed and a coordinate. Here is that pipeline, running live.
The whole world's layout lives in one tiny image. Each pixel stands for a block of world roughly 512 pixels across, and its colour picks the biome that fills it. Walk sideways far enough and the image repeats — those repeats are the parallel worlds.
Centre column is the main world. The dimmed columns either side are the same image again — same generator, coordinates far outside its intended range.
A biome ships one template image holding many small tile variants. Tiles come in two shapes: wide ones (2×1) and tall ones (1×2). What matters is the edge codes — each side carries a marker saying whether a tunnel opens there.
The number under each tile is its six edge codes read as bits. 128 possible signatures per shape; a real biome ships several hand-drawn variants of each.
Now the trick. Tiles are laid in an interlocking herringbone — wide and tall pieces offset like parquet flooring, never in a square grid. Two things fall out of that for free: no visible seam lines, because no join ever runs straight for long, and guaranteed connection, because matching edge codes means matching tunnel mouths.
Watch a tunnel cross a tile boundary. Neither tile knew about the other — they agreed because they read the same edge code.
The stitched image is still just colours. Scaling it up and running each pixel through the biome's material table turns it into physical stuff — rock, coal, ore, water, lava. Drag the handle to compare the flat colour codes with what they expand into.
Left of the handle: raw template colours. Right: expanded material data, one entry per world pixel.
Pure noise makes caves, not places. So certain marker colours are swapped for authored chunks — a chest alcove, an altar, a shopkeeper's platform. The big landmarks aren't generated at all: Holy Mountains and the vaults sit at fixed coordinates, and the generator fills around them.
The reason any of this is stored as pixels rather than geometry: every pixel is simulated. Pour something in and the level stops being a level.
Drag on the cave to pour. Lava meeting water turns to stone — one rule, two materials, and suddenly the map is editable by anyone holding a bucket.