Chunks and Streaming

This document covers the chunk-based world structure used by Workspace, including how maps are divided, loaded, saved, and kept responsive while moving through larger spaces.

Chunked World Format

Worlds are stored as 3D chunks instead of one large map file. Each chunk acts as a local container for the objects, geometry, save state, and runtime data in that area of the world.

This structure makes large workspaces more practical to edit and test. Objects can belong to the chunk they are placed in, move between chunks when needed, and be managed as part of the surrounding world area rather than as one global object list.

Streaming and Runtime Use

Chunks are loaded around the active position and unloaded when they fall outside the current working area. This lets the project support larger worlds without keeping every part of the map active at once.

The streaming path includes background loading, priority handling, and throttled work so chunk loading and geometry updates can happen without constantly interrupting play or editing. The system also adapts under heavier load, which helps keep traversal and testing responsive.

Saving, Geometry, and Related Work

Chunks are also the save boundary for map data. Changed chunks can be saved independently, and loading or saving work stays tied to the current workspace.

Geometry is handled per chunk as well. When objects change, the affected chunk can rebuild its local geometry rather than forcing the whole world to update. Chunk rendering also connects to nearby lighting data, visibility checks, object registration, and cleanup when unloaded objects leave memory.

The main value of the chunk system is that it keeps large authored spaces manageable: maps can stream, save, render, and update in pieces while still behaving like one continuous world.