On 5/2/07, Giel van Schijndel <[EMAIL PROTECTED]> wrote:
I assume that with all these options you mean to somehow prioritize the game logic above I/O ? Events seem the easiest way of controlling that. Threads will gain us little while costing a lot of trouble. The main reason for using threads should be to be able to take advantage of systems with multiple processors. If all you want is to make sure some part of the processing (i.e. game logic in this case) gets prioritized above other parts (graphics rendering). Then threads will require explicit serialization, i.e. suspending the graphics thread until the game logic thread has finished one cycle. And if you do that you would never have needed threads to accomplish the same in the first place. So my advice, if your working on an event based system already: stick with it. -- Giel
Giel is right.I think a timer to test whether the render has spent too much time should be enough,pseudo code: for if (renderUsedTime > 1000/framepersecond - estimatedGameLogicsTime) sleep renderer a few game frames and render the retained frame buffer during this period else normal operation input/output shouldnt be a major threat to gamelogics update,though in original 1.10 source it did have a separate thread for I/O.
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev