potatoe

Started by
31 comments, last by Lithander 9 years, 8 months ago

 
Advertisement

Add that small delta to the accumulated time and when the value you add to is big enough then - surprise - the accumulated time doesn't change anymore.

Sonthe moral of the story is: delta-time values are ok as floats, but absolute-time values have such a huge range while still demanding the same precision as a delta has, which means you have to store them in a double (or a 64bit integer).

[edit]

I've had the same issue, where Gamebryo's animation system just started completely messing up (missing event triggers, etc) if you left the game running for too long. In their defense, "too long" was about 24hours, which they'd probably never tested, but in order for our product to pass certification, it did have to behave the same no matter how long you'd left it running...

From that point on, I've stopped using floats to store absolute time values wink.png


Sonthe moral of the story is: delta-time values are ok as floats, but absolute-time values have such a huge range while still demanding the same precision as a delta has, which means you have to store them in a double (or a 64bit integer).

Agreed. Unity devs, we're looking at you! :P

This topic is closed to new replies.

Advertisement