Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | mbenoni | |
Old Version | Published before Godot 3 was released. |
Hello guys !
I’ve a question there :
- How to make a proper transition when loading scene ?
I explain:
Currently , I have a “RootScene” with a Script. In this script, in the _ready() function, I load 4 big scenes, then instantiate them and stock them in my Script’s var.
Then, I just have to add_child() or remove_child() theses instances in my script to switch between the 4 scenes efficiently and without any loading time.
But then, a problem occurs : Because my scenes are huge, The game take some time to launch. And, obviously, more and more as my scenes grown bigger and bigger.
In order to have something more “clean”, I made a “launcher screen”, a little animation scene, which launch when opening the game (and so the game open really fast, as the scene is really little). And next, after the animation, i wanted to switch to my RootScene.
But, obviously, the time that was previously used to launch the game is now used between my LauncherScene and my RootScene.
So I wanted to make something like a “progress bar” as a transition between my two scenes, for having something “fluid” instead of waiting face to face with a black fixed screen.
I’ve read Background loading — Godot Engine (stable) documentation in English but it doesn’t seem to work, so I ask myself how can I do this ?
Just a comment, if your scene is too big but does not need everything loaded right away, you can use instance placeholders and load only the immediate and the rest while running.
InstancePlaceholder — Godot Engine (stable) documentation in English
eons | 2017-04-27 16:53
why is the background loading as described in that link, nor working ?
MrMonk | 2017-04-30 17:09
Not sure, the way you load/preload the scenes and the scene structures may affect it.
eons | 2017-04-30 19:33