How Do Open-World Games Load the Map as You Move?

Drive toward a city in an open-world game and the skyline might be visible long before you can read the signs on its streets. By the time you reach those streets, the game has brought in much finer detail, often without interrupting the drive. The trick is called world streaming: the game keeps the parts you are likely to need in fast working memory and brings in new pieces as you move. Distant scenery can still be visible, but it can be drawn from a simpler version of the world.
Think of a city map divided into squares. Each square can have its own buildings, stretches of sidewalk, trees, and other objects. As you approach a new neighborhood, the game starts loading its squares. Once you have driven far enough away from the old neighborhood, some of its detailed content can leave working memory. Epic Games’ World Partition documentation describes an implementation that organizes a level into grid cells and uses a moving point, such as the player’s position, to decide which cells to load. Other engines can divide the work differently; the useful idea is that which pieces are in memory changes during play.
The square you are standing in is only the beginning. If the game waited until you crossed its edge to fetch the next square, you might reach a building before its model or texture was ready. A loading range gives the engine time to prepare the surroundings in advance. That range is a tradeoff: a wider buffer gives the game more time to respond when you take a fast corner, but keeping more neighborhoods ready consumes more memory. Some objects are needed beyond their immediate surroundings, so an engine can also keep selected content loaded independently of where you are.
Loading a piece of the world and choosing how to draw it are separate decisions. A game can show a detailed tree beside the road and substitute a simpler tree farther away. The branches that give the close tree its shape might cover less than a pixel each at a distance, making much of that work irrelevant to the image you see. Unity’s documentation on levels of detail describes choosing among versions based on how much of the screen an object occupies. As you approach and the tree fills more of your view, the more detailed model becomes useful.
A whole cluster of distant buildings can get similar treatment. Epic’s documentation on hierarchical levels of detail describes generating a stand-in from groups of objects. A group of rooftops that reads as a single landmark across the bay can therefore remain visible even when its individual detailed models are out of memory. If the simpler version and its replacement differ too much, you might notice a roofline change shape as you get closer. That visible switch is one form of what players call pop-in.
Travel speed makes the timing easier to notice. A pedestrian gives the engine much longer to prepare the next street than a car traveling down a straight highway. A teleport poses a different problem: the destination may have no overlap with the area already loaded. In Epic’s example, the engine can start loading around the destination before it moves the player there. For a normal drive, the game can coordinate the same kind of preparation with your changing position, so the next intersection is ready by the time you turn.
The next time a game lets you look across a river at a city you can actually visit, pick one building and watch it on the way over. From the far bank you need only its silhouette to recognize it. At street level, you can make out the windows, entrance, and objects on the sidewalk. That changing view reveals how a game can make a world feel continuous while keeping only a portion of its detail ready at once.
Comments
Post a Comment