ludic.nav (23.5b): a baked mesh resident by chunk

nav_load_index indexes a saved mesh's tiles (cell, offset, size, ref) from their headers and keeps the file open, with no tile in. nav_tiles_keep reads in the tiles within rin of any player and removes those past rout of all; the file is read through Ludic's pack-aware file_open. The file format is unchanged. tiles_test: tiles come and go with the point, a path works across the seams once they are in, and a reset closes all. Measured on the baked maps (the 900 / 1100 m ring round the start): Maroon 617 of 1807 tiles in, 8.9 MB instead of about 27 MB for a person and 5.4 MB of about 14 for a large walker; Lamar 391 of 1147. Both libraries are rebuilt; nav 17/17 on the Mac and the PC, DLL KERNEL32 only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 11:07:27 +03:00
parent 3915af34c2
commit e807fd556c
12 changed files with 229 additions and 6 deletions

View file

@ -26,4 +26,14 @@ extern function nvc_crowd_speed(c: pointer, i: int, speed: float) -> void = "nav
extern function nvc_crowd_update(c: pointer, dt: float) -> void = "nav_crowd_update"
extern function nvc_crowd_read(c: pointer, i: int, out: pointer) -> int = "nav_crowd_read"
extern function nvc_crowd_us(c: pointer) -> int = "nav_crowd_us"
extern function nvc_unstage(buf: pointer) -> void = "nav_unstage"
extern function nvc_index_open(head: pointer) -> pointer = "nav_index_open"
extern function nvc_index_count_in(head: pointer) -> int = "nav_index_count_in"
extern function nvc_index_put(h: pointer, rec: pointer, offset: long) -> int = "nav_index_put"
extern function nvc_index_count(h: pointer) -> int = "nav_index_count"
extern function nvc_index_tile(h: pointer, i: int, out: pointer) -> int = "nav_index_tile"
extern function nvc_index_offset(h: pointer, i: int) -> long = "nav_index_offset"
extern function nvc_index_size(h: pointer, i: int) -> int = "nav_index_size"
extern function nvc_index_in(h: pointer, i: int, data: pointer, size: int) -> int = "nav_index_in"
extern function nvc_index_out(h: pointer, i: int) -> int = "nav_index_out"
extern function nvc_load_staged(buf: pointer, size: int) -> pointer = "nav_load_staged"