First post here and want for start by saying that Game Coding Complete is a fantastic book.
My question is about the "Process" system in GCC. I understand the basic theory behind cooperative multi-tasking, how you round-robin style cycle through a list of tasks and update them in discrete time increments. Cooperative multi-tasking clearly has advantages on the Operating system level where there are dozens of processes running simultaneously by creating the illusion of simultaneous execution for you programs.
Why though does is it useful in the game-loop? Say I have three processes, A, B, and C that take x, y, and z milliseconds to iterate during an update function call. Why do I care if they execute linearly or round-robin style? Either way they will complete in x+y+z milliseconds.
Can someone give an example where cooperative multi-tasking offers a solid, measurable/demonstrable advantage?
Thx!
My question is about the "Process" system in GCC. I understand the basic theory behind cooperative multi-tasking, how you round-robin style cycle through a list of tasks and update them in discrete time increments. Cooperative multi-tasking clearly has advantages on the Operating system level where there are dozens of processes running simultaneously by creating the illusion of simultaneous execution for you programs.
Why though does is it useful in the game-loop? Say I have three processes, A, B, and C that take x, y, and z milliseconds to iterate during an update function call. Why do I care if they execute linearly or round-robin style? Either way they will complete in x+y+z milliseconds.
Can someone give an example where cooperative multi-tasking offers a solid, measurable/demonstrable advantage?
Thx!