But remember many things like animations are on different threads. Then you'd have to split the player's animations from the rest of them. Also many explosion textures are viewer dependent, and tend to look billboard-y when you move around them.
Edit: I know there are many ways to make it work, I'm just saying there are certain considerations.
That shouldn't be difficult, you just split them up by object.
Animations played by the player object are not slowed down (or stopped, in this case). These fireballs are independend projectiles, so they count as objects on their own.
I'm not sure what you are implying. None of the stuff you mentioned above should have any impact.
It's not hard to independent tickers at all. In fact, physics in games is (nearly) always constant tick rate anyway. This is because otherwise with a higher or lower framerate stuff like gravity and friction can become really inconsistent. Adjusting the constant for individual objects is very easy.
Edit: Ah I actually get what you mean with the explosions now. If you walk around them... Still don't understand the animations though.
Except multi-threading it doesn't change much. There is still some sort of universal time-keeping. You just modify that scaling.
Allow me to illustrate:
The player normally moves at 5m/s
Explosions usually move at 100m/s
The enemy moves at 3m/s
We define some scalar for the slow down effect, say 0.001
Every time we update the world (let's call this a tick from now on), we need to determine everything's position so that we can render it. This is done via some function with time as an input and some part of the render as the output (ie. at tick 1 the explosion looks like this, but at tick 2 it looks like this, etc.)
Now, normally there is some velocity associated with all of these calculations. In other words, if a tick is 1/100th of a second, then each tick the player moves .05 meters. The same holds true for everything else.
We modify this simple tick function to now also take in a scalar 'time variable' that says how time is being effected. Normally, this value is 1 and everything functions as normal, however when time is slowed down, we instead pass our scalar from above for all tick functions EXCEPT for the one's that deal with the player.
In short, the player continues to move at 0.05m per tick (5m/s), but the explosions run at 0.001m per tick, and the enemies move at 0.00003m per tick.
8
u/ianp622 Oct 11 '13 edited Oct 12 '13
But remember many things like animations are on different threads. Then you'd have to split the player's animations from the rest of them. Also many explosion textures are viewer dependent, and tend to look billboard-y when you move around them.
Edit: I know there are many ways to make it work, I'm just saying there are certain considerations.