Frame Animation is a new system of creating 'movies' in the BoE editor, based on somewhat different principles to previous animation techniques. Most animations are done by changing the scene around the party. Frame Animation creates an illusion of this by moving the party rapidly between a number of scenes, each slightly different to the last. Note: All coordinates given in the code are only examples.
In this picture you can see the four 'frames' of a goblin walking up to a skeleton. To make an animation from those 'frames' the party is moved from the center of frame 1 (where the seat is) to the center of frame 2, to the center of frame 3 to the center of frame 4. In between each movement I play a 'step' sound to increase the time that the party sees each frame, and to make the animation seem more real. Instead of using move party nodes to move the party from frame to frame, I use stairway nodes. This is because stairway nodes take longer to process, and so slow the animation down enough so that the player can actually see what is happening. In fact, I usually use two stairway nodes per frame to increase the time that each frame is displayed.
The code for the goblin animation would look something like this:
0. Stairway to 5,5 in Town 0 (Always Change Level)
1. Play Sound 49 (Step 1)
2. Stairway to 5,5 in Town 0 (Always Change Level)
3. Stairway to 15,5 in Town 0 (Always Change Level)
4. Play Sound 50 (Step 2)
5. Stairway to 15,5 in Town 0 (Always Change Level)
6. Stairway to 25,5 in Town 0 (Always Change Level)
7. Play Sound 49 (Step 1)
8. Stairway to 25,5 in Town 0 (Always Change Level)
9. Stairway to 35,5 in Town 0 (Always Change Level)
10. Play Sound 50 (Step 2)
11. Stairway to 35,5 in Town 0 (Always Change Level)
Attacking and Casting
As with anything else done with Frame Animation, remember that each of these frames must exist in a static form. There is no movement, it only appears that way. A couple of custom graphics are necessary here, specifically those of the aggressor in his/her/its attacking stance and the red 'splat'. In this example, both are easily found in BoE's graphics files. You will need to create new items/monsters/terrain types that use these graphics. Playing appropriate sounds is, as always, a very good idea. It makes the animation look more real and helps slow everything down enough for the player to take it in.
The code for it would look something like this:
0. Stairway to 5,5 in Town 0 (Always Change Level)
1. Play Sound 49 (Step 1)
2. Stairway to 5,5 in Town 0 (Always Change Level)
// Goblin steps up to skeleton
3. Stairway to 15,5 in Town 0 (Always Change Level)
4. Play Sound 69 (Sword 1)
5. Stairway to 15,5 in Town 0 (Always Change Level)
// Goblin attacks skeleton
6. Stairway to 25,5 in Town 0 (Always Change Level)
7. Play Sound 39 (Monster dying 4)
8. Stairway to 25,5 in Town 0 (Always Change Level)
//Skeleton dies
Spellcasting works on the same principle. Again, a custom graphic of the caster in his/her/its attacking stance is necessary here. It is impossible to say exactly what should happen here, because of the diverse nature of spells. For an aggressive spell, a sound followed by a sfx burst and the victim being replaced by a bloodstain in the next frame works quite well. Other spells you may wish to simulate (say, Unlock) will require some adaptation.
The code for it would look something like this:
0. Stairway to 5,5 in Town 0 (Always Change Level)
1. Play Sound 49 (Step 1)
2. Stairway to 5,5 in Town 0 (Always Change Level)
//Apprentice mage walks onto screen
3. Stairway to 15,5 in Town 0 (Always Change Level)
4. Play Sound 74 (Firball swoosh)
5. Do SFX Burst on 13,3 (fire) // (SFX burst is on top of the Goblin.)
//Apprentice mage casts spell
6. Stairway to 25,5 in Town 0 (Always Change Level)
7. Play Sound 39 (Monster dying 2)
8. Stairway to 25,5 in Town 0 (Always Change Level)
// Goblin dies
Making Monsters Talk
Aside from simply running around and killing each other, you may want characters in your scenario to say something. There are a couple of ways to do this. One way is simply to make a dialog box pop up with the graphic of the speaker and his/her/its words beside it. The biggest problem with this is it interrupts the flow of the animation. There is another, more complicated way of doing this, but it has its own drawbacks. The method is to type out what you want to make a monster say and place these words in your custom graphics folder. Create a monster/item/terrain type with this graphic. Create a single frame with this monster/item/terrain type above the speaker. You will probably have to send the party through this scene about eight times, just so the player has time to read everything. There are a couple of ways of coding this.
The code for the first method would look something like this:
0. Stairway to 5,5 in Town 0 (Always Change Level)
1. Stairway to 5,5 in Town 0 (Always Change Level)
2. Stairway to 5,5 in Town 0 (Always Change Level)
3. Stairway to 5,5 in Town 0 (Always Change Level)
4. Stairway to 5,5 in Town 0 (Always Change Level)
5. Stairway to 5,5 in Town 0 (Always Change Level)
6. Stairway to 5,5 in Town 0 (Always Change Level)
7. Stairway to 5,5 in Town 0 (Always Change Level)
The code for the second method would look something like this:
0. Stairway to 5,5 in Town 0 (Always Change Level)
1. Increment SDF 250,0 by 1
2. IF SDF 250,0 >= '8' THEN GOTO 3.; ELSE GOTO 0.
Choose according to preference. The second version is more efficient, but when you are working with a node limit counted in the thousands (more on this later), five nodes here or there won't make much difference and some people may find it easier.
Again, this method of creating speech has some pretty clear disadvantages. It really is only of limited use.
Involving the Party
It may very well be that you would like the party to be taking part in proceedngs rather than just sitting and watching. The principle, as always, is the same. Change the scene around the party, playing a few footstep sounds and doing whatever else is appropriate, and it will look like the party is moving. Alternatively, you could just have the one big area and move the party around that with Stairway nodes. This may be the better option if you intend the party to play a major part in the animation.
The code for it would look something like this:
0. Stairway to 5,5 in Town 0 (Always Change Level)
1. Play Sound 49 (Step 1)
2. Stairway to 5,5 in Town 0 (Always Change Level)
3. Stairway to 15,5 in Town 0 (Always Change Level)
4. Play Sound 50 (Step 2)
5. Stairway to 15,5 in Town 0 (Always Change Level)
6. Stairway to 25,5 in Town 0 (Always Change Level)
7. Play Sound 49 (Step 1)
8. Stairway to 25,5 in Town 0 (Always Change Level)
9. Stairway to 35,5 in Town 0 (Always Change Level)
10. Play Sound 50 (Step 2)
11. Stairway to 35,5 in Town 0 (Always Change Level)
Making the Party Talk
You may want to make the party speak to other characters around them. Again, you could do this by the dialog box method, but you would need to find or create a graphic for the party (such as the one used in Doom Moon II). Failing that, use custom graphics for the speech text and place the monster/item/terrain type with the graphic in question immediately above the party. Again it can be coded in a couple of ways, as follows.
The code for the first method would look something like this:
0. Stairway to 5,5 in Town 0 (Always Change Level)
1. Stairway to 5,5 in Town 0 (Always Change Level)
2. Stairway to 5,5 in Town 0 (Always Change Level)
3. Stairway to 5,5 in Town 0 (Always Change Level)
4. Stairway to 5,5 in Town 0 (Always Change Level)
5. Stairway to 5,5 in Town 0 (Always Change Level)
6. Stairway to 5,5 in Town 0 (Always Change Level)
7. Stairway to 5,5 in Town 0 (Always Change Level)
The code for the second method would look something like this:
0. Stairway to 5,5 in Town 0 (Always Change Level)
1. Increment SDF 250,0 by 1
2. IF SDF 250,0 >= '8' THEN GOTO 3.; ELSE GOTO 0
Beating the 50 Node limit
Wouldn't you know it, there are two ways to do this too. For the first method, in the town where you step on the space that starts the animation, paste (using the paste command on the toolbar) several nodes onto the same space. Each of the nodes starts a chain that plays part of the animation. When the party steps on the space, then the chains are called one after another. The chain that starts with the node with the lowest number is called first, followed by the chain that begins with the node with the next lowest number, and so on, until all the nodes on the space have been called. The problem with this method is that every node chain must end with the party in the same town as the 'stacked' nodes. You can move the party through as many towns as you want, but if you want the next chain to be called, then it must end in the first town.
The second method exploits a somewhat odd BoE bug you may have encountered whilst designing. If you take a stairway at a set of coordinates (e.g. 25,25) to a new level, if there is a special on the same set of coordinates (25,25) in the new level, that special will be called after the chain started by the first node ends. This can be repeated almost indefinitely. Alternatively, the two methods can be combined by stacking several nodes on the 'bugged' coordinates.
Animation Base Town
In the included scenario you will find a town called Animation Base Town (town 1). This is a base town I used to make this and other animations. It is split up into frames and the nodes are set up to send the party through the first 30 frames, playing alternate footstep sounds and pausing on each frame for the appropriate amount of time. This chews up ninety nodes, the remaining ten are left free to use for various extra effects. These nodes are split into two chains of 45 five nodes each, the first going from 0-44 and the second going from 45-89. The starting node of the second chain is located at 32,32 (the center of town). This node setup, of course, will need a great deal of chopping and changing before it becomes something you want for your scenario, but I have found it to be a good base to start from. If you wish to use this town yourself, the scenario is unpassworded, so you are free to export it. A word of warning: all Stairway nodes are set to take you to town 1. You will probably need to edit this.
Well, that's pretty much everything you need to create some brilliant animations. Good luck, and enjoy!
-The Creator.