chat2/02 dissolved the terraces and lost two thirds of the mountain with them, then
concluded the loss was structural and needed a Phase-1 noise change. That conclusion
was wrong, and this commit is the refutation.
A monotone curve is a free reparametrization: it may be gentle in one place and steep
in another, and can lift bottom-heavy input into a substantial massif without ever
going flat. The area above a height is set by where the percentile->height mapping
crosses it, and that mapping is entirely ours to choose. The 02 sweep that "proved"
the loss structural varied climbFeather, which shapes the JOIN, not the mass
distribution — the wrong knob, and too strong a conclusion drawn from it.
Core/ClimbCalibration — the climb's control points are now MEASURED off the staircase
instead of invented from shape knobs. For p in {10,30,50,70,85,95} of above-ceiling
land, take that percentile's raw height and its staircase output height; PCHIP through
the pairs. That reproduces the staircase's elevation envelope, so the mountain mass
returns, while MinNormalizedSecant floors every grade so the flat bench and plateau
interiors become slope. The floor bites on exactly one segment — the plateau — which
is precisely where the staircase was flat.
ContinuousCurve.BuildCalibrated joins it to the same pinned lowland handover, the same
C1 join and the same per-seed spikeMax. The 02 analytic path survives unchanged as the
"before" contrast, and deliberately keeps its strictly-increasing-secant rule: a
calibrated curve is WAVY by design, so convexity is the wrong invariant for it and the
secant floor is the right one.
peakSharpness replaces summitDrama and fixes its bad trade. Drama steepened the peak by
pulling the summit ONSET down, dragging the whole massif with it (p99 199 -> 121 m).
Sharpness reshapes only above the last measured percentile, leaving that height fixed,
so peak and massif are independent: raising it leaves p90, >100 m and >220 m untouched
and only moves land within the summit.
Measured, both seeds, 2048:
variant >100 m >220 m p90
staircase (target) 16.05% 4.53% 127.4 m
continuous_02default 4.80% 0.63% 58.4 m
continuous_restored 14.25% 3.45% 123.2 m
continuous_bigger 19.70% 5.80% 163.5 m
Oracle all hard checks pass, including (a2) staircase still bit-identical to task 01's
dump and (d) lowlands bit-identical across every calibrated variant. New (g) reports
land above 100/220 m per variant and is deliberately NOT gated — it is a taste target
the developer tunes, and gating it would make mountainLift unusable. What it must never
do is stay silent, which is how 02 lost the mountain unnoticed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCWNaDZPfTiAy3meGNGgqt
|
||
|---|---|---|
| .. | ||
| Scripts | ||
| README.md | ||
Core — math and data only
Holds: the column model, the material schemas, the scaling discipline, tooling path resolution and the file-safety rails. Constants and contracts.
Boundary: Core depends on nothing above it. Not on Server/, not on Client/, not on
Tools/. The dependency arrow points one way into this folder and never out of it.
⚠ Additional boundary, tighter than the layer rule: Core is engine-free.
No
using Godot;anywhere in this folder. Core is plain C# — noNode, noGD.Print, noProjectSettings, no engine types in any signature.Two reasons, both load-bearing. (1) D-049 commits to "C# for fast iteration, with C++-ready seams… port path-by-path when settled and hot" — the hot paths that get ported first are exactly the ones in here, and a type that names
Godot.Vector2cannot cross that seam. (2) It keeps the column model testable and reviewable without standing up an engine.Where Core genuinely needs something the engine knows — the resolved
user://directory — the engine layer hands it in (ToolingPaths.Configure), rather than Core reaching for it. If you find yourself wanting an engine type here, the type belongs one layer up.
What is in here
| File | What it is |
|---|---|
Scripts/Column.cs |
★★ The load-bearing contract (D-053). A column as run-length bands; MaterialRun; RunOrigin. Read its header before touching anything that stores world data. |
Scripts/ColumnGrid.cs |
The 2D grid of columns. Shape only — chunking and streaming are later phases. |
Scripts/MaterialKey.cs |
Material identity — a registry key, never an ordinal. |
Scripts/TerrainMaterial.cs |
A row in the terrain schema (D-054). |
Scripts/BuildingMaterial.cs |
A row in the building schema (D-054). |
Scripts/MaterialRegistry.cs |
Both registries, append-only, seed rows only. |
Scripts/RecipeRegistry.cs |
The transformation seam — deliberately empty. |
Scripts/GenerationScale.cs |
⭐ The scaling discipline. MapSize, ScaleFactor, normalized offsets, the two frequency conventions. |
Scripts/WorldScale.cs |
⭐ The vertical yardstick. The ONE metres↔raw conversion (251 m/unit). No literal 251f anywhere else. |
Scripts/HeightCurve.cs |
⭐⭐ The height-redistribution curve (v5), 7 bands. Identity at and below sea. |
Scripts/CurveKnots.cs |
The six INPUT knots — percentiles of the measured land CDF, plus the reference's for comparison. |
Scripts/CurveAnchors.cs |
The OUTPUT anchors — the storm-ladder elevations each band lands at. |
Scripts/TerrainDetailPass.cs |
Shelf micro-relief + the shelf-edge knot warp. Output-height only. |
Scripts/ToolingPaths.cs |
Every tooling path, env-overridable, resolved in one place. |
Scripts/FileSafety.cs |
The permanent file-safety rules, as throws rather than sentences. |
The three rules this layer exists to make unbreakable
- Air is the top run. There is no "air vs solid" height branch, anywhere, ever.
→
Scripts/Column.cs. - Properties come from the registry, never from storage. A run stores an identity.
→
Scripts/MaterialRegistry.cs. - Nothing uses a raw pixel number. Every distance is a fraction of
MapSize. →Scripts/GenerationScale.cs. - There is one metres-per-raw-unit number. The prototype scattered
251across three duplicate constants and ~20 literals, and the generator never used the derived one at all. →Scripts/WorldScale.cs.
Not here, and not by accident
- No water. Water is an overlay over the columns (levels-not-cells), never a band.
- No biomes. Biomes are a later classification of finished shape, not an input to it (D-049).
- No algorithms beyond the height curve. Phase 2 added
HeightCurveandTerrainDetailPasshere because they are pure, engine-free, C++-candidate math that defines the world's elevation profile — a contract, not a tool's dial. Stratigraphy, feature passes, meshing and run-splitting on dig are still later phases. - No erosion, rivers, water bodies, crater carve, coast shelf or offshore islets. Later chat2 tasks; the curve is deliberately the only pass-2 element present.
→ Design - Data - Column Model.md, Design - Data - Material Schema.md,
Design - Tooling - Scaling Discipline.md