feat: square cells (16x16), slope stepping collision

Square cells:
- CHAR_W and CHAR_H both 16 (was 8x16, non-square)
- Window size updated to 160*16 x 50*16 = 2560x800
- Applies to both ascii and graphics renderers

Slope stepping collision:
- Before resolving X, check if new position overlaps solid
- If overlap, try stepping up 1 cell — if clear, snap up (walk up slope)
- If can't step up, resolve X normally (wall block)
- aabb_overlaps_solid() helper for fast overlap check
- Player can now walk up 1-cell-high steps and slopes

109 tests, 0 failures
This commit is contained in:
Emil
2026-06-21 01:06:37 +03:00
parent 45d2767719
commit 3235957a26
4 changed files with 49 additions and 19 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ use crate::world::cell::MaterialId;
use crate::world::grid::Grid;
use crate::world::material::MaterialRegistry;
const CHAR_W: u32 = 8;
const CHAR_W: u32 = 16;
const CHAR_H: u32 = 16;
const MAX_FRAMES: usize = 2;
+1 -1
View File
@@ -8,7 +8,7 @@ use crate::world::cell::MaterialId;
use crate::world::grid::Grid;
use crate::world::material::MaterialRegistry;
const CHAR_W: u32 = 8;
const CHAR_W: u32 = 16;
const CHAR_H: u32 = 16;
const ATLAS_COLS: usize = 16;
const ATLAS_ROWS: usize = 16;