rock steadty 60fps for 2D arcade game

BlitzMax Forums/BlitzMax Beginners Area/rock steadty 60fps for 2D arcade game

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.

AngelDaniel wrote:
"You don't need delta timing if your game is not going to slow down below the default framerate. If you can be sure its fast enough to never go below 60fps it will be okay using just Flip() at 60hz."

Thanks AngelDaniel. Yep, the game is dead simple and will happily sit at 60Hz and never go below. I want a technique that will work across
whatever the user's screen is refreshing at.

Q: Can you keep track of the frame number each second ? That way, I'd just draw the first 60 frames each second, regardless of what refresh rate is being used eg. if the user is at 120Hz, I'd just draw 60 frames out of the potential 120 frames I could draw, each second. Or am I being daft ? ;-)



"And no integers are not accurate enough to look completely smooth. The use of an integer is actually a way of `rounding` a `real value` and locks it onto a grid of 1x1 pixels, which will cause your objects to jump to the grid location."

From my mock-up my integer based movement looks super smooth for what I'm doing. For example, for SIN/COS values, I'm using an integer based look-up table that works perfectly.