[SOLVED][SDL] Delta Timing Question

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
xiphirx
Chaos Rift Junior
Chaos Rift Junior
Posts: 324
Joined: Mon Mar 22, 2010 3:15 pm
Current Project: ******** (Unkown for the time being)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: [SDL] Delta Timing Question

Post 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.
StarCraft II Zerg Strategy, open to all levels of players!

Looking for paid work :< Contact me if you are interested in creating a website, need a web design, or anything else you think I'm capable of :)
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: [SDL] Delta Timing Question

Post 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.
User avatar
xiphirx
Chaos Rift Junior
Chaos Rift Junior
Posts: 324
Joined: Mon Mar 22, 2010 3:15 pm
Current Project: ******** (Unkown for the time being)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: [SDL] Delta Timing Question

Post 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.
StarCraft II Zerg Strategy, open to all levels of players!

Looking for paid work :< Contact me if you are interested in creating a website, need a web design, or anything else you think I'm capable of :)
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: [SDL] Delta Timing Question

Post 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...
Post Reply