Thank you for visiting Blazing Games

The Pure Code Approach

While artwork is nice, the rooms can be differentiated by color. Color can be adjusted by using the Action Script Color class, making it possible to change the color of an object at any time by simply setting a new color. Flash 8 has depreciated the Color class in favour of the new flash.geom.Transform class, so if you are targeting Flash 8 or higher you will want to use the new class instead of Color if you are going to use this technique in a similar game.

How this technique would work would be to have a single room image that would be used for all six rooms. A table would hold room transition information for the doors. When the player clicks on a door, you know which room the player is moving to so you would simply change the color of the room using the appropriate function calls. The room the player is in would be a simple variable tied to a number, with the colors for each room inside an array that uses the room number as a reference. In fact you could have all the info you need in a single table as follows:

I never went with this approach to the problem because I never actually though of it at the time. I was actually going to follow the artistic approach I outlined in the previous section but simply didn’t have the time, so ended up doing the tinting. The programming approach would probably been quicker to do.

Previous page
Chapter 1 Page 4

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