+1 vote

hi, what i want to know is
when i should start using multi threading ?
how to know, that i need to use multi threading?

example, if i have 16 cd timer( decrease value by 0.01, each 0.01 sec) running at same time, should i start using multi threading, dedicated just to all this timer?

in Engine by (377 points)

Another example is when your game is going to need additional assets you'll need to load from disk, but you don't want your game to pause for the load. You can load your assets in a separate thread, then notify your main game loop when the loading is done.

Any time you need to perform some long-running operation, but you don't want it to impact your user experience, you can consider putting that long running operation into a separate thread.

1 Answer

+1 vote

you should/can use multi threading whenever your game stutters because a process takes longer then an idle cicle. Decreasing a simple value isn't a "multi thread worth" effort.
Mutli threading is best used when do heavy calculations like pathfinding, image processing etc.

by (3,930 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.