feat(world-gen): move cave ceiling and dark bands to new sea level (256)

This commit is contained in:
MDietermann
2026-06-03 07:53:34 +02:00
parent 715444d10a
commit cba6b8c761
2 changed files with 8 additions and 8 deletions

View File

@@ -61,12 +61,12 @@ public sealed class Configuration
public float WormMinRadius { get; set; } = 1.5f;
public float WormMaxRadius { get; set; } = 3.5f;
// Ceiling: caves carve only at or below this world-Y ("no caves above").
// Default 127 = world top (WorldHeight - 1) → no effective ceiling. Lower it
// to keep caves away from the surface (removes surface cave mouths).
public int MinCaveY { get; set; } = 127;
// Default 256 = SeaLevel → caves stay below sea level, keeping the taller
// surface terrain solid. Raise toward WorldHeight-1 to allow surface caves.
public int MinCaveY { get; set; } = 256;
// -- Cave lighting (fog-distance darkness) --
public float CaveDarkStartY { get; set; } = 72f; // WorldConstants.SeaLevel + 8
public float CaveDarkEndY { get; set; } = 32f; // WorldConstants.SeaLevel - 32
public float CaveDarkStartY { get; set; } = 264f; // WorldConstants.SeaLevel + 8
public float CaveDarkEndY { get; set; } = 224f; // WorldConstants.SeaLevel - 32
public float CaveMinBrightness { get; set; } = 0.15f;
}

View File

@@ -70,8 +70,8 @@ public class ConfigurationTests
Assert.Equal(3.5f, c.WormMaxRadius);
// Lighting (fog)
Assert.Equal(72f, c.CaveDarkStartY); // SeaLevel (64) + 8
Assert.Equal(32f, c.CaveDarkEndY); // SeaLevel (64) - 32
Assert.Equal(264f, c.CaveDarkStartY); // SeaLevel (256) + 8
Assert.Equal(224f, c.CaveDarkEndY); // SeaLevel (256) - 32
Assert.Equal(0.15f, c.CaveMinBrightness);
}
@@ -83,6 +83,6 @@ public class ConfigurationTests
Assert.Equal(1, c.SurfaceShellSkirtBelow);
Assert.Equal(0.7f, c.FogStartFraction);
Assert.Equal(new OpenTK.Mathematics.Vector3(0.45f, 0.65f, 0.95f), c.SkyColor);
Assert.Equal(127, c.MinCaveY);
Assert.Equal(256, c.MinCaveY);
}
}