Managing animation state transitions
Posted: Tue May 11, 2010 4:17 pm
It's always nice to be able to have your characters actually move, rather than just float around. But one thing has been bugging me for a while now; how should you manage animation state transitions?
To explain what I mean, here's an utterly glamorous illustration:
At the top you can see the normal running animation. At the bottom you can see what happens if the player jumps in the middle of the running animation. It doesn't look terrible in this example, but sometimes jumping from one frame to another, completely unrelated one, can look very odd. So my question is, what would be the best way to handle these kinds of transitions? Ideally I would want to be able to insert one or a few transition frames between (in this case) the running animation and the jumping animation. Or have the running animation continue until it reaches a keyframe where the transition would be made.
Another issue would be how to avoid sluggish and annoying controls. I don't want to sit around waiting for my character to jump, half a second after I pressed the button, but I don't want it to jump from being in the middle of crawling on the ground to doing a somersault.
And for the lulz, here's a demo of what the animations currently look like: http://dl.dropbox.com/u/176093/walkanimation.love
To explain what I mean, here's an utterly glamorous illustration:
At the top you can see the normal running animation. At the bottom you can see what happens if the player jumps in the middle of the running animation. It doesn't look terrible in this example, but sometimes jumping from one frame to another, completely unrelated one, can look very odd. So my question is, what would be the best way to handle these kinds of transitions? Ideally I would want to be able to insert one or a few transition frames between (in this case) the running animation and the jumping animation. Or have the running animation continue until it reaches a keyframe where the transition would be made.
Another issue would be how to avoid sluggish and annoying controls. I don't want to sit around waiting for my character to jump, half a second after I pressed the button, but I don't want it to jump from being in the middle of crawling on the ground to doing a somersault.
And for the lulz, here's a demo of what the animations currently look like: http://dl.dropbox.com/u/176093/walkanimation.love