mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-15 04:05:02 +01:00
Make surface and cave generation make more sense
This commit is contained in:
parent
134e03db7e
commit
0a345aae5e
2 changed files with 11 additions and 2 deletions
BIN
res/tiles.png
BIN
res/tiles.png
Binary file not shown.
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 14 KiB |
13
src/world.rs
13
src/world.rs
|
|
@ -114,10 +114,19 @@ impl Chunk {
|
|||
mid: 0,
|
||||
fg: 0,
|
||||
}; CHUNK_N_TILES];
|
||||
if pos.y > 38 {
|
||||
if pos.y == 39 {
|
||||
for (i, b) in tiles.iter_mut().enumerate() {
|
||||
if i / CHUNK_EXTENT as usize == 0 {
|
||||
b.fg = 8;
|
||||
}
|
||||
b.mid = 2;
|
||||
b.bg = 9;
|
||||
}
|
||||
}
|
||||
if pos.y > 39 {
|
||||
for b in &mut tiles {
|
||||
b.bg = 7;
|
||||
b.mid = rng.gen_range(1..5);
|
||||
b.mid = 1;
|
||||
if rng.gen_bool(0.1) {
|
||||
b.fg = 6;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue