Real-time animation is handled differently from big-screen animation. To make the game truly interactive, each animation has to be handled separately, so that the correct one can run when the player requests it.
In all, real-time animation can be separated into the five principal categories discussed in this section. Each animation you create will fit into one of these categories.
Idle and Fidget Animations
When the player stops controlling the character, it will begin to cycle randomly through various animations. If, for example, the character is standing still, a default breathing animation will play, in which the shoulders and chest rise and fall and the arms swing slightlythis is the idle animation. Once this has played for a while, another animation will randomly kick in; this could involve the character's looking around aimlessly, tapping a toe, or picking their nose; the intent is to give them variety and some feeling of life. These variants are know as fidget animations. Both idle and fidget animations need to be looped or cycled and so could also come under the next category, cycle animations.
Almost all the animations involving the character's physical movement (except idle or fidget animations, where the character is standing still) will be based on a single sequence, looping. A walk cycle is a good example of a cycle animation; this begins at the crossover point of the animation (the stage when the legs cross over from the side view) and ends in the same place. The animation can be looped seamlessly, giving the impression that the character can walk continuously.
The four-stage animation can also be described as a Move In, Hold, Cycle, and Move Out sequence. This sequence can be used when the character needs to change states temporarily; say climbing a ladder, for instance.
For the Move In, you need a starting animation where the character grabs hold of the ladder and moves into a pose where they can ascend or descend it easily. The Hold is this pose held while the player decides what they want to do; this Hold can be classed as an idle animation and so could possibly have other idle or fidget animations branching from it.
Next you have the Cycle. In the ladder-climbing example, the Cycle would be a short sequence involving the character climbing up or down the ladder. This would then be looped for the duration of the movement.
Finally, we have the Move Out, which is simply the character leaving the ladder and returning to the default idle animation or rest pose.
Blending animations are used to transition the character smoothly from one animation state to anotherfor example, from walking to running. Switching from one animation directly to another can cause the character to stutter or to jump obviouslyblending animations are intermediate animations that take the character smoothly and seamlessly from the walk to the run. These animations can even be taken a step further so that you have different animations based on which foot the character is currently on when triggered to change to a different animation.
With the exception of major change-of-venue actions such as the ladder climbing example, blending animations are rarely used in games. Blending is usually handled by the game engine, which tweens the position of the character in a frame of his current animation to the newly called animation. Obviously, tweening isn't the most visually appealing or accurate solution, but it is fast; and if the programmer is willing to tweak the parameters a bit, it can have a quite passable result.
These are simple animations that are specific to a character or to the game itself. Custom animations can include things such as operating a computer or transforming into a beast, but they are not the normal set of animations used by the majority of in-game characters.
More and more games are relying on cinematic animationsreal-time cut scenesto help the story progress. These are scenes played using the actual game engine rather than showing a prerendered movie. This method is beneficial because it can help keep the flow of the game intact. These "scripted" events usually involve an animated scene being played when triggered in the game.