fewer deserts

This commit is contained in:
2025-03-01 23:10:22 -06:00
parent 2be653504a
commit cc339b9389
4 changed files with 7 additions and 14 deletions

View File

@@ -149,7 +149,7 @@ get_biome_type :: proc(world_pos: Vec2i, seed: i64) -> Biome {
// Adjust temperature to create larger hot regions
// This skews the distribution to have more areas with higher temperature
temperature = math.pow(temperature * 0.5 + 0.5, 0.8) * 2.0 - 1.0
// temperature = math.pow(temperature * 0.5 + 0.5, 0.8) * 2.0 - 1.0
// Local variations (small details)
local_var := noise.noise_2d(seed, {f64(world_pos.x) * local_scale, f64(world_pos.y) * local_scale}) * 0.1
@@ -162,18 +162,11 @@ get_biome_type :: proc(world_pos: Vec2i, seed: i64) -> Biome {
normalized_moisture := moisture * 0.5 + 0.5
normalized_temperature := temperature * 0.5 + 0.5
// DEBUG: Uncomment to log values when testing
// fmt.println("pos:", world_pos, "temp:", normalized_temperature, "moisture:", normalized_moisture)
// Lakes appear in low elevation areas
if normalized_elevation < 0.3 {
return lake_biome
}
// ADJUSTED: More generous desert conditions
// Deserts appear in hot OR dry areas (not requiring both)
// This makes deserts more common and creates larger desert regions
if normalized_temperature > 0.55 && normalized_moisture < 0.4 {
if normalized_temperature > 0.6 && normalized_moisture < 0.3 {
return desert_biome
}