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
+13
View File
@@ -31,6 +31,16 @@ terminal). The platform layer — window, GPU, input, RGB332 palette — lives i
- [x] Map loader: Tiled-CSV parser in `server/src/map.rs` (flip-flag masking, content-derived
dimensions), `load_world` slices it into chunks, invisible solid border at the map rim.
Replaces the hardcoded `build_world`. See `notes/07-map-loader.md`
- [x] Client movement prediction: queued unconfirmed steps (`path` in `client/src/game.rs`),
paced at the server's 6 Hz movement cadence, reconciled against `EntityPacket` positions,
dropped after idle timeout. Shared collision vocabulary `shared::tile_collidable`
(currently empty — every tile walkable) keeps client prediction and server sim in lockstep.
- [x] Click-to-move: framebuffer click → world tile, A* over the chunk cache
(`client/src/game/pathfind.rs`, unknown chunks count as blocked), route translated into
cardinal actions one step per movement interval — the server only ever sees N/E/S/W and
stays authoritative. Keyboard input cancels the route; each step is re-validated at send
time and a blocked step voids the route. In-flight steps render bright blue, planned
route dim blue.
---
@@ -105,6 +115,9 @@ Sprite rendering already landed (see Achieved). What remains is the camera:
### Later — Robustness + auth
- Reactive pathfinding: replan from the confirmed position toward the original goal when a
route step is blocked or the server diverges from the prediction (currently the route is
simply voided)
- Auth token handshake: replace source-address identity (`auth_token` field exists but is unused)
- Multi-datagram `EntityPacket`: server currently truncates at 66 entities (`net.rs` TODO)
- Asset embedding: `include_bytes!` for single-binary distribution