IMPORTANT: Some users have reported that the loading freezes completely in certain situations. If you are experiencing this as well, here are a couple things you can try: 1. Try disabling `use_sub_threads` (the boolean at the top of the script). This may increase the load time, but should stop the script from freezing. 2. There are two separate `await Signal(animationPlaeyr, "animation_finished")` lines inside the _start_outro_animation() function in the loadingScreen.gd script. The first await line is in place to prevent the end_load animation from playing before the start_load animation finishes, and wasn't actually meant to be in the video initially (meaning it's not optimized f different loading times). If the _start_outro_animation() function isn't making it past the first await function, you can either remove it all together, or optionally add a check to only await if the animation is still playing. Sorry for the confusion, hope this helps! :)
@learningcode314
9 ай бұрын
For those still confused about the two animation_finished awaits, think about the extremes. Let’s say you have a long animation relative to your loading time (example: fading to black, emitting loading_screen_has_full_coverage, and then showing a game hint for at least 5 seconds). Now if you want your start animation to play all the way, then you must await for it to finish before starting the end animation. On the other hand, if you have a short animation relative to the loading time (think booting into GTA V where we have A TON of stuff to load), then the start animation finishes way before we call _start_outro_animation. By this point the animation_finished signal for the start animation is long gone, meaning we will be waiting forever for it. This is why Queble suggests doing the first await only if the start animation is still running. I think this is a good solution as it will allow you to make your loading screens more efficient and flexible (no need to wait 5 seconds of animation before we start loading, simply start when the screen is fully covered). In the video, because the test scene is so quick to load, we are encountering the scenario where the animation is long relative to the load time (even when we start the load at the very end of the animation!). This allows the loading screen to catch the animation_finished signal just in time and work properly. This timing is very tight though which is why it is easy to have a scene that takes enough time to load to mess this up. I strongly recommend you address this with one of Queble’s suggestions as the way it is on the video your players could run into the timing issue even if you don’t based on hardware differences (such as the player is using an old hard disk drive which makes loading times considerably longer). Anyway, leaving this comment for others and myself when I come back cuz I know I will be confused by it again lol. Thanks for the video Queble!
@QWERTIOX
7 ай бұрын
i think instead of awaiting the end of starting animation you should just add ending animation to queue
@MrMariobrosrocks
9 ай бұрын
The code as it is executes the _process() function of the LoadManager at least one time upon runtime of the game. It will return an error "THREAD_LOAD_INVALID_RESOURCE" as a result, as it doesn't have any specified resource path to load at that point. I caught this because I made it print to the console depending on which error ResourceManager gives. To prevent this, simply add utilize _ready() in the LoadManager and within it run set_process(false). This will ensure that the _process() call isn't run right away and is instead only run once the other parts of the script enable it. Also, be sure to set_process(false) again after all of the code that executes once loading has finished. Other than that, great tutorial and method of doing this. Just what I was looking for.
@desistdawdling6737
5 ай бұрын
i'm constantly getting the resized loading screen, no matter what I do. Will look at it with fresh eyes tomorrow. Thank you!
@cassangel7561
5 ай бұрын
did you try to key scale, size,...yet
@desistdawdling6737
5 ай бұрын
@@cassangel7561yes, multiple times. I was able to fix it though. Can't remember at the moment what i did though lol
@OtherRath
11 күн бұрын
Worked out great man, thanks
@FilipeMerli
6 ай бұрын
Thank you so much for this content. I was too lazy to read the Godot doc twice to implement this and you did it with mastery!
@adannimpa
9 ай бұрын
Oh my god you didn't know how lucky that I find this video the exact moment I was thingking of making a loading screen 🤣 thank you!!!
@dueddel
9 ай бұрын
Saved for later, thanks. 😘👍
@elbasurerodedat
8 ай бұрын
oh man, love you.
@owenlloyd2528
7 ай бұрын
Thank you. There was a lot of interesting information here and you impart it well. Appreciate the effort. I am going to use this and replace my own efforts. With a project I am working on the user has the ability to modify screen size and switch from windowed to full screen, so I will have to factor that in - they may do it when the transition is happening, which sounds exciting (mild panic ensues). But awesome stuff, thanks again.
@vbamboo21
Ай бұрын
i learned alot from this! thank you for your knowledge!
@GrimbornWolf
9 ай бұрын
Thanks for the tutorial!
@tristangillis7365
9 ай бұрын
Awesome tutorial!
@andrewgrinn3435
7 ай бұрын
Great video
@AleczanderSmith
9 ай бұрын
For a game with a moving viewpoint that follows the player, how can I import that location of said parameters to ensure the loading screen animation follows and obscures the entire visible camera. As it stands the animation is stationary and if I move while the load is processing, the load panel does not move with it.
@Tharmin.124
8 ай бұрын
I"m not really certain about it, but have you tried making a Control node a parent of the animation? If I recall correctly that should turn it into a UI element instead of a 2d element and it should stay stationary
@cassangel7561
5 ай бұрын
great...it work
@rhyslangley1802
5 ай бұрын
Hi, great tutorial! Just curious, does it matter what kind of progress bar I use? I'm using a texture progress bar and the bar doesn't seem to be progressing, however the scene does load. Would this be because of the textureprogressbar or would it be because of something I've done wrong in my code?
@queblegamedevelopment4143
5 ай бұрын
Hey thanks! Hmm, that shouldnt matter, I'm assuming something is wrong with the code. Maybe try printing your progress, and then verify you're setting the value correctly? Otherwise if I remember correctly, this tutorial had a couple inconsistencies that were solved in the comments. It might be the pinned one, but if you're still stuck after this hmu in the discord
@francescoderosa1230
9 ай бұрын
Thank you very much for your tutorial, it's awesome and works perfectly! However, i have a little issue: when the level gets loaded the loading screen is still there and i don't understand why.
@Syvies
9 ай бұрын
Hi, I have an issue where my loading get stuck at 75% or 85% (it depends on the scene) without throwing an error. I think it may be due to the size of the scene, but I'm unsure as it worked fine two days ago. Maybe it would be better if I ask about this issue on your Discord server, but too anxious to join.
@queblegamedevelopment4143
9 ай бұрын
Hey so I think this is a problem a couple people have reported, and is due to the loading screen awaiting animation_finished when it's called to play the outro animation. This was initially placed in the script to keep the animations playing seamlessly, but obviously didn't account for longer load times. If this is the case, you could either remove that first line the function, or pause the animation after it gets full coverage, then unpause and wait when it's called to be removed
@Syvies
9 ай бұрын
@@queblegamedevelopment4143 Thanks for the quick response. I'll try it tomorrow!
@queblegamedevelopment4143
9 ай бұрын
@Syvies yeah no problem, hopefully it works! I'm helping someone else with this in the discord rn, and this fix didn't help, so I'm thinking it's something internally (I will probably need to do more testing)
@Syvies
9 ай бұрын
@@queblegamedevelopment4143 I just tried your fix and it doesn't work for me. It isn't the first time this happened for me, I think it's due to loading a scene too complex as a path with threads. So yeah, I just by passed this problem with a non threaded load, which freezes the game unfortunately (it wouldn't be too bad if I could get a little sprite animating but it freezes too). I also searched on the internet, but didn't found anything about this issue, maybe we need to open an issue on Godot's GitHub?
@RichMakeGame
9 ай бұрын
@@queblegamedevelopment4143 not sure if this is related but I did find my progress bar wasn't visually updating at all unless I used progressBar.value = instead of .set_value_no_signal() , which is odd. especially since if I printed the .value after using .set_value_no_signal() it showed the correct number- just didn't update the bar (I'm still on 4.0.3 tho)
@northrain0462
2 ай бұрын
Hey thanks for the tutorial. If I have to load multiple scenes, do I have to monitor the progress for each one of them?
@queblegamedevelopment4143
2 ай бұрын
Yes, you would need to monitor the overall progress externally for the combined scenes
@digital_down
Ай бұрын
Can I load what is in auto load on startup… for example I have stuff in auto load, but I want the load screen to display the progress of the auto load “global scene”. I can’t find an answer anywhere and no one seems to have an answer.
@queblegamedevelopment4143
Ай бұрын
I guess I'm having trouble understanding exactly what you're trying to accomplish.. do you mean like making a progress loading screen for the auto load script?
@digital_down
Ай бұрын
@@queblegamedevelopment4143 yes, so I have a scene in auto load which contains all the global stuff… a loading screen to load the auto load global scene
@digital_down
Ай бұрын
@@queblegamedevelopment4143 yes, I am trying to load the auto load so that it isn’t stuck on the splash screen for several minutes.
@RichMakeGame
9 ай бұрын
Thanks very much for the detailed tutorial! quick q, when I use DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_MAXIMIZED) in the initial scene, the load screen doesn't then animate from outside the screen but somewhere within it ( I guess since we hard coded the x position) - is there a way to set that keyframe dynamically to the window size?
@queblegamedevelopment4143
9 ай бұрын
Yeah no problem! You could access the animation player, and the get the key frame by index (I'm away from my PC ATM and forgot the name of the function, but it's in the docs). But yeah that should work to just assign the value to the window size when it's created
@RichMakeGame
9 ай бұрын
@@queblegamedevelopment4143 fantastic I'll check that out- again thanks for taking the time to make this
@RichMakeGame
9 ай бұрын
can I ask one more q- in _start_outro_animation(), what is the reasoning behind the first await Signal? why not just play the end_load immediately? thanks!
@queblegamedevelopment4143
9 ай бұрын
The reason for the first await is just so the start animation finishes fully before starting the outro animation. You technically don't need this, but I figured it would be useful since a lot of loading screens have animations which need to play seamlessly from start to end. For this use case though, it doesn't really do anything, and may actually need to be taken out if you're loading very large scenes
@RichMakeGame
9 ай бұрын
@@queblegamedevelopment4143 ah great so as long as I'm happy I've finished all my animating before sending the screen covered signal its all good. thanks again :)
@Serim_holy
7 ай бұрын
No idea how to solve this error : Invalid get index ' _update_progress_bar' (on base: 'Control')
@queblegamedevelopment4143
7 ай бұрын
Looks like the object that you're attempting to call ' _update_progress_bar' doesn't actually have that method. Are you sure you're calling the method on the Node that has the script attached to it?
@bengtrust
6 ай бұрын
I also ran into this issue, did you find the solution. I'm too potato brain/new to godot to even understand this guys response
@Serim_holy
6 ай бұрын
@@bengtrust If, as said above, the script did not have it placed correctly on the object in question...
@scott_itall8638
9 ай бұрын
What theme?
@queblegamedevelopment4143
9 ай бұрын
Just the default one with high contrast and a more blue color :)
@okiam666
7 ай бұрын
po mano esse codigo global bugou meu jogo todo
@alexanderwurfl2879
6 ай бұрын
for me it didnt delete the loading screen. so in _start_outro_animation() i added for the first await the condition is_playing() func _start_outro_animation() -> void: if animation_player.is_playing(): await Signal(animation_player, "animation_finished") animation_player.play("end_load") await Signal(animation_player, "animation_finished") self.queue_free() now it works😊, thanks anyway
@djshrimp_
4 ай бұрын
lol holy shit i wrote the exact same code line for line to fix that (: great minds
Пікірлер: 53