# How many Animation clips does your character have?

I’ve been working on a 2D top-down project and started working with animation clips and scripting them into the game. My character can do the following: Run up/down/left/right, Jump up/down/left/right, Fall up/down/left/right, Punch up/down/left/right

With just these I already am up to 40 animation clips for transitioning into the different states like Falling and then landing on the ground, and implementing a double punch combo required a transition clip into the second combo etc.
I get that having 4 directions adds the clips required but I was wondering if there was an easier way to reducing the clips or else I’m gonna have a whole lot more clips as I progress but I only foresee this for the main character. Is this common for the main character of a game?

By top-down, you mean isometric view? Because for true top down, single animation track for every action will be enough. Then you just rotate your character sprite in the direction of movement

An example:

Also, some isometric games use sprite mirroring for reusing same animation for left and right direction.Since in Unity, sprites are flat polygonal objects, I assume they will be easy to mirror if you give the object negative scale on X axis

Use blend trees as much as possible, that will clean up your animator controller a great deal and reduce the “noise” that having a lot of clips creates.

A blend tree for movement should remove all of the directional clips and clean up the controller a hell of a lot!

I use blend trees and the view is an isometric one. I don’t have any clutter in my animation controller - just a lot of animation clips. Even if you use blend trees you still need animation clips for each ‘motion’. It does clean up the controller a lot though.

Yes. It’s also common for games to have fewer than 40 clips. It’s also common for games to have much more than 40 clips. Different games require different amounts of animation.

1 Like

The absolute barest possible minimum of animation of clips in a 3d character would be 5.
Walk forward, idle, attack, get hit, die.
Alright, you can drop “die” and make a character ragdoll. So I guess that’s 4.

In a 3d game with a freeform movement, you’d normally need something like like 8 or even 16 animations for locomotion alone, and you’d need to use blend trees for them.
The animations would be “Forward”, “ForwardRight”, “Right”, “BackwardRight”, “Back”, “BackwardLeft”, “Left”, “ForwardLeft”, and you’ll need two variations for running and walking. (reason for that is that if you just try to blend Forward/Left/Right/Back and no diagonals, results will look worse)

So, yeah, numbers go up very quickly.

2 Likes

Right - locomotion alone takes up a lot of the clips to make things ‘look’ right. For example like you said the transitioning motions, or even landing motions etc. Yeah , you can get away with removing these but it would look unnatural. It’s just one of those things I never really thought about before but found out as I started working with them in the game.
As I started working with it I just got wondering “Hmm - is it like this for everyone else or am I not following DRY here?” and figured I’d ask here if someone’s got a creative method in re-using 2D animation clips for a specific motion instead of creating a new clip for said motion. I’m beginning to think it’s a matter of preference. It does seem easier to just make a new clip but I can easily see myself with 100+ clips by the time I’m done with my main guy.

1 Like

Yeah its no biggie to have 100s of clips. Its not an issue As long as you are not talking about 100s of alembics which ofcourse will baloon the storage requirements for your game (but how many people are really using more than one or 2 alembics in games anyway?)

I’m gonna guess and say Alembics pertain to 3D graphics? Is it similar to .fbx ? I don’t recall ever hearing/working with an alembic before. I haven’t done too much research on what an Alembic is though. I’m only dealing with a spritesheet and tileset.

I assume it has something to do with this:
https://www.alembic.io/

8-16 clips I mentioned is for locomotion alone. No transitions, no landings, nothing. Just walking in 8 directions.

It is this way for everyone. That’s why people often get interested in procedural animation. Or why people use 3d. In 3d a “cheap” walk cycle is something like 6 keyframes. It won’t look that great though and will definitely look very oldschool.
On other hand, a pixelart animation can be two frames total.
So pick your poison, pretty much.

Also, japanese (3d) games, for example, sometimes cut corners, for example, rather than implementing “strafe in all directions” movement common for a shooters, they implement only “walk forward” and when character turns, the model simply swivels in place immediately. That reduces 8 animation clips you’d need to one, BUT it would also mean the character won’t be able to strafe. Amusingly the same time the same title might use mocup cutscenes along with reduced animation set.

In case of 2d left and right are usually mirrored versions of each other. Can’t mirror up/down movement, because character faces in different directions. People can also just use same sprite and rotate it if the game is topdown, like Gauntlet, but that might not look good at 45 degree angles and low resolution. Crimsonland uses this approahc, I believe.

In 2d, it may be also be possible to use “base and turret” appraoch where the character will be split into torso and legs, and torso will basically act like a tank turret - meaning it will be turning around to aim and shoot, and legs will be playing walking animation. That works for shooting games like Contra. The approach is similar to cutout animation.