Fixed Steps and Tweening

BlitzMax Forums/BlitzMax Programming/Fixed Steps and Tweening

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.

2 main problems:

1) Sounds is inconsistent on a range of PC/OSes. FMOD is not free and requires some techie knowledge and thought to implement (which I don't yet possess).

2) What looks perfectly smooth on my PC is not smooth on other PCs despite having good "proven" timing code. The issue is with background tasks interfering too much with BMax and putting out Millisecs() by a large amount every so often (well by sometimes taking 50ms+ to render a frame basically) thus causing the odd jerk here and there.

I haven't compared BMax to BPlus or C++ but I'm tempted to see if it's any smoother on the others.

Meanwhile, I've been inspired by these threads to add in some jitter correction (via storing a history and picking an average value) to my framework timing. It works very nicely and smooths out some tiny occasional jitters caused by "moire" effect and also when big jerks occur (caused by background tasks interfering) the framework doesn't try to "catch up" in one frame, it spreads the catch up over several frames, thus the jerks don't look as bad.

I've may also drop my core timing from 200HZ to 120HZ for future games because if my game is in full-screen (60Hz) then this will result in 2 updates per frame which is a 2:1 ratio i.e. no "moire" effect if I decide to move objects at 1 pixel per frame for example. This could mean ultra smooth full-screen games with proper timing so if Vsync is off they still play at the right speed, and also windowed mode will play at the right speed (but won't look so utterly smooth as full-screen, although it will still be pretty darn smooth)

I'll post a demo soon in another thread for testing.