Delta timing hard to implement in current project?

Blitz3D Forums/Blitz3D Programming/Delta timing hard to implement in current project?

Ross C(Posted 2005) [#1]
Hey, was just wondering if the delta timing method has to be implemented into a project at the beginning and code around it, or can it easily be put into a halfway complete project?


morduun(Posted 2005) [#2]
It's not much fun at all to retrofit into an existing project, actually. Lots of things you can easily miss. If you're halfway through and it's a small project, it's doable. Otherwise use one of the simpler methods like tweening or (god forbid) create/waittimer.


Viperfish(Posted 2005) [#3]
I added delta timing to my current project after I'd already had about 2000 lines of code. Definately would have been easier if it was added from the beginning.

With delta timing you multiply any increasing or decreasing value by your speed factor.

;Code without delta timing
x = x + 2

;becomes this with delta timing;
x = x + 2*FL\SpeedFactor


However, the following doesn't work;
;Without delta timing
x = x *2

;With delta timing
x = x * 2*Fl\SpeedFactor


Multiplications should be raised to the power of your speed factor. ie;
x = x * 2^FL\SpeedFactor


Had me stumped for days!


Ross C(Posted 2005) [#4]
Thanks for the tips guys :o)