feat: height-redistribution curve, gated + biome-invariant (terrain-water task 05)
HeightCurve (pure static, D-035): calibrated monotonic piecewise map — identity at/below sea 0.15; ease-out toe to the orange ceiling 0.206 (75% coverage, knot t1=P75=0.628736 from batch-04's pooled flat-sea land CDF, 340.6M samples); linear rise to red 0.27 (t2=P90); smooth shoulder to the 50m plateau shelf 0.3492 (t3=P93); near-flat plateau step (t4=P96); accelerating spike to the 220m peak cap 1.0265; linear tail past the calibrated max. Strict monotonicity asserted numerically at startup, loud throw on violation. Applied in GenerateTopography AFTER noise+falloff+Trench, BEFORE the crater carve (carve cuts curved terrain; rim/bowl untouched by the curve). Biome oracle mechanism: a retained uncurved classify heightmap (alias of _heightMap when off, zero cost) feeds biome rules, both flood fills, and the shared water predicates — classification is curve-invariant by construction. Towns/roads/diagnostics/exported heights use curved terrain; town positions may legitimately move. Config gate TerrainCurve: "off"|"v1" (default v1), unknown values rejected loudly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
9e55324668
commit
67868638be
3 changed files with 159 additions and 11 deletions
|
|
@ -26,6 +26,12 @@ namespace IslaApocalypse.Core // Change this if your namespace is different
|
|||
public static string SeaLevelModel = "flat";
|
||||
public static float SeaLevelValue = 0.15f;
|
||||
|
||||
// Height-redistribution curve (task 05, graduation M-7): "v1" applies the
|
||||
// calibrated storm-ladder curve to above-sea terrain (see HeightCurve.cs);
|
||||
// "off" is the raw legacy profile. Biome classification is curve-invariant
|
||||
// by construction either way. Default: v1.
|
||||
public static string TerrainCurve = "v1";
|
||||
|
||||
public static void LoadConfig()
|
||||
{
|
||||
string path = "res://ServerConfig.json";
|
||||
|
|
@ -95,6 +101,16 @@ namespace IslaApocalypse.Core // Change this if your namespace is different
|
|||
SeaLevelValue = (float)data["SeaLevelValue"];
|
||||
}
|
||||
|
||||
// Extract the terrain-curve gate
|
||||
if (data.ContainsKey("TerrainCurve"))
|
||||
{
|
||||
string curve = (string)data["TerrainCurve"];
|
||||
if (curve == "off" || curve == "v1")
|
||||
TerrainCurve = curve;
|
||||
else
|
||||
GD.PrintErr($"[ConfigManager] Unknown TerrainCurve '{curve}'. Keeping '{TerrainCurve}'.");
|
||||
}
|
||||
|
||||
switch (profile)
|
||||
{
|
||||
case "4K":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue