Skip to content

Map Design Rules

Guy Friley edited this page Nov 6, 2026 · 1 revision

Map Design Rules

Rules learned by generating maps, loading them, and playing them. Each one cost at least one broken map. Each one is now a validator check.

A flat riverbed does not flow

Water needs a downhill gradient or it just puddles near the sources. Practice Valley's datum slopes from 12 in the north to 6 in the south, putting the riverbed at 10 at the sources and 4 at the outlet, about one step every 21 tiles.

Do not assert a strictly monotonic riverbed, though. Pools and reservoirs dip below the trend on purpose. Assert instead that a through-channel exists at the designed bed in every row, that the designed bed descends, and that there is no long flat stretch.

Nothing may stand in a building's access tiles

All three Reserve* caches declare an entrance at local (1, -1), outside the 2x2 footprint. Trees and bushes packed into the 1-tile lanes of an early depot grid were rejected on load with:

Can't validate loaded BlockObject Birch(Clone) at (x, y, z).
It's not backward compatible. Deleting it.

Non-overlapping footprints are not sufficient. The depot now uses a 5-tile grid pitch, a 2x2 building plus 3 clear tiles, on a levelled yard with the whole rectangle kept free of vegetation. That also makes it far easier to run paths through.

Banks: no 2-block cliffs, ever

Bank heights are not a fixed terrace constant. They come from a cone that rises one level per tile away from every channel tile. The final height is the minimum of that cone and the open-land field. Both fields are 1-Lipschitz, so their minimum is too, which is what guarantees no 2-block cliffs anywhere, including where the valley gradient steps down.

Use math.floor(v + 0.5), not round(). Python's round() banks to even and can open a 2-block step.

Arable land is set by water spread, not flat ground

Measured from the shipped Plains map's own serialised MoistureLevels against its terrain and water depth. The fraction of land tiles that are moist, by height above the waterline and distance to water:

rise  d1    d2    d4    d6    d8    d10
  0   100%  100%  100%  100%  100%  100%
  1   100%  100%  100%  100%  100%  100%
  2   100%  100%  100%  100%   97%   83%
  3   100%  100%  100%   14%    8%    8%
  4     0%    0%    0%    0%    0%    0%

Land 0 to 2 levels above the waterline is irrigated out to 10 or more tiles. Three levels up, only within about 4 tiles. Four or more levels above the waterline is permanently dry. This matches SoilMoistureSimulatorSpec.VerticalSpreadCostMultiplier: 6 against MaxClusterSaturation: 8. One level of rise costs six tiles of range.

The practical consequence: a single straight river irrigates a band roughly 20 tiles wide and nothing else. Version 2 of Practice Valley was 25% arable. Spreading the same water as a braided network of tributaries took it to 67% without adding flat ground.

Narrow channels are better than wide ones. Irrigation reach is measured as distance from water, so slimming the network costs almost no arable land, frees buildable ground, and leaves spans narrow enough to dam cheaply.

Reserve the settlement footprint before carving

Carving a dense network first and hunting for a clear square afterwards fails outright. At 5,700 water tiles there was no clear 24x24 anywhere on the map. Tributaries that would cross a reserved zone are rerouted, both the control point and the junction row move, rather than dropped. Dropping one costs a whole corner its irrigation.

Never hard-stamp a level plateau

Its rim becomes a 2-block cliff. Clamp the terrain between LEVEL - d and LEVEL + d, where d is the distance to the zone. Both bounds are 1-Lipschitz, as is the water cone, so the result is too. An iterative raise-and-lower "feather" pass does not work: the two rules fight and it oscillates instead of converging.

A basin with a source and no outlet fills forever

The second reservoir is centred on an already-carved tributary rather than in open ground. The validator asserts that every channel tile can reach a map edge.

Reservoirs must survive a drought

The reservoir floor sits 3 below the inlet sill, so roughly 650 blocks of water stay trapped when the sources shut off. The validator requires at least 900 blocks held across all reservoirs, and that each reservoir is fed.

Keep some dry ground

Irrigating everything leaves nowhere to build without displacing crops. The validator requires that some dry high ground remains, and that a clear, level zone of at least 28x28 exists at spawn.