The Ruler Valley
Blocks, a river, snow on the tops. The valley walls are
run(g) — the same sequence as every other page here — so the
mountain classes you can see in Range are the cliffs you would
be climbing. Drag to travel downstream. Nothing is stored: every block is worked
out from (seed, x, z) as it scrolls past, and forgotten again.
Downstream
The river runs along the valley floor; the walls rise by the run law. Turn massif up and the cliffs gather into fewer, bigger headlands.
What is actually in memory
One integer: the generation you are looking at. Everything else — every column's height, its biome, whether it is under water — is computed on the way past and thrown away. Travel a million generations downstream, come back, and it is the same valley, block for block.
This is IndexedWorld.cs's whole idea, in a browser instead of Unity:
world = generate(seed, coordinate) + delta, and here there is no delta because
nobody has dug anything yet. A save file for this world would be
12 bytes plus 12 per block you changed.
Now dig one. Click a block to take it away, shift-click to put one back. Watch the save file: it starts at 12 bytes for an entire valley and grows by 12 for each block you personally changed. Travel away and come back — the landscape regenerated itself, and your hole is still there, because your hole is the only thing that was ever worth writing down.
Where the shapes come from
The walls are run(g) straight off the
edge, so a cliff band appears exactly where the ladder jumps — +6 at v=6,
+8 at v=8. Those are the headlands.
The valley cross-section is a polynomial in the distance from the river, so
it is platform-stable: no pow, sin or cos
anywhere on the height path, which is what lets the browser and Unity agree block for
block.
The meander is fractal noise off the same integer hash. The next step is to let the basin carve it — the network already knows where the water wants to go, which is something a noise-based generator can never ask.
Same seed, other worlds: Ruler Range → · Ruler Rivers → · Ruler Flow →