Original Post
I''m having a devil of a time with my timing code. I thought it was going to be easy enough to get time based movement. But I can''t even get the fps to display correctly. here is my timing code.
float fTimeElapsed = timeGetTime() - gfLastTime;
gfLastTime = timeGetTime();
float fSecsPerFrame = (float)(fTimeElapsed/1000.0);
float fFPS = 1.0/fSecsPerFrame;
Am I missing something? And for the movement it should be
x += fSecsPerFrame * xvel;
right? with xvel being the amount to move over 1 second. It ends up that I have to set that value at around 80 or it just seems too slow.
Thanks in advance for your help!
knine