18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-03 06:35:21 +01:00

docs(world-format): where the steps stand, and open decision D4 on the order-dependent rules under region streaming

Steps 1, 2, 3a and 3b are draft PRs #598, #600, #601 and #603. Loading the logic by regions runs into the rules of
today's loading that depend on the global order (repeated names, event ids, node groups, onstart events); D4
proposes that the compiler settles them in the order of the file and the cache keeps the outcome.
This commit is contained in:
maj00r
2026-12-02 23:47:55 +01:00
parent d9c6112be4
commit 12cfb32fb1
+22
View File
@@ -852,6 +852,27 @@ renderer merge.
running without end. It checks that the loop closes, that there are no seams at the edges of the faces, and that the memory stays
the same over the laps.
**Where the steps stand** (02.12.2026; each a draft PR):
| Step | PR | State |
| --- | --- | --- |
| 1 | #598 | the geometry library, with the tiles of the plane body |
| 2 | #600 (on #598) | the cache container, the parser tape, `world.binary`; checked in the game: the physics logs of `td.scn` and `Glinojeck.scn` the same bit for bit from the files, recorded and replayed |
| 3a | #601 | the sections of the region in a map by row and column instead of the grid of 500 × 500; the `.sbt` and `.btf` files byte for byte the same |
| 3b | #603 (on #601) | `world.unbounded`: the region reaches as far as its nodes, with its own `.unbounded.sbt` / `.unbounded.btf`; `td.scn` moved 400 km out runs as at its own place |
**The rest of step 3, and open decision D4.** Two parts are left: streaming the image layers (terrain, surroundings,
infrastructure) from tile blocks of the cache, which needs the GPU data of section 8, and loading the logic by regions. The logic
can't simply load region by region in another order than the file's, because several rules of today's loading depend on the global
order: a repeated track name goes to the newer track, a repeated event to the first one with the others joined to it, events get
their ids in load order, a template's node group is disbanded when it holds one node or fewer, and `onstart` events are queued as
they are inserted. Loaded in another order, the same scenery would come out different. **D4: how the order-dependent rules hold
under region streaming.** Proposed: the compiler settles them once, in the order of the file, and writes the outcome into the cache —
which object a repeated name refers to, the id of each event, the group of each node and whether it survives, the queue of `onstart`
events — so that a region loaded at any time gets the same outcome as a load of the whole scenery. The tape of each region then
holds only its own nodes, and a region-independent part (events with no place, the time, the weather, the trainsets) loads with the
package. Until D4 is settled the logic keeps loading whole, as step 2 does.
The steps are checked by unit tests (a round trip `.scn` → source → cache → export) and the editor self-test
(`EU07_EDITOR_SELFTEST`) with a comparison of screenshots, always on a copy of the scenery. The cache shares the compact vertex with
EU07M (section 8), so its GPU blocks go after the EU07M Vulkan stream (#537), or carry the layout themselves if that comes later. The
@@ -910,6 +931,7 @@ Open decisions for the maintainers (each with its options and consequences in th
| D1 | Positions of the logic read from `.scn` | (a) exact, int64 µm where the value converts back and double elsewhere, the gate of step 2 bit for bit; (b) compact int64 µm nodes with int32 µm offsets, the gate a tolerance and a change of behaviour. Proposed: (a) on the plane, (b) on a sphere | section 5 |
| D2 | Per-vehicle random streams | moved with the physics | `docs/physics-country-scale.md` |
| D3 | Caches and the SVN, for `.eu07` and EU07M alike | (a) the SVN keeps the sources, the release tool builds the caches into the packages; (b) caches in the SVN too | section 10 |
| D4 | The order-dependent rules of loading under region streaming | (a) the compiler settles them in the order of the file and the cache keeps the outcome (proposed); (b) regions load in the order of the file only, which ties streaming to it | section 13 |
Still to settle: