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>
This commit is contained in:
2026-10-10 11:59:26 +03:00
parent 53950a465c
commit 2c16f8caef
6 changed files with 335 additions and 17 deletions

View File

@@ -4,10 +4,11 @@
SEXC ?= $(HOME)/dev/sex/sexc
CFLAGS ?= -O2 -g
CFLAGS += -std=c11 -Wall -ffp-contract=off -fwrapv
CPPFLAGS += -Isrc -Ithird_party/nuklear -Ithird_party/stb -IcJSON $(shell pkg-config --cflags sdl3)
CPPFLAGS += -Isrc -Ithird_party/nuklear -Ithird_party/stb -IcJSON $(shell pkg-config --cflags sdl3 libzstd)
# Sex writes C with only the parentheses precedence needs.
SEX_CFLAGS = -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses -Wno-shift-op-parentheses
SDL_LIBS := $(shell pkg-config --libs sdl3)
ZSTD_LIBS := $(shell pkg-config --libs libzstd)
B = build
@@ -33,12 +34,12 @@ $(B)/stb.o: src/stb.c third_party/stb/stb_image_write.h | $(B)
VSMV_OBJ = vsmv cs pb json maps save img dump lcg noise shape worldgen fastnoise rivers terra strata ores settings verify cJSON stb
$(B)/vsmv: $(VSMV_OBJ:%=$(B)/%.o)
$(CC) $^ -o $@ -lsqlite3
$(CC) $^ -o $@ -lsqlite3 $(ZSTD_LIBS)
VIEWER_OBJ = viewer tiles search hover settings worldgen fastnoise rivers terra strata ores shape noise lcg maps save pb json cs nk cJSON stb
$(B)/vs-map-viewer: $(VIEWER_OBJ:%=$(B)/%.o)
$(CC) $^ -o $@ $(SDL_LIBS) -lsqlite3
$(CC) $^ -o $@ $(SDL_LIBS) -lsqlite3 $(ZSTD_LIBS)
$(B):
mkdir -p $@