[SDL] Fixed Rate Logic (was: stuck with multiplayer and some segfaults)
m.sched at gmx.at
Fri Mar 11 12:11:04 PST 2005
On Friday 11 March 2005 19:59, Olof Bjarnason wrote:
> Let's say we have 100 Hz game logic, and 60 Hz gfx. Then there are
> 100/60 ~= 1.67 logic frames per graphic update. Then somethimes there
> will be two logic updates between two graphic frames, and sometimes
Ok. I thought since it seems to be an often-used technique, interpolation
would reduce the effect so much that it isn't noticeable (unfortunately, my
own eyes are quite trained in recognising this, since I've been trying to get
another computer to smoothly play DVDs on projector for months...)
> Then again, increasing the logic frame rate to 1000 Hz will look much
> smoother, but now we might start considering the computational amount
> needed to take the physics steps that many times per "game time step"
I haven't yet looked at the interpolation details, but isn't the whole point
of interpolation not having to use too high logic rates? 1000 Hz sounds
awfully high for a more complex game (and I guess it would be difficult to
time as well, with SDL_Delay having "only" 1ms resolution and a draw routine
that will take longer than 1ms).
Hofstadter's law: "It always takes longer than you think,
even when you take account of Hofstadter's law".
More information about the SDL