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:
parent
3915af34c2
commit
e807fd556c
12 changed files with 229 additions and 6 deletions
|
|
@ -82,3 +82,12 @@ and `nav_crowd_us()` is what the stepping has cost. `nav_crowd_add_fixed` adds a
|
|||
but never steers (a player), which `nav_crowd_place` puts where it is, and how fast it goes, each frame. The mechanic decides and the crowd moves, and
|
||||
dropping a mesh drops its crowd first. On the test meadow, twenty walkers crossing head-on never come
|
||||
closer than their two radii, and a step costs about 12 us.
|
||||
|
||||
## Tiles resident by chunk (phase 23.5b)
|
||||
|
||||
`nav_load_index(kind, path)` loads a baked mesh as an index of its tiles and keeps its file open,
|
||||
with no tile in yet. `nav_tiles_keep(kind, xs, zs, n, rin, rout)` reads in the tiles within `rin`
|
||||
of any of the n points and lets go of those past `rout` of all of them. It is asked now and then,
|
||||
not every frame. The file is read through `file_open`, so a shipped game reads straight from its
|
||||
pack. `nav_tiles_in` / `_bytes` / `_all` say what is resident. Dropping the mesh closes the file.
|
||||
On Maroon the 900 / 1100 m ring round the start holds 617 of 1807 tiles, 8.9 MB of a person's mesh.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue