• Create Account

Need scary sound effects or creepy audio loops for your next horror-themed game? Check out Highscore Vol.3 - The Horror Edition in our marketplace. 50 sounds and 10 loops for only \$9.99!

### #ActualWashu

Posted 09 February 2012 - 05:00 PM

Scratch that. First off, post the definition of time_now. Secondly, you're using integer mathematics on your time values, which truncate values. This means that for time01 and time02 (very terrible names btw) until they have a difference greater than a thousand you will never see any increase in the radius of anything. Assuming that's in milliseconds then, theoretically, you might see it once per second...

Frankly, without the definition of time_now, its hard to say what's going wrong here. Also 0.002 is a VERY small amount... You might be growing it once per second as you expect, but only by a very tiny amount. Further, since we don't really know the starting radius of your sphere its possible that you hit floating point precision limits and aren't actually increasing the size of it at all.

### #2Washu

Posted 09 February 2012 - 04:59 PM

Scratch that. First off, post the definition of time_now. Secondly, you're using integer mathematics on your time values, which truncate values. This means that for time01 and time02 (very terrible names btw) until they have a difference greater than a thousand you will never see any increase in the radius of anything. Assuming that's in milliseconds then, theoretically, you might see it once per second...

Frankly, without the definition of time_now, its hard to say what's going wrong here. Also 0.002 is a VERY small amount...

### #1Washu

Posted 09 February 2012 - 04:55 PM

1000 is a literal integer. Your time values are longs. If you divide by 1000 then the result is also an integer. There is no decimal. Assuming your framerate is above 1 per second the result will always be 0.

PARTNERS