🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

In a fast action game, how to handle smooth animations?

Started by
6 comments, last by JohnnyCode 8 years, 8 months ago

Hi.

I'm currently developing a game in Unity and it's an action game with a game speed between bayonetta and dark souls. I have been trying to study how these games handle the animation switching but it's hard since I can't record any footage to analyze. Correct me if I'm wrong but I think it looks like a game as fast as bayonetta even uses a few frames to smooth things out. For example: when running and then turning around and running in the opposite direction, she seems to be stopping for a few frames before continuing to run in the opposite direction. If she is standing completely still is impossible for me to tell.

Can someone please help me out? I'm aware of the possiblity to test all different kind of options but since I'm using free assets atm the result will be far from optimal. I would like to know the following:

-How many frames should be used to stand still when changing running direction by 180 degrees?

-Are these frames spent as a running animation, idle, or even a turn?

-What about when the change in direction is less than 180 degrees, would that require any animation changes?

Thanks for reading smile.png.

Advertisement

-How many frames should be used to stand still when changing running direction by 180 degrees?
-Are these frames spent as a running animation, idle, or even a turn?
-What about when the change in direction is less than 180 degrees, would that require any animation changes?


These are Visual Arts questions, not game design questions. Moving thread.

Not everything is Game Design.

-- Tom Sloper -- sloperama.com

-How many frames should be used to stand still when changing running direction by 180 degrees?
-Are these frames spent as a running animation, idle, or even a turn?
-What about when the change in direction is less than 180 degrees, would that require any animation changes?


These are Visual Arts questions, not game design questions. Moving thread.

Not everything is Game Design.

My bad,

I'm no expert on the subject, but I'm understanding a couple certain things, which happen to apply to both 2d and 3d animations.

In general, I understand you want smooth animations. But unless it is a really slow methodical movement platformer(which yours does not appear to be), your animation must be secondary to the actual movement. You don't want to not be able to jump just because you are still in the middle of a walk cycle, rather you need to be instantly jumping. If you want to have some sort of transition, fine, but you can't let it get in the way of the actual movement. The same thing applies to the 180 turns. I need to begin the slow down/stop process as soon as I hit the opposite direction, not waiting around extra miliseconds on an animation. And landing on the ground is notorious for this as well, as some games make you wait until the whole "landing" animation happens before allowing you to move, which is not optimal, though if there is a valid gameplay reason I guess it makes sense, but for fast paced gameplay, always make the movement king and the animations be controlled by the movement, not the other way around.



I'm no expert on the subject, but I'm understanding a couple certain things, which happen to apply to both 2d and 3d animations.

In general, I understand you want smooth animations. But unless it is a really slow methodical movement platformer(which yours does not appear to be), your animation must be secondary to the actual movement. You don't want to not be able to jump just because you are still in the middle of a walk cycle, rather you need to be instantly jumping. If you want to have some sort of transition, fine, but you can't let it get in the way of the actual movement. The same thing applies to the 180 turns. I need to begin the slow down/stop process as soon as I hit the opposite direction, not waiting around extra miliseconds on an animation. And landing on the ground is notorious for this as well, as some games make you wait until the whole "landing" animation happens before allowing you to move, which is not optimal, though if there is a valid gameplay reason I guess it makes sense, but for fast paced gameplay, always make the movement king and the animations be controlled by the movement, not the other way around.

Thanks a lot for posting. From looking at some nonoptimal bayonetta videos on the internet I think it looks like she does stop for a couple of frames just to turn around 180 degrees, but maybe it's hard to tell due to the game running at 60 fps, please correct me if I'm wrong. Do you mean that you should be able to run north at maxspeed, then in the next frame run south at max speed? I'm afraid that it will look like the player is teleporting but if even a single critically acclaimed game has used this method that would be an indication that it's acceptable to do so. Are there any which springs to mind?

I'm not sure in each case, and the best way will depend on your game and how quick you want things to happen. Remember that I'm saying to make the movement rule the animation, not the other way around. What you probably see in the video is exactly that, but because of movement friction, etc... there is that slight holdup. It isn't necesarily the animation doing it, but it really doesn't matter, as long as the animation isn't the deciding factor. The code behind it is unimportant, whether the movement's friction happens to be driven by the animation by design , or the animation simply following the code.

But no, I don't recommend instant turns in most action games. There should be some smooth transitions, etc... between turning, and there should be a slight acceleration. But adding that bit of smoothness is an art, because you don't want it to make your game sluggish either. Does that two frames you see in Bayonetta make things sluggish, or is it natural and easy to control as a player?



I'm not sure in each case, and the best way will depend on your game and how quick you want things to happen. Remember that I'm saying to make the movement rule the animation, not the other way around. What you probably see in the video is exactly that, but because of movement friction, etc... there is that slight holdup. It isn't necesarily the animation doing it, but it really doesn't matter, as long as the animation isn't the deciding factor. The code behind it is unimportant, whether the movement's friction happens to be driven by the animation by design , or the animation simply following the code.

But no, I don't recommend instant turns in most action games. There should be some smooth transitions, etc... between turning, and there should be a slight acceleration. But adding that bit of smoothness is an art, because you don't want it to make your game sluggish either. Does that two frames you see in Bayonetta make things sluggish, or is it natural and easy to control as a player?

Now that I know it's there I kind of notice it but it might just be my imagination cause I didn't think about it earlier.


-How many frames should be used to stand still when changing running direction by 180 degrees?



-Are these frames spent as a running animation, idle, or even a turn?



-What about when the change in direction is less than 180 degrees, would that require any animation changes?

1- the animation does not influence actual progress of player, bit if you want so, you will just have to synchronize animation with player transformation, but that is not issue, what you want is animation blending. This is a process of interpolating from last current frame into a provided arbitrary following frame, the time that blending takes is just up to you, but generally it should be quite short. There are multiple interpolation methods (linear, spherical, tangential, bezier...), the linear method is simplest. Also you cannot only interpolate, so to speak, if you want proper inbetweening at very differing poses, there is more than that.

2- interpolation that you use when blending is really the same interpolation that you use during explicit animation between the very frames, it is just a question of an animation state, like anim->getpose(frameindexA,frameindexB,animA,animB, betweentime). Some further abstract logic of "states" is up to you.

3- no, you just apply turnlike animation until you wish to, and then stop and blend out to idle animation just when you want, the actual turn of player happens as a single transformation (or you can deduce transformation to apply at the end).

This topic is closed to new replies.

Advertisement