home Downloadable PC Games Web Games
Abduction Studios Inc. Games! Developer Corner Contact Abduction Studios Inc.

Game Development Tutorials - > Making a game in Flash - the basics

This articles purpose it not to teach you how to use Flash, it's to explain a bit of the abstract thinking involved in developing a fully fledged flash game. Basically an overview of things that will need to be addressed when developing an Internet deployable game in Flash.

Up front
I'm not a super stud programmer so don't expect lengthy explanations in code terms. In fact most of the code we use is "if/else" statements. That being said, you will need to know the basics of Flash Actionscript before you even begin making that huge game you have in your head.

Another small disclaimer, this article is NOT necessarily applicable to "web games" or games that you play in a browser. Flash does this extremely well, and there are hundreds of tutorials on this type of game programming in Flash online. This is for downloadable games you can purchase using DRM software and launch on game portals like Reflexive Entertainment, Big Fish Games and Real Arcade.

Flash Limitations
Flash is obviously a very powerful program. However, there are several EVIL aspects to it as there are with any type of development software. Flash has several limitations I will skim over here.

1. Speed of animation playback
This is perhaps the MOST restrictive part of Flash. Even when you are running a standalone flash application (meaning it's not being streamed off the net, or played back in a hefty web browser) many things animating on the screen is bad. How bad? Well it depends on exactly what you are trying to do. Tweens in moderation are probably ok, although through my experience, using something like MCTween seems to help quite a bit. Moving objects in Actionscript is almost always better.

2. Library Management
Flash's "library view" or the list in which you manage your assets can get unruly in literally minutes if you are not careful. Planning a bit about how you want to organize your items will save you TONS of time later. For example creating a "bitmaps" folder will allow you to store all of your raw PNG's, Jpg,s and such in one place. Since you usually have to convert them into Movie Clips or Graphics anyways, they are almost useless in the viewer (unless you are updating them).

3. Level Management
Depending on what type of game you are making you are most likely going to need "levels". While Flash's Timeline system allows for virtually limitless "frames" in which you can stage anything from levels to user interface, this is also a dangerous pitfall. Case in point when I first made Luck Charm Deluxe, each level was represented by a frame on the main timeline. No big deal I thought. Turns out, when I got to level 50 the loading time for my level was increasingly longer! Even though I was using the good ol "gotoAndStop(x)" function in Flash, it was loading all of the frames between frame 2 and 50. Which happened to have at least 100 Movie Clips on each frame! Enter arrays. 2D Arrays allowed me to setup a nice little grid for each level so I could still use the frames to define levels (which is conveinient for level balancing) however, I didn't have to load all the Movie Clips every time I played a later level. At the beginning of the level, I simply called a function that "built" the level from a 2D array.

4. Debugging
Flash doesn't have the best debugging tools, in fact, I don't even know how it works! So I save often and backup even more often. This comes in handy if you aren't doing a ton of building while you are coding. I know there are other debuggers for flash out there, but I am too lazy to figure them out so I just use the good old "Backup" system.

That's it for the "big" Flash limitations. Now, let's get on to the good stuff!

Where Flash Shines

1. Actionscript
Simple to learn, very powerful and extremely friendly for prototyping and tweaking. These are all very important things when making a game. The more you can tweak the controls, levels, enemies ect... the better end product you are going to get. Learning actionscript for a non-programmer type (like me) may take several months of REALLY lame trial and error. However, Flash has a huge development base on the net that allows you to learn from downloading cool examples and such. If I ever run into a problem, I can usually search for "XXX in flash actionscript" and it will almost 100% of the time come up with a few things that will help me fix my problem.

2. Vector Graphics
Being an artist at heart vector graphics always make my stomach turn! I would much rather render something out in 3D. However, you can't beat the downloadable size of vector art. The ability to use vector art and rendered graphics is great. Even though vector art gradients and such do render slower, it's invaluable to have a way to stick a graphic in without leaving the program for testing purposes. Used wisely they are a great way to add some nice flair to your game.

3. Flash 8 - filters
In Flash 8, the filters such as drop shadow and glow are just amazing. You can control them through actionscript and they can save you on space by excluding them in your png files. These are great features that allow you to manipulate the art you have creating, sometimes even allowing for more bang for your buck by re-coloring enemies or pieces of your puzzle ect...

So how do you make a game in Flash?
I'm sure there are 100 different ways. The way we do it is simple. Take a look at the timeline below for a quick overview of how we setup our projects in Flash.

Quick Explanation:

frame 1-
Your company logo movie along with the distributors logo in a Movie Clip (and some variable initialization stuff)

frame 2- The main menu

frames 3 - 19 - Misc menus (options, high scores, story screen ect.) Most of them get their own frame so you can tweak stuff quickly.

frames 20 - 120 - Level frames with variables for the levels ect...

So from here you can kind of extrapolate moving between menus and level is as easy as "gotoAndStop(3)" ect... The other great thing is you can get to anywhere you need to in just a few clicks of the main timeline.

Layers
You can see we don't use too many layers on the main timeline. They are pretty self explanatory, however it it is probably useful to note that you can have tons of layers here. However the more simple you keep it, the easy it is to manage for sure.

That is a general overview of the process behind our Flash Games. Hope it was semi-useful at least!


 

home | pc games | web games | our games | area51 | contact

If you are interested in helping us out with beta testing email us at info@abductionstudios.com.
For information on distribution of any of our games, please contact us at sales@abductionstudios.com.

© 2008 Abduction Studios Inc.