Original Post
Just as the title says. Lets say I am programming a game from scratch in C++, when should I use multi-threading or when not? I don't have much experience on the subject. Thanks
The explicit purpose of multi-threading is to allow simultaneous execution of multiple tasks.
If the problem does not involve more than one task, using multiple threads should be avoided.
In the case of the game, you have three tasks (input, processing, and output), and Operating System limitations often require input and [visual] output to be done on the same thread. Processing (ai and physics) and audio output are deserving of their own threads.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more