... so framerate doesn't drop when it changes to that scene / when it's instantiated. For a loading screen. Now, it's not like my scenes are all too complex I mean i don't really need to do this but it's got to learn eh? I do know about 'load()' and 'preload()' and if that's all I really need to do then that's nice. But, I'd assume it's a bit more complex than that
#How do you load scenes?
1 messages · Page 1 of 1 (latest)
Just do it in a different thread than physics process / don't run the scene until loaded
Or, preload it
Could you give an example please?
Of the threading, preloading, or hiding the progress bar?
Might need a conversation lol
of the threading
Ah...
is it complicated?
Godot Engine documentation
Threads: Threads allow simultaneous execution of code. It allows off-loading work from the main thread. Godot supports threads and provides many handy functions to use them. Creating a Thread: To c...
Or uhh
I dunno might be a single threaded way to do partial loading?
Then go back to next physics process?
Like maybe if u put the load in a function?
Interesting question
Probably a better idea lol
explains everything
https://www.youtube.com/watch?v=ox5jp_ySFlg
I'm making a game! Wishlist Fangs & Faith Solitaire Now: https://store.steampowered.com/app/3032430/Fangs__Faith_Solitaire/
In this video I am showcasing the utility of multi threading in Godot 4.3. Threads are extremely useful for when we want to pass methods which are expensive computationally to different other cores of your processor. This ...
Fair warning that preloading it means it will always be in memory
so don't do that with large scenes
Godot allready has a builtin threaded loader. See https://docs.godotengine.org/en/stable/classes/class_resourceloader.html#class-resourceloader-method-load-threaded-request
and
https://docs.godotengine.org/en/stable/classes/class_resourceloader.html#class-resourceloader-method-load-threaded-get-status
and
https://docs.godotengine.org/en/stable/classes/class_resourceloader.html#class-resourceloader-method-load-threaded-get
Godot Engine documentation
Inherits: Object A singleton for loading resource files. Description: A singleton used to load resource files from the filesystem. It uses the many ResourceFormatLoader classes registered in the en...
Great stuff. Does setting use_sub_threads to false means one other thread will be created? And why would setting it to true cause the main thread to lag?