diff --git a/Core/Configuration.cs b/Core/Configuration.cs index 157dc38..f2d55b0 100644 --- a/Core/Configuration.cs +++ b/Core/Configuration.cs @@ -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; } diff --git a/VoxelEngine.Tests/ConfigurationTests.cs b/VoxelEngine.Tests/ConfigurationTests.cs index 277ece8..7efb95d 100644 --- a/VoxelEngine.Tests/ConfigurationTests.cs +++ b/VoxelEngine.Tests/ConfigurationTests.cs @@ -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); } }