Page 2 of 2

Re: [SDL] Delta Timing Question

Posted: Wed Dec 22, 2010 5:46 pm
by xiphirx
GyroVorbis wrote:
xiphirx wrote:I'll try removing the frame cap and see if it still gets to 5 instantly...
I still don't think you get it. If you remove the framecap less time will elapse between each frame, so it'll take more frames to hit 5 seconds--It will STILL take 5 seconds. It should ALWAYS take 5 seconds. That's the point of delta time. Whether it be 1fps or 9999999 fps, when the deltaTime sums to 5 seconds, 5 seconds has gone by. XD

Does your detaTime not work on the PSP or PC? The PSP might not actually have implemented a way of getting ticks in milliseconds, so the standard dictates to just return current time+1 (which would imply that only 1 ms has gone by), but that number is LESS than 1/60th of a second, so 5 seconds should take LONGER than 5 seconds to accumulate if this were the case...

Ooohh, ok I get it now :)

And I'm having problems on the PSP. The engine I use has a built in function to grab the delta, so I'm trusting the author on it... It returns values like 0.02 if I remember correctly.

Re: [SDL] Delta Timing Question

Posted: Wed Dec 22, 2010 7:38 pm
by Falco Girgis
60 frames per second is 1 frame per every 0.0166667 seconds, so 0.02 would be pretty close to 60-ish FPS. That's correct.

Re: [SDL] Delta Timing Question

Posted: Wed Dec 29, 2010 3:56 pm
by xiphirx
Okay... I had some obscure line of math that modified the delta after I retrieved it from the engine... Dont' ask why it was there I have no idea.

It works as intended now, thanks.

Re: [SDL] Delta Timing Question

Posted: Wed Dec 29, 2010 4:10 pm
by Falco Girgis
xiphirx wrote:Okay... I had some obscure line of math that modified the delta after I retrieved it from the engine... Dont' ask why it was there I have no idea.

It works as intended now, thanks.
Haha, good. I figured. That was the only possible explanation...