Renderworld tween#?

Blitz3D Forums/Blitz3D Programming/Renderworld tween#?

Jeremy Alessi(Posted 2003) [#1]
If I'm not using animations is this necessary, or can I just use Renderworld 1?


skidracer(Posted 2003) [#2]
The purpose of the tween in RenderWorld(tween#) is for games that use a constant game clock and want to fill the inbetween frames with interpolated renders. If say the user has a super computer capable of rendering / refreshing your game at 100 hz and you have designed it to use a game clock that is running at 20 hz a tweened program will look like this:

captureworld
updategame
renderworld .2
flip
renderworld .4
flip
renderworld .6
flip
renderworld .8
flip
renderworld 1
flip
captureworld
updategame
renderworld .2
flip
renderworld .4
flip
renderworld .6
flip
renderworld .8
flip
renderworld 1

which allows all movement and rotation of your game including the camera to look silky smooth on one computer while another may only render half as many frames per gameupdate.

an alternative game design is to run your game clock at a high frequency - say 300 hz, then you get multiple updates per frame for perfectly smooth update,

network games and ones with intense physics requirements can benefit from a low frequency game clock hence the tweening option available in blitz3d


Jeremy Alessi(Posted 2003) [#3]
OK, so it's nice when you have a computer that can get really high framerates, like for example I update my logic 60 times per second so if a computer can exceed 60 fps it will make the movements smaller per frame so that it all ends up looking smooth between logic loops instead of just jumping to the next position and then sitting there waiting for the next logic update.


skidracer(Posted 2003) [#4]
I would suggest winding your updategame clock first and see if multiple updates per render is feasible option.

If you measure it (your updategame including call to updateworld) in millisecs and it's averaging less than 2 on your minimum spec machine then crank it. Anthony Flack is getting astonishing results running Cletus at 200+hz or some such...

There is nothing unprofessional locking at 60hz IMHO, addition / maximization of special effects is much better approach for dealing with the more well equipped user if you ask me.


marksibly(Posted 2003) [#5]
Try settting the FPS in the first line of the castle demo to '5'.

This should give you some idea of how tweening works.


Jeremy Alessi(Posted 2003) [#6]
Cool ... bulletime!