World objects are stored as lightweight data (position/velocity/type). Pixi display objects are created only for visible elements. This keeps memory predictable and makes performance scale with what the camera actually sees.
The world is divided into fixed-size cells. Each object is assigned to a cell:
cellX = floor(x / cellSize), cellY = floor(y / cellSize).
Cells are stored in a map (chunked lookup).
On each camera update, compute the visible rectangle (viewport + margin) and query only intersecting cells. Off-screen objects do not exist in the active Pixi render tree, so they do not consume rendering cost.
Reuse Pixi display objects instead of creating/destroying them during panning.
Lifecycle is driven by visibility:
visible → acquire, invisible → release.
Smooth panning (with inertia/smoothing) keeps navigation responsive while the visibility-driven render tree adapts.
Same system, three representations: abstract (this page) → story → live simulation.