Pathfinding and re-pickup of the project

This commit is contained in:
2026-07-16 21:08:30 +02:00
parent 5c8494961c
commit 674cf91ef3
7 changed files with 344 additions and 19 deletions
+12
View File
@@ -32,6 +32,18 @@ pub fn chunk_coords(id: u32) -> (i16, i16) {
(id as u16 as i16, (id >> 16) as u16 as i16)
}
/// Shared movement vocabulary: whether a tile id blocks movement.
///
/// Single source of truth for both the server (collision in the sim) and the client
/// (movement prediction). Keep this in lockstep with the tileset in `overworld.tga`.
/// Currently every authored tile is walkable.
pub fn tile_collidable(tile_id: u16) -> bool {
match tile_id {
// e.g. 146 => true, // trees / rocks
_ => false,
}
}
#[derive(Clone, Copy, Pod, Zeroable)]
#[repr(C, packed)]
pub struct Header {