Can anyone please explain what preloading actually means? Like when and how does it differ from regular loading?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By avencherus
:warning: Old Version Published before Godot 3 was released.

The Godot documentation uses unclear language on this topic.

:bust_in_silhouette: Reply From: Vladislav Vorobiev

When resources are loaded before scene is playing/running, this way of loading resources is called preloading.
When resources are loaded while scene is already playing/running, resources being loaded dynamically (this is what you call regular loading).

Advantage of preloading resources is that you avoid freezes during gameplay because of resource being loaded (parsed/converted to right format/etc), but scene loads for a longer time. When you use dynamic loading of resources, you save some memory and load stuff you need only when you actually need it. You can even fix freezes in scene by using something like ResourceInteractiveLoader, see http://docs.godotengine.org/en/latest/tutorials/engine/background_loading.html

Thanks. So it’s forcing the things to load, before the scene is allowed to start running. The dynamically loaded then are competing for processing time, then can be popped into the scene when they finish. Is that accurate?

avencherus | 2016-08-11 08:15

Yes, pretty much accurate. Actually I don’t know how dynamically loaded resources are resolved by engine (does it freeze entire game or shows something like placeholder until resource is finally loaded?). You probably can ask Godot developers at their IRC channel on freenode (#godotengine and #godotengine-devel channels).

Vladislav Vorobiev | 2016-08-11 08:18

Thanks, you’ve been super helpful. X) I’ll look into those further now that I have a better idea of what they’re doing.

avencherus | 2016-08-11 08:22

ResourceInteractiveLoader link is now (3.5): Background loading — Godot Engine (stable) documentation in English

idbrii | 2023-01-02 01:11