Thank you for visiting Blazing Games

Something Batty

The vampire bats that make up the villains of this game were fairly simple to build. As you can see from figure 1, the bat is broken into two parts. The main body and the wing. This is to allow for the basic flying animation.

bat animation images
Figure 1: Bat animation images

The flying animation consists of simply rotating the wings to form a four keyframe animation (the middle position is used twice). The last animation remaining is the dusting sequence. My first thought was to take the easy route and just fade the bat out. I wanted a bit more of a Hollywood vampire death so took the small amount of time it took to create the dusting effect. The way I did this was to simply create a grey copy of the bat and in a bunch of keyframes slowly break the bat up into smaller and smaller pieces.

If you take a look at the bat movie you will notice that there is only a tiny bit of code used to control the bat. The two functions that are defined in the bat movie are killBat and isAlive. The killBat function simply starts the death animation sequence while the isAlive is used by the parent movie to help in the management of the bats. Note that this variable is only half of what determines if a bat is alive. The visibility of the bat movie is also used.

The bulk of the work to actually manage the bats is in the main game code. If you look at the code on frame 1 of the game you will find that the game initially creates a an array of bats. The number of bats allowed on screen is controlled by a separate variable called MAX_BATS. This is a separate variable to allow for easier tuning of the game. The array is populated with bat movies by using the attachMovie function. This means that the Export for ActionScript checkbox needs to be checked in the Linkage Properties panel of the movie (right click on the movie clip in the library and select Linkage from the menu to bring up the panel). To make sure that the bats are not alive, the visibility of all these movie clips is set to false.

Previous Page
1 2 3 4 5 6 7

About - Privacy Policy - Contact - Links - FAQ
Copyright © 2004-2006 Blazing Games Inc. All Rights Reserved.