fix: wider surface terrain — lower noise frequencies for rolling hills
base freq 0.08→0.012 (~260 cell wide hills, was ~40) detail freq 0.23→0.04 (~78 cell features, was ~14) micro freq 0.57→0.11 (~28 cell ripples, was ~6) amplitudes reduced: base ±20→±15, detail ±10→±7.5, micro ±5→±2.5 Result: wide rolling hills instead of narrow sharp peaks.
This commit is contained in:
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
@@ -1182,18 +1182,18 @@ impl<'a> WorldGenerator<'a> {
|
||||
}
|
||||
|
||||
fn surface_height(&mut self, x: i32, h: i32) -> i32 {
|
||||
let base = (h - 3) - ((x as f32 * 0.08).sin() * scf(4.0)) as i32;
|
||||
let detail = ((x as f32 * 0.23).sin() * scf(2.0)) as i32;
|
||||
let micro = ((x as f32 * 0.57).sin() * scf(1.0)) as i32;
|
||||
let base = (h - 3) - ((x as f32 * 0.012).sin() * scf(3.0)) as i32;
|
||||
let detail = ((x as f32 * 0.04).sin() * scf(1.5)) as i32;
|
||||
let micro = ((x as f32 * 0.11).sin() * scf(0.5)) as i32;
|
||||
(base + detail + micro).max(10).min(h - 3)
|
||||
}
|
||||
|
||||
const SURFACE_BASE_Y: i32 = 120;
|
||||
|
||||
fn surface_height_world(&mut self, x: i32) -> i32 {
|
||||
let base = Self::SURFACE_BASE_Y - ((x as f32 * 0.08).sin() * scf(4.0)) as i32;
|
||||
let detail = ((x as f32 * 0.23).sin() * scf(2.0)) as i32;
|
||||
let micro = ((x as f32 * 0.57).sin() * scf(1.0)) as i32;
|
||||
let base = Self::SURFACE_BASE_Y - ((x as f32 * 0.012).sin() * scf(3.0)) as i32;
|
||||
let detail = ((x as f32 * 0.04).sin() * scf(1.5)) as i32;
|
||||
let micro = ((x as f32 * 0.11).sin() * scf(0.5)) as i32;
|
||||
(base + detail + micro).max(10)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user