26 Dec, 2008
I’ve updated my coding conventions slightly.
Also for those of you waiting for the next article…be patient, it is a BIG one! I’ve created many Artificial Intelligence behaviors and a great OOP structure to use them, and I’ll be discussing Boids and many of the behaviors in detail. I’ll try to get it finished as soon as possible.
I hope everyone is enjoying their Christmas break!

Loading ...
13 Dec, 2008

Dealing with sounds in Actionscript can be kind of wacky. Sound Objects, Channels, Transforms…blah. I don’t like messing with all of that, so I’ve built a sweet, easy to use Sound Manager. I don’t suppose it has any magical powers or anything but that’s only because I couldn’t think of anything magical a Sound Manager should do…other than play sounds and control volume.
The Sound Manager Class
It is a Singleton, and can be used from anywhere in your game / project. Simply register all of your sounds to the manager, and play them using IDs rather than having references to the sounds themselves.
Also, I have made it so that you can play a “sound”, or play “music” which is controlled at a different volume. Also, it is set up so that only one music sound will play at a time.
Here is the interface for the Sound Manager: Read the rest of this entry »

Loading ...
9 Dec, 2008
This is the 4th article in the series: Building a Game Structure. Be sure to read the introduction which also has links to the rest of the articles in the series.
In previous articles we have put together a framework to handle various issues with our game. As of now, it would be quite sufficient for creating many simple games. One problem however, is that the creation of multiple types of entities in various places in our code can get cumbersome and is prone to errors and/or problems if we begin to make changes to the way we want our entities to be created
The Factory Method
The proper way to handle the creation of multiple objects with similar functionality is to Read the rest of this entry »

Loading ...
1 Dec, 2008

This is the 3rd article in the series Building a Game Structure. Be sure to read the introduction which also has links to the rest of the articles in the series.
There comes a time when working on a game that you realize the need for an effective way to manage all of your entities and game objects. Also, not all games consist of just one simple non-scrolling screen so you must devise a robust way to deal with the problems of displaying your entities in the correct position based on where in the world you want the view to be centered, not to mention handling the mouse’ world position. Not only that, but it would certainly be nice to have some basic, simple, and reusable classes for rendering your entities so that you don’t ever have to deal with it again.
These are the issues I will be covering in today’s article, and of course I will wrap up by showing the code that I use and handing you the source to play with. I’ve made a few slight changes to some of the classes which I will talk about below. Read the rest of this entry »

Loading ...