Timing Code Made Easy?

BlitzMax Forums/BlitzMax Programming/Timing Code Made Easy?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Chroma: He's not using delta time in the traditional sense because otherwise it would be passed into the logic, it is in fact being passed into the draw in order to do tweening.

Gabriel: Hey I said that already ;-) but it's nice to have some backup hehe. Yeah basically B) is true, trust me, I've spent *long* enough looking into this stuff. However, jitter can occur because of

i) background tasks consuming too much time (or even your own game having a logic or draw spike) and then the timing tries to catch up all in one go which results in a JERK which Jitter Correction helps to reduce by not catchup up in one go

ii) millisecs is an integer and thus you'll get stuff like 15/16/17 millisecs between frames (at 60Hz) and your objects will move proportionally to that and occasionally you'll see some tiny "moire" effect on the movement because millisecs is "rounded" and thus hangs around on millisec too long or skips ahead to the next millisec a fraction too early. Jitter Corrections uses the AVERAGE of 15/16/17 and thus you can remove that "moire" effect - at least I managed to. Hope this makes sense.

OK I'm kinda all timed out... My timing code is the best it's ever been and people can find out how I've done it by reading all my posts or buying my framework ;-)