Skip to content

Commit 4202701

Browse files
committed
change world height to prevent lags (to change later)
1 parent cb27053 commit 4202701

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/world.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ fn generate_chunk(
118118
let perlin = Perlin::new(seed);
119119

120120
let scale = 0.1;
121-
let max_perlin_height_variation = 10.0;
122-
let base_height = 64;
121+
let max_perlin_height_variation = 5.0;
122+
let base_height = 10; // should be 64
123123

124124
const CHUNK_SIZE: i32 = 16;
125125
const WORLD_MIN_Y: i32 = 0;
@@ -146,7 +146,7 @@ fn generate_chunk(
146146
for y in WORLD_MIN_Y..=terrain_height {
147147
let block = if y == 0 {
148148
Block::Bedrock // Placer la bedrock à la couche 0
149-
} else if y < terrain_height - 3 {
149+
} else if y < terrain_height - 2 {
150150
Block::Stone // Placer de la pierre en dessous des 3 dernières couches
151151
} else if y < terrain_height {
152152
Block::Dirt // Placer de la terre dans les 3 couches sous la surface

0 commit comments

Comments
 (0)