Last Monday i did another talk at the Southbank Institute of Technology for the animation students there, and as part of that talk I chose to share some things I had learnt about animation for games at my new job.

I talked the guys through a basic attack series. Just about all third person run around games have one, its the sequence that plays if you hit the attack button over and over, it also needs to be able to stop and return to the hold pose at at several points in case the player only hits the attack button once or twice.

Now for any pro's out there looking on I have to stress that this is my first go at a piece like this, I've been kept busy animating on other parts of the project since starting at Krome, but I did get to take a close look at some existing in game animations and bounce ideas for this piece off some of the other animators who had been working in games for some time.

OK, so if the player hits the attack button once this is what they are going to get.

Click HERE to Download The 30fps Version

The basic attack is made up of three main parts. The attack itself, a floating hold on the follow through pose and a return to the hold pose, the attack is about 15 frames long, the hold is about 20 frames and the return can be any length you like within reason (that's all at 30fps). Here are some important points....
  • You need to be aware of when the character is reacting to directions from the game player, and when this is the case the animation needs to get moving quick smart. When I showed this to a co-worker with more in game experience the first thing he did was delete my first 2 inbetweens. Players hate it when a characters reaction to them feels sluggish or unresponsive. In my film experience I would normally have at least a couple of frames easing out of the start pose, but not in this case.
  • The attack part is made up of three basic poses, each one has to have a kick ass dynamic line of action and be bursting with energy.
  1. The Anticipation - Often in a film context I would have the antic pose move back in the opposite direction to the strike, but as the player will be expecting him to launch into the action he or she requests at once I think it best to put it along the path into the action, in this case I just pushed him up onto his toe so he could still drop down into the attack, creating a nice arc. There is an ease in and out either side of the anticipation in this case, but that will vary from game to game (research!).
  2. The Strike - Pull out all the stops on this pose and be as bold as you can, there are next to no inbetweens either side of this pose, so it has to read in about one 30th of a second. I'll talk more about the timing around this pose for the second strike. I also like for there to be a reversal in the line of action at about this point, it makes for more change between the poses and gives the hit more impact.
  3. The Follow Through - Because we are going to build on this attack to make a whole sequence, the follow through pose has to work as an anticipation pose for the next strike. I originally had a more spread out pose here, but then had to twist it up more so that it made for a contrast into the next strike.
  • In this case the strike frame is 10 frames from the start, and that is based on an existing game. But it dose vary, the speed at which these things happen depend on the style of play the game is intended to have. Do your research, find a game where you like the animation style, get a clip of some game play (there are heaps all over the net) and match the speeds at which they do things. Don't just make it up as you go, its nice if you can have a consistent style.
  • The hold is there so that the player gets a fraction of a second to decide if they are going to continue with the next strike or do something else. Its just a subtle bit of movement, it needs to tween away from here into the next things, so nothing too broad.
  • The return to the hold pose is not in response to anything the player does, so you can be a little more relaxed with how many inbetweens you put in there and ease out of the follow through pose if you want.
So now you save that file (or if you were at work you would export the three parts of it need for the game) delete everything after the follow through pose and build attack 2 on top of that.

Click HERE to Download The 30fps Version

So as you can see the strike is the untwisting of the follow through pose on strike one. Again he has to spring away from that pose very quickly with very few inbwtweens. Here the strike is 4 frames after the antic (or the follow through from attack 1), and the attack its self is insanely fast. Lets have a look at how fast.

You can see in this overlay of the three frames showing the attack that there is a huge space either side of the strike pose. Its pretty much a triangle rather than the nice arc I would normall try to do. It has to be this fast to achieve the responsiveness needed for game play. Don't be to concerned if the attack seems so fast you can hardly see it, game makers have a trick up their sleeve. Games pretty much always have big swishy effects that they overlay onto the animation, the big broad arcs created by these effects combined with the lethal speed in the timing make for the perfect payoff the player is looking for when they push that button.

Also note that I was able to have a bit of fun with the return animation after the second attack, remember to be aware of when you character is responding to the player. If it is not then you can can spare some extra frames for some flair and personality.

On to attack 3. These strings of actions can vary in length, but I've only had time for to do 3 parts, that means its time for a big finish.

Click HERE to Download The 30fps Version

This last piece is not as polished at I would like, there are a few frames as he comes down into the strike that I'm not happy with, but its not looking like I'll find the time or energy to fix em so I think it better to post as is than not at all :P

We are looking for a nice rhythm here, one of the more experienced animators I showed this too tapped out the beats with his finger on the desk at each strike point to see if it was appealing which I thought was interesting. I made the anticipation a bit longer (the big flip) so as to break up the rhythm a bit, but the attack is still very quick.

The whole sequence should build to a climax, game players like a big finish.

This rig is the Rohan rig from TJ Phans blog, I found it very easy to use.


frank said...

Hi Ian this is great.

I tried to go through this type of games animation (in comparison to the character animation (for film) style that I have been taught), with the second years, in their last class for the semester.

It wasn't successful. As in all animation, my timing could have been better. Many were still waking up and not switched on (it was that teenage dawn time of 9 am). Others were fretting over deadlines for other classes. Some were already on 'holidays'.

I was heartened that a few animators engaged in asking some questions and some had remembered your games oriented points in the lecture. And the difference between their learning of traditional animation techniques and being bold and flexible enough to see how that knowledge can be adapted for different animation situations.

This post will be much more valuable than the planning exercise we laboured through that morning.

I'm glad that it is up here in your words for reference.

Willem Wynand said...

Yeah i never really though about animation for games until you gave the speech and showed us these examples. But when you think about it its so obvious, and how you said the guy came over and taped on the wall with every strike to get the rythm, which will eventually turn into the rythm the player will hit to do a certain move. I remember reading alot about Fable 2's design and how rythm was very imporant since the controlls had to be as simple as possible..
Thanx ian, defnitly a good lecture =) i couldn't draw you tho, so maybe when it comes time for another speech i'll be able 2 =)
anyway thanx for all the advice and tips =)
have fun!

Alonso said...
This comment has been removed by the author.
Alonso said...

(okay again, with clickable links)
Nice post. last game I did it was all about the combo's. You've got some great points, let me just throw in some thoughts from my experience.

You're right about the actual impact frame not being seen, the antic pose and the follow through pose being what you see and the swoosh being what you feel in the middle. One trick we do is to animate at a much faster fps (100) in order to have more frames to control the arc to ensure it leaves a pretty swoosh. (but our engine lets us tell it what fps to run each animation at, and our swooshes are based off of the tip of the sword, so may not work for everyone)

The 2ndary and 3rd idle it's important to be pretty extremely posed, because again when the player hits the button THAT'S the anticipation so you go straight into the attack from there. Think of cats hunting, they are always in their anticipation pose ready to spring, same thing.

Video games are all about strong poses, think comic book EXTREME poses, the breakdowns are almost not as important. Because as the player you're not really watching yourself, your watching the enemies, so strong poses read better when your not watching closer and make YOU feel more epic.

and TJPhan talking about working with the constraints of the engine
grace kids
and TJ talks about why he likes working in games more then films

Jeff Cooperman a while back made a series of posts about animation principles in animation. Sums it up perfectly "The answer is better shown than told…when you play a game and interact with a character, the act of pressing the button is the anticipation. Adding more frames to the beginning of your animation causes it to lag, making effectively a double anticipation." and he has animated examples.
gameplay animation part 1
part 2
part 3
part 4
part 5

Nate Lane said...

Fantastic post! Also, thanks for that Jeff Cooperman link Alonso. Yet again something that is completely new to me. Thanks guys!

Ian said...

Wowsa! thats some great links Alonso. I think maybe I need a new section in the resources menu for this kind of stuff. The side menus are a bit of a pain to update the way I've set up the ARC, but I'll get around to it some day ;)

Thanks for the comments everyone.

Frank said...

Hey Ian are you using FK or IK animation on the arms in this attack.

It just reminded me of Shawn Kelly's IK preference and his tip in the first tips and tricks book about constraining the hand to the sword (or broom etc).

Ian said...

hey Frank

I used FK, but many or even most of the others I have seen have been in IK. It makes no difference as far as the technical requirements for games as an export just takes a snap shot of the bone positions on each frame regardless of how you got then there.

So there is no right or wrong, I just like FK because it makes for nice ARCs ;) The actions are so fast that often all of the frames in the main action are keyed anyway, its only the little cusions where you are using the computer generated inbetweens.

So the short answer, use what your comfortable with. Just make great poses and use dynamic timing :)

TJ Phan said...

Ian, great post. And thanks for sharing those anims. That timing definitely feels right for a game. Alonso, great additions. Just for the record, though, I can't say that I like games more than film since I've never done film yet...hope I didn't say anything misleading in one of my earlier posts:) I can say, though, that I do really enjoy animating for games. I'm a gamer myself and I'm an action junkie:)

I wanted to add my 2 cents if you guys don't mind (I love talking about this stuff :D).

First off, those senior animators at your studio seems like they know what their doing. While looking for good timing and interesting rhythms, I often imagine the actual sound effects as each strike hits and "listen" to how they all play together. Jackie Chan also mentioned about "listening to sound" as he choreographs his fight sequences in his movies (I believe it's in his "Art of Action DVD").

I agree with what your fellow animator said about deleting a few frames from the inbetweens. To take it a step further, a trick I do sometimes is to animate from the idle pose, but when it comes time to export, lose a few frames off of the beginning. In other words, the first frame of the anim is actually NOT the base idle pose. This is ok since that attack could be blending from a run, or the recovery of another anim. This will buy you more frames for the anticipation pose.

Another word about responsiveness--while it is true anticipation should be kept to a minimum, I found that it's ok to have longer anticipations (for the bigger strikes) as long as you "pop" into the antic pose. DMC and Ninja Gaiden have some good examples of this, esp. with the strike down heavy attack from a jump. The attack doesn't instantly shoot down, but rather "pops" into the anticipation pose first.

One final word about responsiveness--while minimal anticipation and recoveries in the anims are important, they are only part of the equation. All anims must be "tagged" to allow for blend points (points in the animation that can be interrupted and branched to another anim if a button is pressed). This is usually for designers to specify. There should definitely be a back and forth here with both designers and animators. There should be points in pretty much every player controlled animation to allow for interruption from player input. To account for various possible inputs , there could even be multiple "tagged" points per anim. Without these points tagged, moves could come off as being unresponsive, even if you're only using 7 frames to hit a strike and 15 frames to recover. So before you cut those frames from your anims even further, make sure all anim interrupt blend points have been set by either yourself, design, or engineering.

Continue to post more of these anims, Ian, as they come off of the press!

Ian said...

Boy oh boy what a wonderful string of comments this is.

More great info TJ, thanks so much.

It is definately true that this is just the tip of the iceberg when it comes to all the animation needed and how they hook up. Some characters in the title I was working on had well over 80 little animation pieces that could all intercect at different points. Yeesh!

Interesting that you brought up the Designer. Maybe some don't know who that is. The designer is responsible for the entire look and feel of the game, bringing it all together into one cohesive vision. I guess the equivilant of a movie director. Something worth noting for students is that I've seen designers request specific animators that they find constructive to work with to be working on the more important (and usually more exciting) characters. So its the people with good communication skills and that are seeking out the best way to help the disigner create their vision that get the best gigs and bigger rewards. ;)

Oh and BTW, the game I have been working on has finaly been anounced on the Krome web site.

and you can see more here.


TJ Phan said...

Ahh--you're at Krome--awesome. I remember seeing their work in our team meetings back at Lucas. Good stuff.

And I hear you about the many pieces of gameplay anims that have to fit together. In a way, it's like a puzzle. I'm currently working on a character that has over 80 anims as well, and this character isn't even player controlled. We've had player controlled characters in the past that had about 300 gameplay anims. Just for kicks, I've heard that the Prince of Persia from "Sands of Time" had over 700 anims, which included a lot of transition anims. Altair from Assassin's Creed had over 4,000 anims (or 10,000 according to later interviews. I'm not sure if this number was exaggerated, though 4,000 is still a lot!).

To clarify further about designers, there's usually a design lead who oversees how the game PLAYS. There are combat and systems designers who take care of how the actual combat plays out, as well as the core gameplay mechanics. Then there are the level designers who are responsible for the flow of individual levels. The art director still oversees the actual look of the game.

Ian said...

Hehe thanks for that TJ, its funny how you are on the other side of the world and are able to clarify things around me here in the room :P

One thing I mentioned in my talk was that perhaps the biggest cultural adjustments for me moving from a more film based background has been the way information flows around in so many different direction in a (this) games studio.

One day I'm talking to a programer about an issue, the next a level designer, then a designer, then an art lead, a mesh artist. You never know who will be tapping you on the sholder next, or who you will have to go and find in order to flesh out an issue. Without a map, its often hard to see who is exactly responsible for what, sometimes I even detect that people has some confusion about what they are personally responsible for :P

But with everyone getting stuck in a game still seems to pop out at the end. I'm looking forward to the next game where It looks like I'll be doing more of a standard in game animation job, so I can see the whole process from beginning to end. :)

TJ Phan said...

Indeed, with all of the constant changes and iterations, there's never a dull moment when making a game (except when animating strafes and generic hit-reacts:p)

Btw, great stuff you're doing with the ARC, Ian.
Alonso--great posts as well.

Frank said...

I'm learning a lot in this exchange of ideas and observations.

Planning the animation sounds so intricate. It's wonderful.

Like having to program a human with reactions.

And then making them more than real using animation.