Design
The world streamer: square cells, and deadlines in seconds
The streamer's job is stated as throughput: a car at 200 km/h, and an aircraft after it, must never see or touch anything that is not loaded, and the frame must not notice the loading.
The design, as approved:
- Square cells of 128 m in a quadtree. A cell of level n+1 is exactly four of level n and holds the same place at coarser detail.
- A cell ships as pages. A page is one block of bytes for one cell, level and class of data, made by the baker, that mounts without being interpreted item by item.
- Classes of data, each with its own deadline and budget: collision under and ahead of the player, collision, visual, detail geometry, detail texture, navigation, population, audio, lights.
- A ring is a time, not a distance. "Collision within 0.5 s", "visual within 2 s". The distance is the time multiplied by the speed, with a floor so that standing still loads something and a cap so that a teleport does not ask for ten kilometres. The region leans along the velocity.
- Earliest deadline first, within a budget of bytes in flight. A request whose reason has gone is cancelled.
- The index is resident. Nothing is read from an archive to decide what to read. A page whose hash does not match is refused, counted and reported, never mounted.
- Deciding runs off the main thread. The main thread takes finished pages and mounts them under a budget in microseconds.
- Scripts get tickets. A mission asks for a place and waits on a ticket behind a cover sequence. The streamer has no call that blocks.
What would make it a failure even if it works: a frame that waits for the disk; a per-object cost on the main thread creeping back in; radii that need tuning by hand for each vehicle.
Detail by feedback (cluster hierarchies and partly resident textures) is designed and not built. Until it is, a page carries its meshes and textures whole.