Walking cycle for protagonist

This is a corner stone of game animation. A general action is a character walking or running. The perception of game dynamics directly depends on its quality. If you are not sure of your skills or you do not have enough time for such a sequence, it is better to not use animation that is not made properly or looks sloppy, but to improvise instead. A character can use wheels to move, which are easier to animate, even with code. For example, a robot can be equipped with caterpillar wheels instead of legs, and a humanoid may utilize a small car, bike, or something like a Segway PT. Another option is a graphic: it is obvious that more realistic, detailed, and well-crafted graphics need animation of high quality, so if you have no opportunity but to achieve such a level, it's better to simplify the graphic look of the game. For example, convert the graphic to a pixelated 8-bit form, giving it a retro touch. Old games did not feature complicated animation, usually there were only few basic frames in the walking animation.

To plan the walking cycle sequence right, you should start with the speed of character moving on the screen. It is better to determine such value using game mechanics and not animation. Therefore, a few prototypes can be created to choose the correct speed of the elements. Make some hard playtests and find out the most effective and expressive value. After that, you will know how many pixels the character covers in a specific period of time. This value influences the size of one particular step your character makes.

To calculate this length, you need to take the speed of movement and multiply it with the duration of one step. For example, the speed is equal to 20 pixels per second, but one step lasts for half a second. So, the distance between the extreme positions of the character's heel and toe should be 10 pixels. If the size of the step is connected with the speed properly, the character moves naturally and by himself (he is not affected by an external force). His legs do not slide by the surface, but push off like levers. Until one leg is lifted, the support leg should stay at the point it was put before without any small offset. Despite the leg moving backward in the animation sequence, at the scene, the speed of the character must compensate that motion (speed vectors are opposite), creating an illusion that the foot makes solid contact with the ground.

It is worth mentioning that you are free to choose the frequency of steps and everything depends on the character's anatomy and temper. The same distance can be covered with one big step or five tiny ones. In the first case, the character is most likely to be tall with long legs, and in the second case, it is probably a small creature with short legs and a fussy temper.

Now let's start the animation workflow. The character's illustration has been imported in Adobe Flash and has been separated into layers; everything is ready for work. Traditional animators used frame-by-frame methods to animate characters, drawing each new frame from scratch. But we can use the advantages of automatic interpolation provided by Motion Tween . You need to create only key frames that store the important phases of motion. All transitional frames are generated automatically. The following figure shows the basic phases of the protagonist's walking cycle:

Walking cycle for protagonist

The walking cycle consists of two equal parts—step sequences for each leg—so at least there should be three positions for key frames on the timeline. Let's call them the main phases . The first main phase includes a posture: when the character's right leg is in front, the right foot is in contact with the surface. This is the beginning of a step sequence for the left leg, which starts to move forward. The second main phase is opposite to the first one: the left leg is now in front and has contact. The third main phase is identical to the first one (it is created by duplicating key frames) and is needed to create a proper arc for interpolation between the second and first main phases. To make an important remark, the last frame should be rejected after the export procedure because it is identical to the first frame of the sequence; if this is not the case, the sprite sheet will have an unnecessary frozen section and the walking cycle will not be smooth. In other words, if you have 11 frames in the sequence, the first main phase is placed on the frames 1 and 11, the second phase is on frame 6, and after export, only ten frames will be used because frame 11 is only technical and is unnecessary. To throw such a frame automatically, you can use the graphic symbol for your animation. Place it on the main scene, but reduce the length of the main timeline by one (the graphic symbol will have 11 frames, but the main scene's timeline will show only 10). Primarily, you need to create the first main phase, arranging parts of the character in the correct pose. The following basic principles can help you with this captious job:

  • Tilt of the figure: It is commonly known that walking can be characterized as controlled falling, but falling is something that was moved from equilibrium, so the position of the character will not be stable. Like a falling tree, it must tilt in the direction of movement (tilting in the opposing direction is usually associated with slipping on ice). The degree of the tilt depends on speed. When a character walks slowly and on an even keel, the angle is small. When he rushes or is running very quickly, the angle is pretty big.
  • Pose contrast: It is one of the ways to express a motion vividly. To use this contrast based on opposite moves, there must a general gesture and a background gesture, which is less active. If you lift the right hand and move it forward, the left hand will move backward. The viewer feels the difference between these motions and the sum of impressions is bigger. Like in mathematics, the difference between opposing numbers (1 and -1 for instance) is greater than that between the number and zero (1 and 0). Moreover, the pose contrast is natural for a human walking cycle. I'm talking about the behavior of arms, they always move in opposition to legs: if the right foot is in front, the right arm is behind. This is particularly noticeable when a gait is rapid and the arms are more involved. Try for yourself to break that rule, walk in a room, take large firm steps, and attempt to swing your arms parallel to feet. This will need some additional attention and control and will look very weird. Hence, always try to illustrate an individual move by moving other parts of the image in the opposite direction.
  • Contact: Remember that the ground is a surface, and in most cases, it is solid and so part of the character cannot penetrate it. You have to draw a line that will symbolize the ground level (this can be done using guides). Try to avoid situations in which a foot or other elements cross the line. In other cases, it can be described as "walking in a pastry"—the character caves in and slips. Another important thing about contact with the ground is the convincing expression of figure support. The viewer should be sure that the character really stands on the ground using its legs and is not simply floating in the air, swinging his legs. Thus, always illustrate that the character has mass and when the foot touches the ground, it is affected by this mass and it supports the entire figure.

Using these principles, you can create the starting point for the walking cycle. At its base, the second main phase can be easily generated. You only have to change the legs and arms of the character. As mentioned before, the third main phase is created upon duplicating the first one. The early draft of animation is now ready. If the motion tweens work properly, the character begins to walk. Of course, the result is far from ideal. It is too mechanical and there are many visible bugs; nevertheless, it can be used for a preview purpose. You should take such frames, create the sprite sheet, and test the character inside the game world, regardless of minor demerits that can be fixed later. The following figure shows the intermediate phases of the protagonist's motion:

Walking cycle for protagonist

Once the draft animation fits naturally into the game, you can continue to work on the walking cycle. The sequence can be enriched by additional phases of motion placed between the main phases.

The following additional rules can help you:

  • Arcs: The trajectories in the walking cycle are not straight lines, all elements moved along curved paths. The height of the character is not constant. The legs work like levers and change angles relative to the pelvis at all times. The height is at maximum when the leg is completely straightened; in other cases, the pelvis and the whole body moves downward. Thus, the figure of the character always fluctuates—it moves up and down. The faster the character walks, the stronger the visual wavering is.
  • Flexibility and delay: The character, even when it is a robot, is not a solid object such as a rock or bronze statue. It consists of individual parts connected together, each joint gives the figure some range of freedom, and the body is flexible and bounces when the figure walks. This means that impacts on its parts are irregular, some of them react fast, while others react with a slight delay. Everything depends on their mass, type of joint, and the distance to the point of application. There is an obvious example from the real world: if you move a cup with a tea bag inside fast enough, the paper label attached to the tea bag with a thread will lag behind. When you stop, the label will stop a little later. By introducing such behavior in the animation, you can increase the artistic expression of the character, making it look more complex and alive.
  • Recoil: Objects don't stop without opposing actions.

New phases, let's call them intermediate , should include a posture. When one of the character's legs is at a straight angle to the ground, the arms are almost parallel to the body and the head is in the highest position.

By testing and approving the animation with intermediate phases, you can finally switch to the fine-tuning of the walking sequence. Some elements need manual adjusting. So, for some parts, such the feet and palms, as many key frames as possible should be created. The most tricky part is, of course, the feet because they need to follow the level of the ground.

To give the animation an ideal look, you can use some advanced methods. First, recall that the walking cycle is always unique. The next step has some minor differences, the character's walk should not be too uniform. If it is technically possible, it is good to have alternative frames for specific phases. They can have some tiny differences in the basic frame: another angle for the foot, the character offsets his eyes, and so on. The game can randomly choose between the basic frame or its alternative version; therefore, the final animation may look very natural because the motion is not monotonous.

Another way to increase the attractiveness is to add some extra sequences to illustrate when the character begins to walk or stops moving. By default, the game uses a sharp switch between the characters, that is, from the standby mode to walking or vice versa. This is not a big problem, a player usually doesn't notice such things, but animation with smoother transitions between states is perceived more professional. Such tiny details increase the overall level of visual quality. The most important sequence is the stopping process. This is because in the real world, the character would have some amount of kinetic energy and his body would not stop immediately because of inertia. So, it is very likely that an object that is suddenly stopped expresses some signs of insubordination to the new circumstances. The object would tilt a little forward and then recoil, followed by a final attempt to move forward; this would last for a short period of time, till the object reaches quiescence. In case of a character, before he finally stops, the body tilts forward, the arms continue to move straight, and he almost falls. Finally, he recoils backward, followed by a small fluctuation, and the sequence is over.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.82.154