[SDL] SDL_WaitEventTimeout

David Olofson david at olofson.net
Mon Nov 3 08:13:01 PST 2003


On Sunday 02 November 2003 13.42, Matthias Bach wrote:
> Hi!
> Just a little remark, but I could be wrong.
>
> Am Sonntag, 2. November 2003 04:04 schrieb David Olofson:
> > I don't know if it has separate logic and rendering threads, but
> > I strongly doubt it.
>
> Well, actually one of the main hypes about Quake 3 on Linux was
> it's capability to extremely profit from a second CPU. I don't see
> how this could be the case having rendering and game logic in the
> same thread. Could be wrong on this so, as I don't have that game.

I've heard about that as well, but I don't know how the work is 
dispatched. It doesn't have to be a logic/rendering split, and unless 
the game actually *has* a logic frame rate, that kind of split 
wouldn't make much sense. (The main point with delta time based 
calculations is to evaluate game logic only once per rendered frame.)

All I know is that the Q3 engine based games I've happened to play on 
underpowered machines tend to behave as if logic is only evaluated 
once per rendered frame. (And without considering low frame rates, in 
the case of RTCW - otherwise it wouldn't have made much of a 
difference.) I can only make qualified guesses regarding the reasons 
why it behaves like that.

Here's another guess, BTW: Game logic *does* run in it's own thread, 
but user input runs in the main (rendering) loop. The issues with 
high speed automatic weapons would then be explained by the 
"autofire" being implemented in the input code, rather than in the 
game logic, quantizing "fire" events to the rendering frame rate.


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---





More information about the SDL mailing list