FrameTimer Questions

Blitz3D Forums/Blitz3D Beginners Area/FrameTimer Questions

Crazy4Code(Posted 2005) [#1]
I just learned about frametimers (which probably explains my problem with the speed on other people's computers). Sometimes things that are moving will sort of "jump" and not be smooth. Is this because my frametimer is too low of a number (it's 200 right now)? And why does the game go faster when the number is higher? I though it was supposed to be counting up to that number?


Stuart Morgan(Posted 2005) [#2]
A frametimer will control the execution speed of your program (frames per second) so higher will make it faster. 200 may be too fast as some slower computers will take longer to reach that "200" delay.

A better way to control the framerate is to use render tweening. Heres a basic example...



You will find that using render tweening will be much more reliable for keeping the game speed at a set rate and will keep the display smooth.


Crazy4Code(Posted 2005) [#3]
Another games code I was looking at used this method. I'll have to try some different ways and run it on my slow laptop to see what's best. I'll probably use this way though, since it seems the best. Thanks!


Rhyolite(Posted 2005) [#4]
I prefer tweening also, but note that you can not 'teleport' objects because they will always 'slide' to the new location. If this is a consideration, consider using 'delta' timing (do a search, their are lots of posts about it).

Rhy :)