Thank you for visiting Blazing Games

Opening Things Up

After playing with the final release of the game, I found two things that I thought were missing from the game. First, a way of exiting a game. Second, a way of turning off the sound.

An exit button was a very easy thing to add to the game. While this feature is not an absolute necessity, it is a nice feature to have. It lets you leave a game without completing the game. This way, if you accidentally start a shifting mode game when you wanted to play a standard mode game you can quickly exit the game and select the proper mode. All that is needed to add this feature is an exit button which goes to the title screen when it is clicked.

Turning off sound is a bit more complicated problem. Flash supports global sound. By creating an instance of the sound object, you can control the volume of sound. Turning sound off is simply setting the volume of the global sound object to 0. Turn it back on by setting the volume to 100. Where the problem comes in the creation of a sound toggle button. This can be solved by having two versions of the sound button. One that is used when the sound is on and one for when it is off. The button to make visible is determined by a _global.g_soundState variable. I use a g_ as a reminder to myself that a variable is global. The following code, which is placed in the game’s main loop shows how I did this.

The toggle sound function is very simple.

And that covers everything in the game.

Previous Making Deadly Doors Contents Page 10 of 10 Deadly Doors Next

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