Rebuild lake generation: bowls in valleys filled to their spill level (t96)

Lakes no longer pour water to a guessed lip and repair it afterwards. Each lake lowers the land
in the nearest valley with a smoothstep bowl, and water fills it to its spill level (the lower of
the highest ground on each side, Priority-Flood in one dimension), so it is flat and contained by
construction. Clay beds, no caves or loose pockets close under lakes, trees kept off the shore.
Removes the levelling pass, the lower-rim lip and the bank-slope cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cj2RPXdPykKMEz5BXXczsj
This commit is contained in:
2026-10-29 20:55:52 -04:00
co-authored by Claude Opus 5.5
parent e3e01a84b1
commit daeb3b2238
9 changed files with 165 additions and 206 deletions
+22
View File
@@ -4,6 +4,28 @@ What agents have done, newest first. Add an entry for every piece of work: the d
note or request it was for, what changed, the files touched, the tests run, and anything left
open or not verified. Keep each entry short; the git history has the details.
## 2026-10-29: t96 rebuilt: lakes are bowls filled to their spill level (Claude)
- Owner: the round-4 bank was a flat, unnatural ramp; fix lake generation properly instead of
patching. Mapped worldgen first: banks and beds are solid (only sand, gravel, snow and liquids
move while settling), so the original tilt was water poured above the lower rim spilling out,
not slumping banks (Claude's earlier explanation was wrong). Researched depression filling
(Priority-Flood) and its 1D form. Owner chose planned lakes only and clay beds.
- src/sim/worldgen.js: lake goes to the lowest smoothed ground within 60 grains of its plan (80
from spawn); smoothstep bowl added to the land's own shape, deepened up to 3x until 12+ deep;
water fills to `spillLevels` (new, worldgen-helpers.js) within the bowl; clay bed (3 rows),
grass stops at the waterline; no caves or sand/gravel pockets within 40 rows under a lake or 12
columns of it; noTree 6 columns from water. Removed levelWorldWater, the lip, the 0.7 bank
cap, the dock-first ordering and the post-settle tree re-check.
- Measured on 10 seeds (incl. owner's 766733/12446/23565 at 6144x2048): lakes 120-231 wide,
14-47 deep, exactly flat, banks no steeper than 3 per column, no wet trees, each lake's
surface and water identical after 3000 ticks (underground aquifers still drain, as before).
Screenshots of all four seeds checked in the smooth/pixel looks. Generation time within 5%.
- Tests: t_lakes.js rewritten (flat, held by banks, clay bed, no cliff, real lake, dock clear,
stable 3000 ticks, spillLevels fixture; Huge seed 766733); hashes re-baselined in t_lakes,
t_corner_seal and t_world (shallow ore: 724 of 27,985 cells, all within old/new lake spans).
Full `run_all.py --browser`: ALL PASSED.
## 2026-10-29: t96 round 3, lakes fill to their lower rim (Claude)
- Owner chose option 2. src/sim/worldgen.js: lake `lip` is the lower rim edge minus one (was