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

docs(world-format): the logic layer of the cache holds the node definitions as tokens, read through today's parsers

The sentence on records of fields per object type came over unchanged from the version of 29.11 and was not
part of the second review. The cache keeps the definitions of the logic nodes as the compiler met them (includes
expanded, parameters put in, the transformations in force), and the game reads them through the same parsers
as .scn: the logic is the same bit for bit by construction, and the include directives of today's loading
are gone. Records of fields are a later layout, once the cache is built from the source format.
This commit is contained in:
maj00r
2026-12-02 21:50:20 +01:00
parent 3f302a5146
commit d9c6112be4
+7 -3
View File
@@ -466,9 +466,13 @@ tag.
zstd compression, in frames of about 64 KB, so that a large block can be unpacked in parallel. The library is already in the project
(the heightmap).
**The logic layer** is records by object type (track, traction, event, memcell…), by region of level 10, read when the region loads
(section 5). Each record has its size first, so an older reader skips the fields it doesn't know. Names are ids from the name table.
The coarse track network is a block of its own, read when the package loads.
**The logic layer** holds, by region of level 10, the definitions of the logic nodes (tracks, traction, events, memcells, launchers,
models with a state) as the compiler met them: their tokens with the includes expanded, the parameters of templates put in and the
`origin` / `rotate` / `scale` in force at that point. The game reads it through the same parsers as `.scn`, so the logic it builds is
the same bit for bit by construction (D1 (a) on the plane), and the 1.2 million include directives of today's loading are gone. It is
read when its region loads (section 5). It is a cache, tied to the engine hash, so its layout can change with any version; records of
fields per object type are a later layout of it, once the source format exists (section 10, E2) and the cache is built from the
source rather than from `.scn`. The coarse track network is a block of its own, read when the package loads.
**Versioning.** The source only ever gains fields, which an old reader skips. A minor version of the cache adds tags and fields, and
an old reader skips them. A major version, a different engine hash or a different source hash means the cache is rebuilt from the