18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-04 23:45:17 +01:00
Files
maszyna/world
maj00r 6aa548a796 feat(scene): with world.binary the region file is only looked through, each section loads its geometry as it comes into use
A first step of streaming the image (docs/world-format-eu07.md, step 3). The region file (.sbt) is the cache of
the static geometry the scenery already has: with it present, the shapes of the .scn are left out and come from
the file. With world.binary the file is no longer read whole as the scenery loads: basic_region::defer_sections()
looks through it (the index, the size and the bounding area of each section, after the layout was checked as
before) and gives each section a region_block, its place in the file. A section loads its geometry from there
the first time it comes into use, as the sections of the binary terrain files (.btf) already do: when it is
about to be drawn (create_geometry), or when the simulation reads its ground, so what the simulation does
doesn't depend on what was drawn (the motion of a vehicle off the track, the deer). Region::load_terrain() loads
what waits too. Without world.binary nothing changes.

Checked in the game (--test 120 s, seed 1): the physics logs of Glinojeck.scn and td.scn the same bit for bit as
from the files with the section geometry deferred. Glinojeck (53 sections, world.binary 1) peaks at 548 MB
with the sections deferred against 609 MB with them loaded at once; with world.binary 0 it stays at 495 MB, the
difference being the tape of the logic cache kept while replayed.

Sections aren't unloaded yet; that, and the tiles of the image in the world cache, are the next steps.
2026-12-03 03:10:31 +01:00
..