123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|531|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> FPS Limiting?

Thu, 08 Oct 2015, 03:49
spinal
Morning guys!

I'm attempting to limit the speed of Frodo because, well, 75fps is a bit fast for a PAL 8bit. I'm attempting the following, but it seems to be doing nothing at all, Am I heading along the right direction?



GetTicks() as you can guess, returns the time in some sort of unit, TICKS_PER_SEC really says it all...

-=-=-
Check out my excellent homepage!
Thu, 08 Oct 2015, 04:23
Jayenkai
Based on my music engine's timing..



If you rely on "GetTicks+" then you'll find it's not entirely stable.
If the frame is delayed by 2 ticks, then the next GetTicks+ will be 2 ticks out, and so on and so forth, exponentially getting slower and slower.. Or at least, off "tempo".

Keeping the NextFrame, and upping it yourself by a predetermined amount, will ensure that the next frame is always roughly in the correct timing area, even if the GetTicks is slightly delayed..

-=-=-
''Load, Next List!''