Commit Graph

15 Commits

Author SHA1 Message Date
82774445af show the caves on the map, and find the nearest entrance
A Caves overlay colours each column by how far below the surface its
topmost cave starts, and marks where a cave opens at the surface; its
legend gives each band's share of the view. Find nearest entrance
carves the chunks it scans and looks at every column. The cursor label
and the probe list a column's caves, air or lava, top down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:34:26 +03:00
aeb6d3be22 carve caves as GenCaves does, and check them block by block
A cave's course depends only on the seed and the chunk it starts in,
so each source chunk's tunnels are traced once, in its own
coordinates, as the ellipsoids they carve. A chunk is carved as the
game carves it: its eleven by eleven sources in order, each ellipsoid
skipped where the terrain's water or earlier lava is near, lava and
basalt below y 12 by geologic activity, the height map lowered where a
cave opens. The terrain now keeps whether each block is solid, which
makes the water exact; story locations keep caves away as theirs do.

vsmv verify compares every stored block below our surface: 96.1% of
the 18.5 million carved blocks agree, and of the rest all but 0.28%
are what later passes put in caves or made of air themselves, the
vugs and the block layers above all. Carving lifts the columns
matching the stored height by 71,379.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:34:00 +03:00
2c16f8caef read the save's chunk blocks, and check the rock below the surface
A chunk's solid blocks are a palette of block ids, raw or zstd, and a
zstd frame of bit planes; a layer of a lone 0 is all air. With them,
vsmv verify compares the rock of every stored block below the surface
with the strata laid against our own heights, which predate the dry
seabed raise: 99.91% of 1.38 billion blocks match. Lava basalt near the
bottom, the granite of cave walls and structures, and columns whose
height differs explain all but 0.0011%, nearly all of that in one area
at the explored edge whose layer boundaries are not explained yet.

What the save has instead of stratum rock is tallied too, as the
ground truth the deposits phase can be checked against.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 11:59:26 +03:00
53950a465c show silver, gold and peridot by their ore maps
The pick reads them from ore inside quartz and olivine deposits, which
are not placed yet, so for them the Minerals list shows the ore map
instead, marked as such: the overlay, Find nearest and the cursor work
on its value in sevenths, and the probe lists them on a line of their
own. Their maps already match the save.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 11:59:20 +03:00
d3a53acbdb update plan and notes 2026-10-09 22:10:17 +03:00
e174bff7e2 show what the prospecting pick reads, and find it
The ore maps GenDeposits makes are ported and match the save's for all
31 minerals in every stored region. With them and the strata, a column
reads as the pick's density mode would read it: a Minerals overlay
colours the map by reading, the probe lists every mineral the pick
finds, and Find nearest looks for a mineral read at least so high.

Readings run slightly high: the pick's column already holds the ore of
its chunk's deposits, which are not generated yet. The check against
the 13 readings stored in the save asserts exactly that direction.
Silver, gold and peridot are read from ore inside other deposits, so
they wait for the deposits themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:02:34 +03:00
c14c154303 fix four conditional operands sexc emitted without parentheses, and mark every Sex workaround with a TODO
A conditional as an operand loses its parentheses (sex#59): box-blur
allocated a quarter of its buffer, deep water got the shallow colour,
and verify's delta histogram wrote out of bounds into the height
classes. Plan.org quoted the corrupted count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:01:59 +03:00
e412274837 rework the viewer around base layers, overlays and side panels
One base layer is drawn opaque and any number of overlays over it, so
rocks can be looked for on top of the terrain rather than instead of
it. Settings and rock finding live in fixed panels beside the map, not
in windows over it. What is under the cursor is worked out on a thread
of its own, since computing it per frame stalled the window.

Find nearest searches regions outward from the view's centre and stops
once no nearer region is left; probes leave pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:39:29 +03:00
4666188b21 lay rock strata and show them as an overlay
The surface rock matches the save's TopRockIdMap in all but 14 of
11.7 million columns. Rock tiles keep rock indices and take their
colours from a palette on upload, so highlighting one rock, to find
where it lies, recolours what is drawn instead of regenerating it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 19:53:26 +03:00
c4c7ab9968 generate terrain height as Rivers' GenTerra does
98.2% of stored columns match exactly; the rest is the dry seabed
raise and surface caves, both later passes that the strata never see.
GenTerra thresholds the new terrain noise through the old tanh curve's
inverse, and matching that quirk is what moved it from 87%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 19:10:54 +03:00
517d279c8d lay out rivers as the Rivers mod does
Every stored riverDistance column matches. Plates are built from 25
ocean samples per zone rather than a region map per zone, and the
ocean distance from a ring search that finds what the mod's BFS does,
so a plate costs 0.08 s; workers cache a few, as a wide view spans
several.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:40:53 +03:00
5ad62524f1 show the generated region maps in the viewer
Tiles are single maps of single regions, generated on worker threads
that each own a worldgen, since the layers keep RNG state. Only the
visible tiles are queued, nearest first, so the viewer never computes
more than the window shows and sleeps once it has drawn it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:24:59 +03:00
63fd30a189 generate the region maps as the game does
Every map in all 118 stored regions matches the save to the pixel, so
the port is checked against ground truth rather than eyeballed. Getting
there meant reproducing .NET quirks the output depends on: LCGRandom
reseeding from its previous seed, Dictionary slot order in
NaturalShape, and C#'s left-to-right evaluation of RNG draws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:12:40 +03:00
90b5d50fa5 read the save, the seed and the worldgen assets
The engine's save classes are closed, so the protobuf field numbers
were read off the data and matched to the map sizes TerraGenConfig
gives. vsmv dump renders what the save stored, as the reference the
generator will be diffed against.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:56:14 +03:00
d72ae437ae set up the build, the viewer window and the vsmv cli
The generator must reproduce .NET arithmetic bit for bit, so every unit
builds with -ffp-contract=off and -fwrapv. Nuklear goes through the
SDL3_Renderer backend, keeping the viewer off macOS's deprecated GL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:39:10 +03:00