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>
This commit is contained in:
2026-10-10 15:34:26 +03:00
parent aeb6d3be22
commit 82774445af
7 changed files with 312 additions and 37 deletions

View File

@@ -6,7 +6,8 @@ it as a zoomable top-down map: terrain, rivers, oceans, climate,
landforms, geologic provinces, and rock strata at any depth. It is
mostly for finding rock: where chalk, bauxite or limestone lie, at the
surface or 20 blocks down, and which one is nearest. It also shows
what the prospecting pick would read for an ore, anywhere on the map.
what the prospecting pick would read for an ore, anywhere on the map,
and where the caves run.
[[file:doc/screenshot.png]]
@@ -79,7 +80,7 @@ Options:
| =--assets DIR= | where the game's =assets= are; default =./assets= |
| =--zoom Z= | blocks per screen point, 1/16 to 32; default 4 |
| =--base LAYER= | the base layer: =ocean=, =rivers= or =height=; default =height= |
| =--overlay NAME= | turn on an overlay: =landform=, =climate=, =province=, =upheaval=, =strata=, =rock=, =mineral=; repeatable |
| =--overlay NAME= | turn on an overlay: =landform=, =climate=, =province=, =upheaval=, =strata=, =rock=, =mineral=, =caves=; repeatable |
| =--opacity F= | overlay opacity, 0 to 1; default 0.5 |
| =--rock-depth N= / =--rock-y Y= | rocks at N blocks under the surface, or at height Y |
| =--rock-any= | the one highlighted rock at any depth |
@@ -88,6 +89,7 @@ Options:
| =--mineral CODE= | show a mineral's readings, e.g. =nativecopper= |
| =--min-reading NAME= | Find nearest's least reading for minerals, e.g. =high= or =very-poor=, or an ore map band, e.g. =86-100%=; default =decent= |
| =--find-mineral= | find the nearest such reading on start |
| =--find-cave= | find the nearest cave entrance on start |
| =--probe X Z= | probe the column at block X, Z on start |
| =--screenshot FILE.png= | wait until everything is drawn, save the window, quit |
| =--mouse X Y= | place the cursor, for screenshots |
@@ -112,7 +114,8 @@ The map fills the middle of the window, between two panels.
under it, as the Rocks section is set (at the surface, at a depth, or
at a height). At any depth, it gives the Y of the rock's topmost block
and how far down that is, or says the column has none. With the
Minerals overlay on, a second line gives the mineral's reading.
Minerals overlay on, another line gives the mineral's reading; with
the Caves overlay on, another gives the column's caves, top down.
The further out you zoom, the coarser the terrain is sampled: every
block when zoomed in close, one in 32 when far out. Only what is on screen is computed;
@@ -139,7 +142,9 @@ when nothing is left to compute, the viewer sleeps.
- *Probe*: the last column probed: its surface height and its strata,
top down, with the Y range and thickness of each. Below them, what
the prospecting pick reads there: every mineral it finds, highest
first, with its parts per thousand, then the miniscule amounts.
first, with its parts per thousand, then the miniscule amounts. Then
its caves, top down: air or lava, with the Y range of each, and
whether a cave opens at the surface there.
- /Go to/ centres it.
- /Clear pins/ removes the pins.
- /Close/ hides it.
@@ -181,6 +186,15 @@ when nothing is left to compute, the viewer sleeps.
- Silver, gold and peridot are listed as /(ore map)/. For them the
overlay shows the mineral's ore map, how common it is there, in
bands of sevenths, and Find nearest looks for a band.
- *Caves*: the caves the game carves.
- The Caves overlay colours each column by how far below the
surface its topmost cave starts, and marks entrances, where a cave
opens at the surface. The legend gives each band's share of the
view.
- /Find nearest entrance/ looks for the nearest cave entrance around
the centre of the view.
- Caves are carved a chunk at a time, every block of it, so the
overlay is slow to fill when zoomed out.
** vsmv
The command-line side, mostly for checking the generator against a