-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Initialization" scenes (_change_scene
lag spike)
#38
Comments
_change_scene
slow?)
_change_scene
slow?)_change_scene
lag spike)
Hi, About the About the second part:
Can you please provide a video of the freeze happening? This is a little bit hard for me to understand exactly how the freeze is noticeable when we just have a black (or whatever color) on the foreground.
I'm afraid if the problem is engine related, I'm not gonna be too helpful. This is not good news... |
Yeah, looks like this is tightly related to the engine itself... ⚰ Thanks for the reply. (Yes, the black or whatever color lasts longer than expected - this is the "freezing".) Seems the best workaround for now (for those scenes where it is important to not have this delay) would be to... - Have those scenes loaded together once in a common parent and then toggle their visibility and process mode from on to off (and vice versa), to do the "switching" but without modifying the scene tree (no additions nor deletions when "switching"). |
I'll close it as this is purely Godot issue it seems. |
EDIT 2:
Seems related to this: https://www.reddit.com/r/godot/comments/17rlyl3/two_scene_loader_issues_global_freeze_for_some/
EDIT 1:
After some investigation, I noticed that
_change_scene
can be slow (couple seconds slow) which freezes the transition after fading out and before fading in again, for those couple seconds.(It was not the _ready of the "initialization" scene that was causing the extra wait time in the transition.)
Not sure what is the best way to mitigate this and have "smooth" transitions?
(Can we avoid freeze when adding large scene to scene tree?)
Initialization scenes
Some scenes need time to process their _ready method. This is given in the "More Complex Example With Loading Screen for Scenarios That Scenes Need Some Time in Background" example.
But should this be a part of the scene manager (as a default case)? - Say you can set a flag "initialization = true" which would mean that after loading the scene to 100, the scene manager would first add it to scene tree and wait for the ready method to finish, and only then emit load_percent_changed at 100 and load_finished signals.
In most cases, you do not need granular percent changes in loading bar. - Should be sufficient to keep it at 99 until _ready is finished as it takes just a second or two in most cases.
The text was updated successfully, but these errors were encountered: