Render Tweening and Frame Limiting

Blitz3D Forums/Blitz3D Programming/Render Tweening and Frame Limiting

BLaBZ(Posted 2007) [#1]
What is Render Tweening??
What is frame limiting??
What do they do??

Could you please give me an example?

I searched both of these and unfortunately didn't manage to find the results I was looking for.

ps. I've also heard the dragon demo uses render tweening


Vertigo(Posted 2007) [#2]
Well Im not sure if im saying this correctly but tweening is a way of rendering the "inbeTWEEN" frames while still keeping game logic on time. For instance, if I have a cube i want to move from 0,0,0 to 10,10,10 and I want it to take 10 seconds, if for whatever reason the rendering starts bogging down the cpu cycles they can get off time. Meaning if I have a super fast machine with nice graphics card and you do not, my cube may get there in 7 seconds, while yours may take 15. Tweening allows the game logic to always complete at a normal rate regardless of screen drawing. Often involving delta timing and the likes, and im sure smarter people will fill in the blanks on that stuff.

Frame Limiting is simple. If you have a game running at 500 frames per second, naturally it will be going god awfully fast. Limiting the frames per second to say 100 allows a nice smooth draw time without all that crazy flashing/flying around of the game running wayyy to quickly. You can see a good example of this by running something simple and turning wait for vsync off. (flip false command) You will see right away how letting the fps get out of control can hender gameplay.

Hope I helped.


Gabriel(Posted 2007) [#3]
Render Tweening is a timing method in which you update game logic at a fixed rate, which is completely decoupled from how often you render. Because they are decoupled, you may render multiple times without an update ( or indeed you may update several times without a render.) In order to keep the rendered output in time with the updates, you tween between the old frame and the new frame.


John Blackledge(Posted 2007) [#4]
Try this:

http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=1497


BLaBZ(Posted 2007) [#5]
Thanks john good explanation