|I used a high performance timer. Check out my post about this here(the last post):|
As for the tripple buffering mentioned by Bert it may well help with isolated frames but it's not like i have a graphics API call(i use opengl) to enable or disable on common hardware.
--- On Wed, 3/18/09, Jon Watte <email@example.com> wrote:
From: Jon Watte <firstname.lastname@example.org>
Subject: Re: [Algorithms] Fixed time step loop with varying framerate
To: email@example.com, "Game Development Algorithms" <firstname.lastname@example.org>
Wednesday, March 18, 2009, 5:46 PM
Manolache Adrian wrote:
> So how does one usually deal with fixed time step loops and varying frame
Your code is pretty much how it's done. I seldom see values of dT lower
than 1/120, though, and 1/60 (or even higher) is often used, because collision
testing and physics is generally the most expensive thing the CPU is doing.
What clock did you use for GetFrameTime()? If you used something like
GetTickCount(), then that's really inaccurate. Even timeGetTime() isn't
all that hot. The recommended timer these days is QueryPerformanceCounter() and
divide by QueryPerformanceFrequency() using double arithmetic, to get a number
of seconds with good precision and good stability.