quote:Original post by RhoneRanger
It is a modifier, just like your /8
0.02f just says it is a floating point number.
I am assuming that TimeDelta is a float.
multiplying by a modifier is much faster than dividing by one, so it will eliminate your jerkiness.
um...he said TimeDelta wasn't a float, and two: dividing by a float isn't much of a difference...sure, if you loop a million times a second it is, but at 30fps or so...nah...sorry...
(Neen - that dosn't mean you shouldn't still multiply rather than divide! (and again, /8 = *0.125 (or *0.125f)) )
quote:Original post by RhoneRanger
One more thing, you know that time elapsed should be calculated similar to this
float CurrentTime;
float LastTime;
float ElapsedTime;
LastTime=TimeGetTime();
begin loop
CurrentTime=timeGetTime();
TimeElapsed=CurrentTime-LastTime;
LastTime=CurrentTime;
do all your game stuff
end loop
He allready has a TimeDelta...he dosn't need to be told how to get one again (TimeElapsed = TimeDelta) (I hope, anyways...) (oh yeah, change the decleration from float ElapsedTime to TimeElapsed...it helps when the names are exactly the same).
[edited by - MaulingMonkey on March 3, 2003 9:37:41 PM]