Hi,
i did bought the 3. edition of the book and i am writing a game engine as descripted in the book.
Now i am seeing a problem in the proccessmanager. I will explain it on a example:
A game like CS in this engine would have a Process for the bomb waiting to explode and a process for the player who is defusing. So in the ProcessManager would be two processes. Both processes will be implemented like the WaitProcess descripted in the book. (Page 162)
ProcessManager
WaitingToExplode(4000ms), Diffuse(3000ms)
Now the game works smoothly and no laggs, the player will diffuse the bomb in time.
Now the same example and something happens, that the computer will stock and send 5000ms to the ProcessManager.
The ProcessManager will go through the list and gets the WaitingToExplode first and that process would trigger the bomb because the time is over. And after that the diffusing process will trigger, but that would already to late.
That would mean with a lagging computer there would be another result.
Is there a way that this can be prevented without changing the hole concept?
I hope my english isn't that horrible. It isn't my native language.
i did bought the 3. edition of the book and i am writing a game engine as descripted in the book.
Now i am seeing a problem in the proccessmanager. I will explain it on a example:
A game like CS in this engine would have a Process for the bomb waiting to explode and a process for the player who is defusing. So in the ProcessManager would be two processes. Both processes will be implemented like the WaitProcess descripted in the book. (Page 162)
ProcessManager
WaitingToExplode(4000ms), Diffuse(3000ms)
Now the game works smoothly and no laggs, the player will diffuse the bomb in time.
Now the same example and something happens, that the computer will stock and send 5000ms to the ProcessManager.
The ProcessManager will go through the list and gets the WaitingToExplode first and that process would trigger the bomb because the time is over. And after that the diffusing process will trigger, but that would already to late.
That would mean with a lagging computer there would be another result.
Is there a way that this can be prevented without changing the hole concept?
I hope my english isn't that horrible. It isn't my native language.