It's time to think at introducing a global game clock to drive animations.
Blood spread on floor is a good example to explain its interest:
A blood print vanishes after 'some' seconds. Currently a counter of seconds is
set, decremented at each frame, until it comes to 0.
To avoid to have to scan all 'animated' objects, their 'counters' are changed
only when those objects are rendered, that is when they are visible.
For blood spread on a level, it means that if the player leaves that level and
come back several minutes later, all the blood prints will start to vanish only
at that time.
So, instead of decrementing a counter, we rather need to compare its value with
a current global clock.
The value of that global clock has to be saved in the savegame.
|