Thursday, June 5, 2008

Finished product

My game project is now officially finished and released. It can be viewed here:


I know that it takes a long time to load and I know that the branding is cheesy but the game is solid and functions well. Today I will explain how this project came about and go over some of the tools I developed for it.

One of our company owners sold a client on the idea of a flash game to promote his new child-centered campaign. In the IT department we didn't have much direction other than . .

it's a game about a duck
some kind of flying would be cool

Knowing the environment we needed to work in (flash) and having a set budget that limited us to around 400 hours we began to research game ideas which lead us to the super M game from free world group.

This gave us a basic concept to work on and it was time to involve an illustrator. Most flash games have a similar visual style because they are made by flash people that use flash for art and many of them learned to make games from the same tutorials. It was never an intention of ours to break away from the mainstream look but we aren't a flash shop and so our graphics don't look standard. Anyway we had graphics prepared for obstacles, collectables, menu screens, and instructional pages as well as our main character the duck. There are four levels that each have a distinct look; snow, city, forest, and country.

In learning actionscript 3.0 I found that I needed a lot of helper classes which I wrote and will make available shortly. These include:

AssetLoader
A class that automates the loading of bitmap image assets in a group. Takes url strings as input and encapsulates the process of loading all of the images. Maintains a volatile Number representing overall load progress going from 0.0 to 1.0. Dispaches an AllLoaded event when finished and locks it's own data until it is cleared (this prevents a new entry from being added so there can be no confusion from some images being loaded and some not).

DataLoader
Adapted from AssetLoader to load in data files, in particular XML files for my game. Operates in much the same way as AssetLoader but on a different type of file. These are distinct from one another because flash uses different load methods for data than for images.

GameCamera
Defines the properties of a simple 3d camera for movement through an environment. Controls the viewing area and the focal length which determines rate of scaling with distance.

SoundManager
In addition to applying the abilities of AssetLoader to mp3 sounds (the only externally loadable format in AS3) this class also manages the playback of sounds and maintains a thread pool of all sound channels in use. You are also able to do common useful things for the purpose of a game such as turning music off and on, turning game sounds off and on and stopping and resuming all playback (as in when the game is paused and resumed).

ManagedSound
An extension of the actionscript Sound class this class adds in a few parameters such as how you want the sound grouped (music or effect), and a playback offset value. This offset takes care of a deficiency in the mp3 format that introduces blank space at the beginning of a sound. (This creates a major problem with the event based sounds in a game because it introduces a delay and prevents the player from feeling immersed in the experience.) This class is used by the SoundManager class.


So thats all for now but check back soon or subscribe if you prefer. I will be releasing the code related to all of these tools through this blog along with explanations of what prompted each tool to be created and how those problems were solved.
Also if you have read along this far here I recommend you go ahead and pick up this book on AS3.