better dorf z

This commit is contained in:
StephenAdamson
2025-01-25 16:54:27 +00:00
parent 7143a9dded
commit 501c66a1b0
3 changed files with 17 additions and 19 deletions
+5 -6
View File
@@ -150,16 +150,15 @@ pub fn generate_surface_noise(x: i32, y: i32) -> f32 {
let noise = Perlin::new(0);
let mut noise_value = 0.0;
let mut amplitude = 1.0;
let mut frequency = 0.008; // Reduced initial frequency for smoother base terrain
let mut frequency = 0.008;
// Reduced number of octaves for less rough detail
for _ in 0..6 {
noise_value += noise.get([x as f64 * frequency, y as f64 * frequency]) * amplitude;
amplitude *= 0.6; // Gentler amplitude falloff
frequency *= 1.8; // Gentler frequency increase
amplitude *= 0.6;
frequency *= 1.8;
}
(noise_value * 2.5) as f32 // Reduced height multiplier for less extreme elevation
(noise_value * 2.5) as f32
}
fn handle_chunk_loading(
@@ -287,7 +286,7 @@ fn handle_chunk_loading(
fn setup_initial_chunks(mut event_writer: EventWriter<LoadChunkEvent>) {
println!("setup_initial_chunks");
for x in -3..=3 {
for x in -9..=9 {
for y in -2..=2 {
event_writer.send(LoadChunkEvent {
chunk_position: IVec2::new(x, y),