Game dev
Saved & recent

Loading

Related terms: async loading, asset bundle, loading screen, hitch

Getting assets from disk into memory: read, unpack, hand to the GPU. Loading everything up front means long loading screens. Loading in the middle of play on the main thread means a freeze.

Async loading does the work on background threads over several frames while the game keeps running. Assets are grouped into bundles that load and unload together. See level streaming.

Further reading
Godot: Background loading
blocking main thread frame blocking asset load frame frame asynchronous load frame frame frame frame frame frame read unpack upload asset ready asset work 0 20 40 60 80 100 elapsed time (ms)
Both loads use a 50 ms interval from request to readiness. The main thread stalls in the upper timeline. In the lower timeline it continues producing frames while the load progresses separately.

View in the full Game dev collection