voodooking :
I still don't understand why games aren't multi-threaded. It was explained to me a while back in an obscure way. The way he made it sound is that they can't be programmed to utilize the architecture. That can't be right because some games use muti-threading.
Also does anyone know where I can read up and learn more about multi-threading?
Thanks.
Games are multi threaded but increasing the thread count is really difficult.
You can easily do a sort of "threading lite" where each thread looks after a different task, but that's not where the real benefit of threading lies.
The real benefits come from parallelising the heavy lifting like the AI and the geometry calculation. Logically (and obviously), you cannot multi thread code which contains branch dependencies, because the code you execute depends on the outcome of the last code you executed. Games are really difficult to program in a threaded way because so much is dependent on contingent issues like user input and random variables.
Much of the art of developing threaded code is about identifying all the elements of the program that are not interdependent, or contingent, and parallelising them. It's also about going through the workflow with a fine tooth comb and identifying where dependencies exist that aren't needed.
Also, remember that the game engine has to be developed for the lowest common denominator. That's the Xbox, which has a triple core AMD processor. Optimising an Xbox game for more threads to run on other hardware is a major re-engineering task.
I speak not as a programmer but rather, as someone who thinks about the logic of software development and optimisation, so I may be quite wrong.