Engine & tech
Texture streaming
Also: on-demand texture loading, asset streaming
Texture streaming means loading and releasing images on demand while the game runs, instead of putting everything into graphics memory at startup. The goal is short load times and a fixed memory budget, even on weaker devices.
Background
3D games often stream textures in several resolution levels: a coarse version first, the detailed one once the camera gets closer. In 2D adventures the maths is simpler but not harmless, because a large painted background with several state variants plus lots of sprite sheets easily takes hundreds of megabytes.
A good loading plan separates three groups: what always stays loaded, what the current scene needs, and what might come next. Whatever has gone unused the longest gets released first.
Classic mistakes are graphics visibly popping in because a scene starts before its images arrive, and a memory budget that never shows up on a development machine but crashes the browser tab on an older phone.
How we do it
The Wurzelwerk engine handles this with textureLoading: “scene”. At startup it loads only the title image, items and portraits. Each scene then adds its matching background, the visible characters with their outfits and the ambient layer; if anything is missing, the scene transition stays black until it arrives. Afterwards it preloads neighbouring scenes in the background, meaning the targets of exits, including those reached through dialogue.
Once roughly 40 million pixels are in use, a little over 160 MB of graphics memory, the engine releases whatever has gone unused longest. The loading plan is pure calculation without the graphics library, so it can be tested. Spätlese 404 still loads everything at startup; Tatort RMH, with its many scenes and seasons, needs the plan.
Related terms
- Sprite sheetEngine & techA sprite sheet is a single image holding every frame of a character or animation in a grid, plus a description of the sequences.
- Headless engineEngine & techA headless engine can run game logic without graphics or sound, for example for tests, servers or tools.
- Data-driven designEngine & techData-driven design separates game content from code: scenes, rules and text live in data files that the engine simply executes.
- Asset pipelineProduction & AI toolsThe fixed chain of tools that turns raw material such as 3D models or AI images into finished, validated game files.