Thank you for visiting Blazing Games

Creating Fire

The fire pit in the game is a movie clip that is broken into five parts. The fire pit can be considered to be a state machine, with the state being controlled by calling a function called setFireState. This simple function is shown below.

The states are numbered starting from zero. 0 is none and is simply an empty frame and indicates that nothing has been done yet. 1 is the pit state is simply the image of the circle of rocks. It occurs when the player uses the rocks in their inventory. 2 is the kindling state and is also simply a static image. 3 is smoke. This animation is actually a single smoke wisp that is flipped every couple of frames. Finally, 4 is flames which is a four frame animation that was described in the previous section.

Previous page
Chapter 12 Page 4

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