Jerky Movement Code

BlitzMax Forums/BlitzMax Programming/Jerky Movement Code

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.

I think something is wrong with my game timing and main loop.

I have locked the frame rate to 50 fps (or 20 ms). Basically I measure the time since last frame and wait any unused time until 20ms has passed, then increment the position of objects and render again.

It may be my imagination but the movement seems really jerky and uneven. I know 50 fps is slow these days but there is an unevenness that I would not have expected. I've tried it at 100fps and the problem still exists. I'm using frame deltas and have even logged them. They seem to be working correctly, always exactly 20ms.

I'd appreciate if you guys could take a look and see if you think it looks a bit rough as well. Have you seen this is your projects and how did you fix it?

http://www.jaykyburz.com/files/GameTest.zip


I've read about some c++ guys doing sub pixel rendering. Does Bmax support this? Are the screen x and y passed to DrawImage converted to ints somewhere?