Fixed rate logic

BlitzMax Forums/BlitzMax Beginners Area/Fixed rate logic

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.

The tweening part seems to be the most difficult to implement. Is it hard to do?

No, it's a piece of cake in 2D. You're just doing linear interpolation between two positions, two scales, two colors, two rotations, etc. I suppose the rotations offer the biggest challenge since you would need to ensure that they tween the correct way. IE: Interpolating between angles of 1 and 359 would need to be done the short way and not the long way. But even that is just a case of a simple condition to check for it.

In 3D, it's slightly more difficult because you can't tween euler angles and you have to use quaternions which can be easily interpolated with a Spherical Linear intERPolation. In 2D, it's dead simple. All you're really doing is the exact same equation you were doing with delta time except that instead of moving something by 2*Delta pixels you're positioning it at (End-Start)*Tween pixels.