feat(world-gen): rescale biome relief and snow line for 512-tall world
This commit is contained in:
@@ -20,8 +20,8 @@ public class BiomeTests
|
||||
{
|
||||
var blocks = new BlockRegistry();
|
||||
var biomes = new BiomeRegistry(42, blocks);
|
||||
Assert.Equal("Stone", biomes.Mountains.TopBlock(70).Name);
|
||||
Assert.Equal("Snow Block", biomes.Mountains.TopBlock(120).Name);
|
||||
Assert.Equal("Stone", biomes.Mountains.TopBlock(200).Name); // below snow line
|
||||
Assert.Equal("Snow Block", biomes.Mountains.TopBlock(420).Name); // above snow line (384)
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -43,11 +43,11 @@ public class TerrainSamplerTests
|
||||
for (int x = -200; x < 200; x += 3)
|
||||
for (int z = -200; z < 200; z += 3)
|
||||
{
|
||||
// The dense blur removes inter-biome cliffs (those would be 25+ blocks).
|
||||
// Remaining deltas are rugged intra-Mountains ridged slopes (~9), which
|
||||
// are intended terrain, not cliffs; 16 separates the two.
|
||||
// The dense blur removes inter-biome cliffs. Remaining deltas are
|
||||
// rugged intra-Mountains ridged slopes, now ~4x larger after the
|
||||
// 128->512 rescale; 64 separates intended slopes from true cliffs.
|
||||
int dx = System.Math.Abs(sampler.HeightAt(x, z) - sampler.HeightAt(x + 1, z));
|
||||
Assert.True(dx <= 16, $"height jump {dx} at ({x},{z})");
|
||||
Assert.True(dx <= 64, $"height jump {dx} at ({x},{z})");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user