
Ever wonder how I made this animation (or any of these)? You'll learn how in this tutorial, including a detailed behind-the-scenes look.
How do you make animations that behave in a realistic way?
Last updated: Apr 11, 2006 (first version)
Level 1 update on Jun 10, 2007 (a few very minor changes for clarity)
In this section, we'll learn the meaning of the data in the spreadsheet and what it's for, how to check for mistakes, testing your animation, and how to animate it.
1 Important notes
Each frame should always be saved as a separate file. When saving a frame, save as XCF to preserve the layers so you can make fixes when needed. The frame's file name should be a number, of which is the frame number, always with leading zeros. Why with leading zeros? It's how Windows works. If you just had 4.xcf and 14.xcf, the 14.xcf will be listed first when sorted alphabetically. For 12 frames, Windows would have it as 1.xcf, 10.xcf, 11.xcf, 12.xcf, 2.xcf, 3.xcf and so on up to 9.xcf. Adding a leading zero to make 04.xcf keeps the frames in the same order all the way through. Windows would then sort it like 01.xcf, 02.xcf, 03.xcf, ..., 09.xcf, 10.xcf, 11.xcf, then 12.xcf. The number of leading zeros to use depends on your animation's detailed plan. Our example expects 406 frames. The file name should always have 3 digits with the first frame as 001.xcf. From changes in your plan you might not expect, it's wise to plan ahead. If more than 800 frames is expected, I use 4-digit file names making the first frame 0001.xcf. If I run out of digits (I have frame 998 and need to save 1003), I have two options. Rather than digits, the first character is a letter instead, from the beginning of the alphabet, A, to the end. For frame 1263, it'd be C63 in this case (or C63.xcf). A second option is to just continue leaving frame 1263.xcf as is. The third option is where I create a folder to store frames in the 1000's. This is another reason why planning is important before even doing the first frame.
Use the frame column created in the spreadsheet document to determine what filename to give. Don't worry about possibly losing your data. It is a requirement to save each frame as a separate file. As you process each frame, you are automatically saving your progress. The only exception is when you make changes to the spreadsheet where you have to manually save it.
When moving a layer, be sure you use the layer move tool and make sure it moves only the active layer.
2 Doing the text objects
Now that all the scenery has been created, making the frames is all that's left. The first two frames are text objects. This is easy. All we need is a black background and the two text objects. In my case, I'm centering them (done in the same way you centered the player only vertical centering is also involved, which, too, is similar to the horizontal). Given our spreadsheet document, the second frame is 041.xcf. The first frame is always 001.xcf. Process these two frames.
3 The first scenery frames
3.1 What the spreadsheet data means
To get the first frame processed correctly, we first need to know what the spreadsheet data means and how to use it. Each row represents a frame. One frame uses only one row. Each column represents each layer, except the special columns like the frame, speed, and notes/actions. The mntns 1x column is for the X (horizontal) position of the mountains 1 layer, the furthest layer. The fog 2 column is for the Y (vertical) position of the fog 2 layer. The cell it lies in tells the position of the object on the given frame. For example, cell F7 has 120.175. It depicts the Y position of the fog 2 layer being at position 120 (trash after the decimal is ignored) for frame 111. Cell C65 has 27.63 which means that X position of the mountains 2 layer would be at 27 on frame 169. Cell J120 has 139.8463. This means that the diagonal speed, of which the speed stat uses, is 140 mph. The speed stat rounds decimal values to the nearest integer while positional values ignore the trash after the decimal.
Remember:
- Each row represents a frame and it's information.
- Each column represents the data for each layer or data type.
- For layers, columns indicates positional data, of which the trash after the decimal is ignored (148.83 functions as 148).
- For data (like the speed or height), columns indicate what is to be displayed, of which is rounded to the nearest integer (148.83 functions as 149).
3.2 Setting up the first scenery frame
From the positional data, we can set up the first scenery frame. Let's look at the spreadsheet again and do this:
- We've done frames 1 and 41 already and the next frame is 111. We look at the data for frame 111.
- In cell A7, we have a 0. This means that, on the left side, there are no pixels over the edge. This is what we currently have so no change is necessary.
- In cell B7, we have 120.07. This means that, the top edge of the fog area should be at position 120. To check it, place the mouse cursor over the top of the top part of the fog layer and check the coordinate. The screenshot at the end of this list explains what I mean. Note the position of the pencil tool and the position indicated on the bottom left corner. This is how you check (Although the pencil tool isn't needed, any tool works, but since screenshots don't get the mouse cursor, I used that method to help explain.). Since it's already at 120, we leave it as is.
- In cell C7, we have another 0. We already have this so no change is necessary.
- In cell D7, we have 120.0875. Again, the layer is indeed at 120 like it should be so no change is needed.
- In cell E7, we have 120.1167. Same thing - no change.
- In cell F7, we have 120.175, again no change.
- For cell G7, there's 120.35, no change. Since the lake is not visible yet, we don't have to process it.
- The speed to use is not actually 0, but 200, of which we already have. The X and Y speeds and positions are not important so all that's left is to save the frame.
- The character is float-running so we need the float run action layer to be visible. Since it already is, we don't need to make any changes.
- Since there's nothing else left to consider for the frame, we need to save the frame as a separate file. The frame is 111 so we go to file > save as then save the file as 111.xcf.

3.3 Processing the next scenery frame
Processing the next scenery frame is much like you did with the first scenery frame, except with one small difference. Rather than just setting the position, you also need to check for any changes. Remember, trash after the decimal is ignored. Let's go through it again:
- Compare the difference between cell A7 and A8. It changes from 0 to 0.4. 0.4 is considered as 0 and since there's no change, we don't do anything to the layer.
- Compare cells B7 and B8. There is no change at all here.
- Compare cells C7 and C8. It changes from 0 to 0.5. Dropping the trash after the decimal leaves just 0 and thus no change.
- Compare cells D7 and D8. Again, no change.
- Compare cells E7 and E8. No change here either.
- Compare cells F7 and F8. Once again, there's no change.
- Compare cells G7 and G8. Yet again, not a single change.
- Since the lake is not visible, we skip it.
- The speed remains at 200 so there's no change to the data shown.
Since this frame, frame 112, is exactly identical to the last one, frame 111, we don't do anything (don't save the file, it's not needed) and continue on to frame 113 where we compare again.
- Compare cells A8 and A9. It changes from 0.4 to 0.8. Dropping the trash after the decimal, you still have 0 and 0 thus no change here.
- Compare cells B8 and B9. There's no change at all.
- Compare cells C8 and C9. It changes from 0.5 to 1. Dropping the trash after the decimal, you have 0 and 1, which is not the same. When this happens, just move the associated layer (mountains 2) accordingly. Since it's a 1 on the horizontal, there should be one extra pixel on the closest mountain range over the left edge. Also, note that on the far right edge, you have more of the layer visible. That's why you have the overflow of the layer.
- Compare cells D8 and D9. There's no change here.
- Continue comparing the other cells. All other cells have no change. There are no notes either and the speed doesn't change.
- Since there was a change and this was for frame 113, we save the file as 113.xcf.
This frame had just a single change. Even a small change like this is all that's needed for saving the frame, even if one single pixel changed.
4 Further scenery frames
4.1 Going to frame 159
With frame 113 now done, we now compare what changes are needed for frame 114. In this case, only the furthest mountains change (from 0.8 to 1.2, or 0 to 1 - a change of 1). Continue processing the frames until you reach frame 159. When there's no change at all, then skip the frame without saving and go to the next one. The data you just processed for a particular frame relates to that frame only and that's what file name you save it as. After processing frame 159, we have this:

Compare this view to the last screenshot. You can now see a considerable difference in the mountains' alignment with each other. The furthest mountains moved less than the closest ones. The difference in the scaling gives the 3D-like perspective. Also note how I'm using the image window like a book reader to help prevent skipping a line. Doing this makes comparing changes between much easier and thus faster. Also note that I'm saving what was frame 157 as 159 as there wasn't any change in 158.
4.2 Frames 160 through 163
Frame 160 is slightly different than the previous ones. As before, process frame 160 like you did with the previous ones, but instead of saving the frame right away, there's a note. The note says that the obstacle appears on the left. This is a mistake I made as, if I'm heading to the right and I'm about to trip over it, the obstacle would appear on the right, not the left. A change like this, since the frame hasn't been processed yet, can be made without any concerns of redoing frames. All that's needed is to make the obstacle layer visible. Since, at the end of this frame, the obstacle hasn't been run into yet, I'm still float-running and the speed remains the same.
However, since the character or other objects in the image has a change of some kind, you still save the frame, even if the background scenery doesn't move for that frame.
Frame 161 is processed the same as before, only the obstacle, because it's now off the view downward, becomes invisible. The notes say that I'm now jumping so hide the float run action's layer and make the jumping action layer visible. Unlike all other frames before it, different parts of the scenery now start to move. One of these new changes in frame 161 is that the speed is now 198 instead of 200. Another is that the closest fog layer goes down one pixel making it now at 121.
Continue like you did before with frames 162 and 163. Be sure to change the speed stat! At the end of processing frame 163, I have this:

4.3 Frames 164 and 165
Look at the notes/actions column for frame 164. The action is "flash attack used". This creates a sudden white flash lasting 1/20 of a second. Problem is, the animation uses 10 frames per second (each frame lasts 0.1) which means it lasts half of a frame. How do you do this? That's another case where the color-averaging formula comes into use, or at least a variant of it. Because the flash lasts half as long as one frame, the flash should be 1/2 transparent (alpha of 127.5, which rounds to 128). If it lasted for 1/25 of a second, which is 0.04 of a second, it'd be 40% transparent (alpha of 102). This was one thing we left out when making the animation - the flash so it looks like we need to create another layer. As usual, just process the scenery like you did before. The flash attack doesn't need a character action. The flash doesn't cover the speed data.
Frame 165 is like that of frame 161. In this case, process the scenery as usual, but make the flash layer invisible. After just saving frame 164, this is what I have:

You can see the color and that I have the alpha at 128. This is why percentage alpha is very confusing for me and means lots of guess work. Setting alpha at 50.0 gives 127 when it should be 128 so I use 50.2 instead.
4.4 Continuing to frame 281
Past frame 165, continue on for another 116 frames until you reach frame 281. Until here, it's nothing but scenery movements. However, the speed stat also changes so don't forget to change that as well. Remember to check your movements and positions to prevent errors or minimize their impacts. If you catch a mistake, go back to previous frames and check the first frame in which the error occurred and fix all those afterwards until you get to the frame where you noticed the error.
When you reach frame 233, the point at which the lower fog layer becomes invisible, rather than moving it, just make it invisible. Along with the slower speed involved, by this time, you'll be going a few frames in a row without a single change in the scenery. On frame 243, because the speed drops to double-digits, the text has to be repositioned to account for this. At the end of processing all this, we now see this:

The mountains are now quite a ways below, nearly even to the top of the shortest mountains. On those last 25 frames, you may have noticed that the only changes to be made for a few frames in a row was that of the speed. Ready to fall back down?
4.5 Continuing until the finale
Heading out from frame 281 to up to 400 has one more unique encounter. As before frames are processed in the same way as before. Don't forget to change the action used to falling since the character is now falling. Note that there is no change at all for quite a few frames at the start, even the speed stat. Remember to skip frames that are exactly identical. Don't forget that the layers are moving upwards instead of downwards. Upon reaching frame 330, since the closest fog layer is now below 240, it becomes visible again. Frame 331 has the speed back into triple digits so the speed layer needs to be moved back again. Upon reaching frame 391, the lake becomes visible. Other than this, there isn't any other change needed. At frame 400, we have this:

Note how the scene is like that from before hitting the obstacle only with the mountains shifted further to the left and further disaligned. In fact, the change from the disalignment is 10 meaning that the closest mountains have moved 10 pixels further to the left than the furthest mountains did.
4.6 The finale
In the next frame, frame 401, it's splash time. However, water normally has waves and we don't have a layer for the waves. This means we'll need to create one. Water waves are dynamic as well - they move. About 3 mph seems about right with wave heights of about 8 pixels (a little over a foot). Like with the mountains, we need the water's waves extend out further.
There's yet another problem - the land underwater. For this, and as part of the waves layer, we just draw the land as part of the waves. For a more realistic water-like atmosphere, we'll make it half-transparent. Since the ground is now higher, the view is blocked by the lake layer.
There's, however, still one more problem. Earlier, we mentioned of uncertainty on what that last value should be when the character lands. Our original plan called for about 16 to 32 pixels of clearance from the top of the image. We didn't have the scaling earlier and now we do. The image has 120 pixels above the horizon. For 16 to 32 pixels of clearance, this means 104 to 88 pixels above the horizon. I like 88 better so I'll use that. To get the 88 in the spreadsheet, we need to find a speed to get the vertical position to match -88. A vertical speed of -64 is what we need. As to how far down the bottom of the lake is, that's 64 pixels down from the bottom of the character. Upon landing, since the speed at the end of the frame is actually 0, the speed is 0 mph. We should have everything set after this.
Don't forget, on frame 402, since the character lands, to use the standing action. For each frame after frame 401, move the waves 4 pixels to the left. I'm using a repeating pattern so once it goes as far as it can, I just go back the full wave length, which is 32 pixels in my case. Remember the splash as well.
3.2.3 Animation creation tutorial - how I make my flash-like animated GIFs to the finest detail
3.2.3.1 Introduction - The indroduction and tools needed
3.2.3.1-1 Introduction
3.2.3.1-2 Tools used
3.2.3.2 History - The history of my animation creation
3.2.3.2-1 The AVI days
3.2.3.2-2 MSPaint and early animated GIFs
3.2.3.2-3 GIMP and my latest animations
3.2.3.2-4 Automation leads to extreme complexity
3.2.3.2-5 Discoveries made along the way
3.2.3.2-6 The future
3.2.3.3 Glossary of terms and common formulas - Common animation-related terms and common formulas involved with art
3.2.3.3-1 Glossary
3.2.3.3-2 Commonly used formulas
3.2.3.4 Planning - Forming the plan - what the animation will do and how to set up the spreadsheet
3.2.3.4-1 The base plan
3.2.3.4-2 The main plan
3.2.3.4-3 The detailed plan
3.2.3.5 Creating the scenery - Making the scenery - how to optimize it and work with it
3.2.3.5-1 Some important notes
3.2.3.5-2 The easy stuff
3.2.3.5-3 The mountains
3.2.3.5-4 Making the character
3.2.3.5-5 Adding the obstacle and speed data
3.2.3.6 Animating - Processing the frames - using the spreadsheet data to make the frames of the animation
3.2.3.6-1 Important notes
3.2.3.6-2 Doing the text objects
3.2.3.6-3 The first scenery frames
3.2.3.6-4 Further scenery frames
3.2.3.7 Testing - Testing the animation - how to test the animation to spot problems
3.2.3.7-1 Compiling the animation
3.2.3.7-2 Testing the animation
3.2.3.8 Tips and tricks - Tips, tricks, and shortcuts to make animation-creation easier and faster
3.2.3.9 FAQ - Some commonly asked questions and help to common problems
Footnotes:
None.