FIELD NOTES — TERRAIN
One seed, one world
How an Orebound map is made, from a short string to an island of 4.5 million tiles: where the hills rise, where the rain runs, which ground is forest and which is iron, where the roads go and which tree stands where. And why every machine that builds it gets exactly the same world.
Every Orebound world starts as eight letters. The one in the pictures below is ksdyfnwt. Hand that string to the world generator and, about twenty-two seconds later, you get an island 2,112 meters on a side: mountains, lakes, rivers that run downhill into them, forests that know which slopes they like, a gravel road network, thirty-nine resource nodes and sixteen thousand trees. Hand it the same string tomorrow, on a different computer, under a different operating system, and you get the same island down to the last bit.
That second sentence matters more than the first. Orebound worlds are persistent and shared: everyone on a server plays on the same map, and a world, once released, is never regenerated or replaced. So the generator is not allowed to be creative twice. This post walks through it in the order it runs, with what it decides at each step and why, and then explains how we keep it honest.

FIG. 1 — The end result for seed ksdyfnwt, drawn flat. Green is where trees stand, brown lines are roads, the coloured squares are resource nodes, the black square in the middle of the south is the Depot.
Three noise fields
The first step is to make three maps out of nothing but the seed: height, moisture and temperature. Each is fractal noise, smooth random bumps at one size, smaller bumps on top at half the size and half the strength, and so on for three to six layers. Each field gets its own random source, derived from the seed and the field's name, so the moisture never echoes the height.
On its own, layered noise makes a field of soft round blobs that all look alike, so the height gets more work than the other two. Before we sample it, we push the sample point sideways by a second, slower noise field. That stretches the blobs into long ridges and bent valleys. Part of the fine detail uses ridged noise, folded at zero so it has sharp crests and V-shaped valleys, and how much of it depends on the climate: flat plains get little fine detail, forests more, mountains the most and the sharpest, and snow smooths it off again. An island shape pulls the edges below the sea. Last comes a coastal plain rule: the lowest fifth of the land is squashed toward sea level and everything above is shifted down to match. Without it the island was a cone and every lowland sloped, and only four percent of the land was flat enough to build on. With it, about half of it is.

FIG. 2 — The height field straight out of the noise. It has the right outline and the mountains are in the right places, but every slope is the same soft ramp.
Temperature starts as noise too, and then gets colder with height: on a scale from 0 to 1, it drops by up to 0.75 between the shore and the highest summit. That is why the cold patches in FIG. 3 sit on the mountains, and why there is snow on the central peak and nowhere else.

FIG. 3 — Temperature after the height has cooled it (left), and moisture (right). Together they decide the biomes.
Shaping the land
Real hills are not sine waves. They have flat tops, steep sides and flat feet, and rain cuts gullies into the steep parts. Two passes put that in.
The first compares every cell with the average height around it and pushes the difference through an S-curve, so a gentle rise turns into a bench: flat crest, straight steep flank, flat foot. The second is erosion. Around 1.1 million simulated raindrops land on the map, one for every four cells. Each rolls downhill for up to forty steps, picking up soil where it speeds up and dropping it where it slows. The drops have no memory of each other, but together they cut gullies down the steep flanks and fill the valley floors with what they carried.

FIG. 4 — After benching, erosion and the water passes below. The gullies were cut by raindrops; the lakes fill basins the noise left behind.
Only now, on the shaped land, do we decide what each cell is. Anything below sea level is ocean: deep, shallow, frozen or reef, by depth and temperature. Anything steeper than 37 degrees is cliff. A thin band just above the sea is beach. Above the snow line it is snow or glacier, and above the mountain line bare rock or alpine meadow. Everything else is read off a Whittaker table, the chart ecologists use to place biomes by temperature and rainfall: cold and dry is cold desert, cold and wet boreal forest, mild and dry grassland, mild and wet temperate forest, all the way to tropical rainforest. That gives 29 terrain biomes, 27 of which appear on this seed. Grassland and woodland cover the most land; all three deserts together cover a third of a percent of it.

FIG. 5 — The biome map. It is a climate map more than a picture of the ground: the textures come later, from rules that also read the slope and the water.
Where the water goes
Rivers are not drawn. They are found, by asking where rain would run.
A priority flood starts from the sea and works inland, always continuing from the lowest cell it has reached so far. Any cell lower than the cell that reached it is raised to that cell's level. When it finishes, every hollow on the map is filled to the point where it would spill over, and every cell has a path downhill to the sea. Where the fill is deeper than 1.4 meters, there is a lake. It spreads out to the whole basin under its spill level and stops at the saddle it would spill over, which is where the shoreline goes.
Then every cell points at its lowest neighbour, and we walk the map from the highest cell to the lowest, each passing its count to the one it points at. What arrives at a cell is the number of cells upstream of it: its flow. A cell with more than about 27,500 cells upstream of it is river. So a river begins wherever enough hillside drains into one place, and it ends in a lake or the sea, because that is where every path leads.

FIG. 6 — Drainage. The thin lines are where rain runs, darker as more water gathers; the solid blue is where enough of it has gathered to be a river or a lake.
Next to the water the land changes. Low, damp ground near water (no more than seven meters above the sea, within fourteen cells of the shore) becomes marsh or swamp, or mangrove on a warm coast. A two-cell ring around each lake becomes beach, bare rock or stays green, depending on how cold, steep and dry it is.
Then the rivers are dug in. The biggest river cuts a bed about 4.2 meters deep, a headwater brook about a third of that, and the valley widens with the depth so that its banks never get steeper than about 30 degrees. The water surface sits below the old ground, never drops below whatever the river flows into, and is averaged across the channel so it stays smooth through bends and confluences. (Rivers that know where they are going tells how that part went wrong first.)
Roads between places worth going
The road network is laid down before the rivers are dug, on the land as the water found it. Six points of interest are picked from a seeded shuffle of all the cells that are dry, low, gentle and not cliff, keeping only the ones far enough apart: on a map this size, three hundred cells or more. Then every cell gets a cost to cross: one, plus forty times its slope, plus a penalty for the biome. Grass is cheap, forest costs three, swamp ten, and water or cliff five hundred, practically a wall. A shortest-path search from each point of interest, combined into the cheapest tree that joins all six, picks the routes. Roads follow valleys and avoid marsh because those are the cheap cells, not because anyone told them to.
Once dug in, a road gets a level bed and verges, its run is smoothed along its length, and cuttings and embankments meet the land at about one in one and a half. A road crosses a river as a ford. (Roads that lie on the land has that story.)
A place to start
The Depot, the building every player starts next to, has a fixed spot on the map, and the admin can move it. On a procedural seed the generator checks that spot first and moves it if it would sit on an island in a lake. Around it, the ground within eighteen meters is levelled to the average height of the area (and never below sea level), with a soft edge, and painted as grassland. The player's drop point is the first free tile found in a scan just south of it.
Then the map is cut into tiles, and each tile is marked buildable or not. A tile is blocked if it is wet, too close to sea level, or if its corners differ by more than 55 centimeters.
What lies under the ground
Resource nodes are where the economy starts, so this is the step with the most rules, and the only one that checks its own work.
The 29 terrain biomes are grouped into four that matter for mining. Open, flat ground (grassland, desert, beach, tundra) is Rust Flats, where iron and limestone are common. Anything with a canopy is Copperwood, which is where copper is. Marsh and swamp are Sulphur Marsh, with oil and sulfur. Steep, bare and high ground is the Ashen Highlands, with coal and limestone. Each group also has rarer resources, which can never come up Rich there.
A single scan over the map collects candidate sites: tiles that are unblocked, flat to within 15 degrees across the node, with a flat clearing around them big enough for the largest extractor that serves that resource. The candidates are sorted into buckets by region (the map is a 4 × 4 grid), by mining biome, and into a separate "home" bucket for the area around the Depot. Each bucket keeps up to 512 candidates, chosen at random if there are more.
Placement then goes in a fixed order. First the home guarantee: iron, limestone, copper and coal, each at Normal quality or better, within 200 meters of where you land. Then each resource is spread over the map by its biome affinity until its total purity reaches a fixed target (Sparse counts a half, Normal one, Rich two; iron sums to six, coal to four), with at least twelve tiles between any two nodes. If a pass cannot meet every rule, it re-rolls with fresh random numbers, up to eight times.
When the world is finished, a separate check, the Survey Guarantee, reads the finished map and confirms all of it again from scratch: the home nodes, the purity totals, water within 400 meters of the drop point. It reports anything that fails by name. The placer meets these rules by design, and the check exists so that if we break the placer one day, a test fails and tells us which rule broke, instead of someone just getting an unfair map.
Which tree stands where
Trees come last, because they must keep out of everything else: blocked tiles, the road and its shoulder, every node's clearing, and twenty-six meters around the Depot.
There are seven species: spruce, pine, oak, birch, fir, beech and a leafless snag. Each has one or more rules. A rule first scatters candidate points with a seeded pattern. Spruce and pine use a clustered pattern: random parent points, each with several children scattered around it, which gives stands and clearings instead of an even sprinkle. Birch uses a plain random scatter, because birch is the first tree to move onto open ground, and it comes alone. Then each candidate is accepted with a probability that is the product of filters, each a soft band with feathered edges:
- Biome: spruce weighs boreal forest at 1, temperate forest at 0.6, woodland 0.3. Water, bare rock, cliff and snow weigh 0 in every rule.
- Climate: the moisture and temperature from FIG. 3. Spruce and fir want it cool and damp, pine dry.
- Ground: slope, whether the spot is a ridge or a hollow, and which way it faces. Spruce prefers shaded slopes, pine sunny ones and ridges.
- Water: how wet the ground is (from the same flow that made the rivers) and how near the nearest river or lake is. Birch gets a bonus along rivers. Snags like bogs.
- Height: every species fades out over a tree line between about 92 and 108 meters above the sea, and trees shrink toward it, down to just over half size at the top.

FIG. 7 — Half a kilometer around the Depot (the dark square), one pixel per meter. Each dot is a tree, coloured by species; the circles are resource nodes. The trees keep clear of the road, the nodes and the Depot, and gather on the damp lower slopes.
A tree that passes gets a size from a bell curve around its species' average, a random rotation and a slightly varied leaf colour. On this seed that comes to 16,228 trees, most of them spruce. They are real objects: you can fell one for timber, and a Lumberyard counts the trees around it to decide how fast it works. Rocks are scattered the same way, from their own random stream, on stony biomes and steep ground.
What your computer works out for itself
The server runs the generator once, when an admin publishes a map, on up to eight threads. The base noise is split into horizontal bands, and the result is identical however it is split. What it sends you is a compact file: heights, biomes, water, roads, nodes, trees and rocks. Everything that can be worked out from those is left out and rebuilt on your machine, by the same code, to the same bits: the ground colours, the tile heights, the grass.
The textures are the last decision, and they are made on your machine too. A biome only gives the ground its base look. On top of it, a stack of rules paints scree below cliffs, rock on ridges and steep slopes, snow on high and shaded ground, silt on the sea bed, sand on beaches, their own looks on lake beds, lake shores, river beds and river banks, and dry washes in gullies, using the same kind of feathered bands as the trees. The result is baked once into a map that stores the two strongest looks per point, and the shader blends them. To keep a big meadow from showing the same texture over and over, each point of a nine-meter triangular grid hashes its own position to pick between up to four variants of the texture and a random offset, and the shader blends the three around each pixel.
Grass, pebbles, sticks and boulders are not in the file at all. The world around you is cut into cells, and each cell gets its own random stream, named after the seed, the layer and the cell's coordinates. Every candidate in a cell uses the same number of random draws whether it is kept or not, so when you build on a spot, the grass under your building disappears and the grass next to it stays exactly where it was.
Same seed, same world
Everything above is random, and none of it is allowed to come out differently twice. Four habits make sure it doesn't.
Named random streams. Nothing in the generator uses the language's built-in random function. Every decision draws from a stream made from the seed plus a name: elevation, moisture, erosion, roads, rocks, trees, nodes:place:3. The name is hashed into a 32-bit number that seeds a small, fast generator. Because the streams are separate, a change to how many random numbers the rock pass uses can't change a single tree.
No hidden order. Anywhere order could depend on how memory happens to be laid out, the code fixes it. The lake shore pass works ring by ring over plain index arrays. The road search keeps a heap whose tie-break between equal costs decides which of two equally good paths a road takes, so that tie-break is part of the world and is never touched.
Our own maths. Floating-point arithmetic gives the same answer everywhere; the built-in power function does not. Math.pow returns a different last bit on Windows than on the Linux our build server runs on. That is one part in ten million billion, and erosion turned it into a different island: a drop rolls a hair differently, takes a little more soil, and a gully moves. We found it when the build server generated a different world from ours. The generator now uses its own power function, a port of a standard library implementation that gives the same result on every machine. A small probe on the build server checks the other maths functions on every run.
Frozen fingerprints. A test generates a full world and compares hashes of every output (heights, biomes, water, roads, nodes, trees) against fingerprints saved in the repository. If a change moves a single tree, the test fails. A change that is meant to make faster code must leave the fingerprints alone. A change that is meant to make better worlds bumps the generator version, and the new version makes new worlds under new names, while the old worlds keep their files and keep loading. That is the rule we started with: a world, once made, stays the world it was.
What it costs, and what is missing
A full world takes about twenty-two seconds on the server, most of it in the road search (six seconds of pathfinding across four and a half million cells), erosion and the water passes. It runs on a background thread, so players on the server don't notice when an admin publishes a map. Admins never have to touch a number: the Map Studio in the admin console shows a fast preview at a twelfth of the resolution, scaled so the hills come out in the same places, with knobs for every step above.
Still missing: there are no waterfalls, because the river pass grades every bed smoothly and never makes a vertical step; that would mean a new world. There are no caves, so two of the six mining biomes in our design have no ground to stand on yet. And the climate has no latitude: it is as warm in the north of the island as in the south. The generator supports it, but nothing has asked for it yet.