Godot Version
4.3
Question
Please correct me if my understanding is incorrect.
Suppose I have a tank scene which contains the MeshInstance with a Texture and several AudioStreamPlayer3D for each sound effects such as CannonFiring, TankMoving, etc. When this tank scene is instantiated and got add_child
into the root node, all the aforementioned associated resources that I put into the editor will be loaded, yes?
Assuming there are multiple huge graphical and audio resources to load, this means whenever I add this tank scene into the game, the game might briefly stutter just a bit before all the associated unloaded resources could be loaded into the memory, yes?
From there, and also from @GDScript — Godot Engine (stable) documentation in English , which mentioned:
Unless it’s already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use preload.
This means, if I would like the player to have a smooth non-stuttering gameplay, I could create a node specifically for loading all the required resources and store them all in variables right before the player reaches the next area of the game, yes?
However, when the player reaches that point, if there are really a lot to load, the game will still stutter to load all those resources, yes?
Normally, a game could show “Now Loading” screen in this case to ease the transition. But if I want no “Now Loading” screen, and want a more smooth transition, is it possible to do something like asynchronous loading in advance?