feat(worldgen): beaches along seas and larger lakes (#679) - #682
Merged
Conversation
A water shoreline now grows beaches: a jittered 1..3-block band above the waterline, confirmed against real nearby water (8-dir probe ring), plus a submerged sandy apron (seabed <=3 under the sea line). A large-scale coast-character mask (~55-60 %) alternates beach with bare rocky shore. - RiverField labels fill-and-spill lakes (connected cells, one filled level) and pre-rings lakes with >=64 visible water columns with dry shore markers (TryGetLakeShore); small pools/rivers get no beach. Large ponds (bowl >=3 deep nearby) get a mask-edge rim. - New optional planet data key `beachBlock` (default sand); beaches only on WATER shorelines - lava seas keep their volcanic coasts. - Override order: biome -> beach -> snow/ice -> volcano basalt. Shared IsBeachColumn query keeps Generate, tree stamping and tests agreeing. - Beach columns grow only palms/dead snags (palm-fringed tropical shores); giant fungi skip beaches; flora uses the sand host pool at x0.35 density. - 5 new tests (BeachGenerationTests); 1400 server tests green. Closes #679 Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements worldgen beaches (#679): sand (or a per-planet
beachBlock) along the waterline of the sea and of larger lakes/ponds — on beach-masked stretches of coast, with a sandy shallow-water apron, palm-fringed tropical shores, and none on dry/airless/lava-sea worlds.How it works
RiverFieldlabels each pooled reach's fill-and-spill lake (connected coarse cells sharing one filled level) and pre-rings lakes with ≥64 visible water columns with dry shore markers (TryGetLakeShore). Small pools, 1-wide rivers and puddle ponds get no beach; large ponds (bowl ≥3 deep nearby) get a rim at the pond mask's edge.beachBlock(defaultsand, validated at content load). Beaches form only on WATER shorelines — lava seas keep their volcanic coasts. Surface AND sub-surface turn to the beach block, so the varied topsoil depth yields a real 2–5-block sand layer.IsBeachColumnquery keepsGenerate, tree stamping and tests agreeing. Beach columns grow only palms/dead snags (themes with neither leave the beach bare); giant fungi skip beaches; surface flora comes from the sand host pool at ×0.35 density.Compatibility & performance
Generateis O(1) gates; the probe runs only for columns inside the narrow waterline band. The lake-shore pass runs once per world inside the cachedRiverFieldbuild and only touches lake-edge columns (~perimeter, not area).Tests
5 new tests in
BeachGenerationTests: sea coast grows beaches + Generate paints them, sandy apron in the shallows, no beaches on dry/lava/airless worlds, cross-instance determinism, and a synthetic-basin lake-shore ring incl. size threshold. Full non-Slow suite 1348/1348 and all 38 worldgen/river tests (incl. Slow) green locally; clean rebuild with 0 warnings.Closes #679
🤖 Generated with Claude Code