Game Development Reference
3D : Flash is getting better and better at producing interactive 3D environments. There are
a few competing systems for implementing 3D in Flash. They all require that you import spe-
cialized 3D classes and learn how to use them. If you have a thorough understanding of how
AS3.0 works and how to structure programs using classes, you won't find it difficult. However,
you'll need to commit to learning how these 3D classes work. Here are the current 3D class
packages for AS3.0: Papervision (and PapervisionX), Alternativa3D, Away3D, Sandy 3D Engine,
Physics : There are some excellent packages of classes available for doing precise physics simu-
lations with AS3.0. They include Box2D, Motor2, APE, Foam, and Glaze.
Tile-based games : A style of game design in which all objects on the stage are assigned to
squares in a grid. The code then creates an abstract model of the game behind the scenes in
arrays, and that model is used to update the objects on the stage. Board games, strategy
games, and certain puzzle games really benefit from the tile-based approach. Tile-based games
run very efficiently, use relatively little CPU power and memory, and are easy to extend if you
want to add new game levels. Because of this, the tile-based approach also works well for plat-
form and adventure games.
Vector math and geometry : If you'll create games that involve some degree of physics simu-
lation, it is really beneficial to spend a bit of time learning some vector math and 2D geometry.
Even if you don't think you're good at math, give it a try—you might just surprise yourself. You
can immediately apply what you learn to your games.
Saving game data : If you want to save some data in your game (such as a score or a game
level) so the player can quit the game and continue it later, you need to create a shared
object. This is covered in detail in the subchapter “Storing local data” in the chapter
“Networking and Communication” from Adobe's online document Programming ActionScript
3.0 for Flash .
Multiplayer games : It's always more fun to play games with friends. To make multiplayer
games you need to store game data on a server on the Web so that other players can access
that data to update their own game screens. There are quite a few ways you can do this, but all
require some research into additional “server-side technologies.” Your Flash games will be able
to communicate with these server-side technologies, but to implement most of them you'll
need to learn new programming languages such as PHP or Java. Do a bit of research into Java
socket servers such as SmartFoxServer, ElectroServer, and Pulse, among many others. (Java is
very closely related to AS3.0, so you won't find it completely unfamiliar.) You can create
a high-score list for your games using PHP, and you can store game data using a MySQL data-
base. You can avoid Java and PHP directly by storing game data in a content management sys-
tem (CMS) and accessing the data in Flash using XML. Adobe also provides its own Flash Media
Servers. The Media Development Server is free, and although limited, is a great way to get your
feet wet with multiplayer technologies in a familiar environment. As you can see, there's a lot
to learn! But it's all well worth the time you'll put into it.
As every game designer knows, making games is much more fun than playing them. Like an artist
who's just learned how to mix paints and sketch out a few simple scenes, a bit of practice is all you'll
need, and you'll be well on your way to creating that masterpiece. You've now got a solid foundation
in game design with Flash and AS3.0—go and make some great games!