by efortier » May 14, 2003 @ 5:28am
Hi. Here is my 2 cents.
What I did was to include both frame based and time based animations.
Frame based for the walking animations of my characters. The higher the frame rate, the faster they walk. I found that the on-screen result was a lot nicer for the characters with frame-based animations.
I use time-based animations for the world objects. So no matter what the frame rate is, and no matter how fast the characters are walking around, the world objects are animated on a steady base.
Now, if timing is important on other platforms than PPC, you may want to take a look at the performance counter. They offer very (very) high resolution. However my understanding is that they are not availailable on all systems. My iPaq 3850 has them. All my PCs have them too (Athlon XP, P3, etc).
Check out QueryPerformanceCounter() and QueryPerformanceFrequency() for more on this. What you could do is make some base timing functions that first try to use the performance counter, if unavailable fall back to GetTickCount().
And there's also timeGetTime() on non PPC platforms. This has been a favorite of mine in the past.
--Eric