Materials and ores
Every material the world can contain, what it costs to break, and where it is found. This is the table the generator writes and the tools read, so it is the one place where geology and gameplay are the same decision.
How to read the toughness column
Toughness is strikes to break, from full. One tool, one power level, no modifiers — a stone cell at toughness 8 takes eight swings, leaves take one. That is the whole damage model today.
It is deliberately the only input. Tool types with per-material modifiers and player attributes are both anticipated and both deferred, and the reason per-strike damage is kept as a single function rather than an inlined expression is so they land as a change to one function body rather than a hunt through the edit ops, the HUD and the highlight.
For terrain the number means something slightly more specific once the digging
model lands: a strike removes (255 − 128) / toughness of the cell's
density, so toughness is strikes from full density. Generated surface cells
are already partially dense — a hillside's outer crust breaks faster than the rock
behind it, and it should, because that crust is topsoil.
The table
Index is Voxel::colorIndex, which is what the generator writes and what
the texture arrays are keyed by. The order is the table's own; nothing depends on it
except that missing stays last.
| # | Material | Toughness | Group | Where it occurs |
|---|---|---|---|---|
| 0 | grass | 2 | Soil | Topsoil — the surface-following cap, 1–3 voxels thick, sitting on top of whatever the ground does |
| 1 | dirt | 3 | Soil | Subsoil, directly under the topsoil |
| 7 | clay | 3 | Soil | In the table, not yet placed by any generator |
| 3 | sand | 2 | Soil | In the table, not yet placed |
| 8 | gravel | 4 | Weathered rock | The band between soil and bedrock proper, still surface-following |
| 10 | sandstone | 6 | Sedimentary | A lens at a fixed height that thins and pinches out entirely across the map — present in roughly half of columns |
| 11 | limestone | 7 | Sedimentary | The base rock: everything the named strata do not claim. Most of the world's rock by volume, and the band the caves and coal sit in |
| 12 | shale | 6 | Sedimentary | In the table, not yet placed |
| 13 | granite | 10 | Igneous | A thick band below the sedimentary rock, undulating with the whole stack |
| 14 | basalt | 11 | Igneous | In the table, not yet placed |
| 15 | marble | 9 | Metamorphic | The deepest named band, above bedrock |
| 16 | slate | 8 | Metamorphic | In the table, not yet placed |
| 17 | coal_ore | 7 | Ore | Seams within limestone — so, shallow and common |
| 18 | iron_ore | 9 | Ore | Seams within granite — deeper, and only in the igneous band |
| 19 | copper_ore | 9 | Ore | Seams within marble — deepest of the three |
| 9 | bedrock | — | Floor | The bottom 2–4 voxels of the world, always present. Unbreakable |
| 2 | stone | 8 | Built | Generic; what construction blocks are placed as. Not produced by the generator |
| 5 | wood | 5 | Built | Placeable only |
| 6 | leaves | 1 | Built | Placeable only |
| 4 | water | 1 | Reserved | Held for liquids, which are deferred by decision. Deliberately not repurposed as a spare colour |
| 20 | missing | — | Diagnostic | Never generated. Any material index with no entry resolves here and renders magenta, so a bug looks like a bug instead of borrowing a neighbour's texture |
Bedrock's toughness is blank on purpose
It has an ordinary value in the table — 8, the same as stone — and it is irrelevant, because an explicit rule makes bedrock undamageable. The alternative, a toughness so large that the arithmetic rounds to zero density removed, produces the right behaviour for the wrong reason and reads as a bug to whoever meets it next.
Ore and host rock
Every seam occurs only within one host rock. That is the closest thing the world currently has to a prospecting loop: the rock you are standing in tells you what you can hope to find, and the rock bands sit at their own depths, so depth gates the ores without any rule that mentions depth.
| Ore | Host rock | Share of that rock | What that means to a player |
|---|---|---|---|
| coal_ore | limestone | ~5% | Common and shallow — the limestone is most of the rock in the world and starts just under the weathered layer |
| iron_ore | granite | ~8% | Requires reaching the igneous band, but is dense once you are in it |
| copper_ore | marble | ~6% | Deepest, in the thinnest of the three bands, so the scarcest in practice |
The shares are of the host rock, not of the world, and they are measured rather than declared — the generator's tests assert each seam stays inside a sane band so the world can be retuned without silently becoming a mine or a desert.
Seams are sheets rather than pockets, so a tunnel that cuts one shows a band running across its wall rather than isolated lumps. And because the seam pass runs after the caves, ore is never placed into a void that was already carved — you will not find a vein hanging in the air of a cavern.
The vertical order
Downward from the surface, as the generator currently builds it:
topsoil (grass) surface-following, 1-3 voxels
subsoil (dirt) surface-following
weathered rock (gravel) surface-following
sandstone a lens at fixed height; absent in about half of columns
limestone the base rock, with coal seams and most of the caves
granite igneous band, with iron seams
marble metamorphic band, with copper seams
bedrock 2-4 voxels, unbreakable
The first three follow the surface, so a hill's topsoil sits on top of the hill. The rock bands do not — they hold their own height and undulate as one deformed stack, which is what makes a dug wall read as geology rather than as paint. The mechanism is described in D10.
These depths are dev-scale. The world is currently 64 voxels tall so the whole sequence is compressed into about 30 voxels of rock. The design budgets roughly 190 voxels below the surface for it — soils in the first 30, the sedimentary band 80 to 100 voxels thick, igneous and metamorphic 60 to 80 below that. The bands and their order are the decision; the numbers move when the world does.
Worth holding against the geology: players mostly dig the top 30 to 60 voxels. Strata at 150 down are generation cost nobody sees, which argues for putting the variety within reach and using the deep range for rarity.
Open
- Six materials are defined and unplaced — clay, sand, shale, basalt, slate, and water. Each needs either a place in the sequence or a reason to exist. Sand and clay want to be surface-following lenses rather than bands; shale, basalt and slate are second rock types within their groups and want a reason to be distinguishable.
- Toughness values are guesses. They are ordered sensibly — soils under weathered rock under sedimentary under igneous — but nothing has been tuned against how long a swing takes or how many a player should spend.
- Ore yields do not exist. Breaking an ore cell removes it; nothing is produced, because there is nothing to hold it.
- The art is placeholder and this is where that cost stops being theoretical.
colorIndexis a byte, so 256 materials is not the ceiling — texture-array memory and the work of authoring a tile set per material are.