Mining: decide sub-cell resolution before designing the gameplay (subdividing the grid vs more intervals + faces) #287

Open
opened 2026-08-08 18:49:16 +02:00 by panda · 0 comments
Collaborator

Owner's note, to be settled before mining gameplay is designed (the later phase of #268):

"fosse per me dividerei ogni cubo in 100 parti ma ho paura esploda il gioco"

What the arithmetic says today

The fear is right about one axis and wrong about the other.

Vertically we are already fine-grained. TerrainZ runs −226…255 — 481 levels — and at
IsoProjection.ZScale = 16 one Z level is 16 px against a cell's 44. So the vertical resolution is
already about 3× finer than the horizontal, and a TerrainInterval may be one level tall: thin slabs
already exist and cost nothing extra. A niche three high and one cell deep is authorable right now.

Horizontally it would explode, and not where you would expect. Subdividing 10×10 gives
13.3 billion cells against today's 133,226,496. At one byte a cell for terrain alone that is ~13 GB
before intervals, statics or materials. The wall is storage and chunk streaming, not the mesh — the
renderer only ever meshes a window.

Why it matters for mining specifically

Mining wants sub-cell shape: an ore pocket, a vein following a seam, a face you chip back a bit at a
time. Two ways to get it without subdividing the grid:

  • More intervals per column — the model already carries them, Excavation.Dig already splits a run,
    and TerrainMaterialId already distinguishes granite from sandstone. A vein is a thin interval of a
    different material; chipping it back is a dig of one Z. This costs bytes only where someone has dug.
  • Detail from FACES, not from the gridTerrainInteriors emits real floor/roof/wall geometry per
    interval, and the biome blend is already sub-cell. Visual grain does not require storage grain.

What to decide before the mining design

  1. Is a vein a thin interval of its own material, or a separate concept?
  2. Does chipping a face remove one Z of one cell (fine, cheap, already expressible) or something
    sub-cell (which is the expensive question)?
  3. If sub-cell shape is genuinely wanted, is it per-chunk opt-in rather than global? A mine chunk
    could carry finer data while the other 133 M cells stay as they are.

Related: #268 (multi-level world model, whose mining phase is deliberately a separate design), and the
volume model in docs/superpowers/specs/2026-08-07-volume-world-model-design.md.

Owner's note, to be settled **before mining gameplay** is designed (the later phase of #268): > *"fosse per me dividerei ogni cubo in 100 parti ma ho paura esploda il gioco"* ## What the arithmetic says today The fear is right about one axis and wrong about the other. **Vertically we are already fine-grained.** `TerrainZ` runs −226…255 — **481 levels** — and at `IsoProjection.ZScale = 16` one Z level is 16 px against a cell's 44. So the vertical resolution is already about **3× finer than the horizontal**, and a `TerrainInterval` may be one level tall: thin slabs already exist and cost nothing extra. A niche three high and one cell deep is authorable right now. **Horizontally it would explode, and not where you would expect.** Subdividing 10×10 gives **13.3 billion cells** against today's 133,226,496. At one byte a cell for terrain alone that is ~13 GB before intervals, statics or materials. The wall is **storage and chunk streaming**, not the mesh — the renderer only ever meshes a window. ## Why it matters for mining specifically Mining wants sub-cell shape: an ore pocket, a vein following a seam, a face you chip back a bit at a time. Two ways to get it without subdividing the grid: - **More intervals per column** — the model already carries them, `Excavation.Dig` already splits a run, and `TerrainMaterialId` already distinguishes granite from sandstone. A vein is a thin interval of a different material; chipping it back is a dig of one Z. This costs bytes only where someone has dug. - **Detail from FACES, not from the grid** — `TerrainInteriors` emits real floor/roof/wall geometry per interval, and the biome blend is already sub-cell. Visual grain does not require storage grain. ## What to decide before the mining design 1. Is a **vein** a thin interval of its own material, or a separate concept? 2. Does chipping a face remove **one Z of one cell** (fine, cheap, already expressible) or something sub-cell (which is the expensive question)? 3. If sub-cell shape is genuinely wanted, is it **per-chunk opt-in** rather than global? A mine chunk could carry finer data while the other 133 M cells stay as they are. Related: #268 (multi-level world model, whose mining phase is deliberately a separate design), and the volume model in `docs/superpowers/specs/2026-08-07-volume-world-model-design.md`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo#287
No description provided.