So what’s the point of having a flash game if there isn’t some way to keep score. Whether it be as simple as an incrementing number or as complex as graphics flying all over the place and icons flashing… your game (if it’s a game) has to track score. Ever since I’ve worked with games (particularly FPS games) we’ve called this our HUD. HUD stands for Heads Up Display and originated in combat air crafts . In our case, the HUD will keep track of our score in our game but it could be used to keep up with ammo, health, lives, awards, names…. anything. So let’s get started making a heads up display to display our scores
This is the first series on As Gamer that will take you through the basics of ActionScript 3.0 Development of a Flash Game. The goal is to give you a fundamental overview of using Flash CS3 or better to develop a game. If you are not a programmer follow along closely and I’ll try to make everything relatively simple. However, if understanding the reasoning behind conditional statements is not obvious, you may want to look into purchasing a programming book at your local bookstore. That said, this series will be very simple, but extremely effective at teaching you the principles behind the average flash game.
Movement is extremely important for any game in which you take the role character or object. Bad movement can completely ruin your game, and good movement can make it feel well polished. Of course, movement is just one part of your game, but it’s the foundation of everything your character will do, so you need to give it some attention.
Whatever you want to call it, a complete Flash game is going to need an user interface that kicks off the game. A place where the user can get more information about the game, see the credits, save the game, load the game, whatever needs to be done. The Menu the starts the game provides this functionality. So how are we going to do it? Well, you’re probably thinking this is a simple task, and it is. We’re going to make it a step simpler by creating a base menu class that we will extend in all our other menu classes. This base class will keep some of our core functionality so we don’t have to write transitions for each class uniquely.
Okay so hit tests. Hit tests simply are a check to see if two objects are touching one another. There’s plenty of ways of doing them and every shooter game needs them. AS2 had a nice little function called hitTest, AS3 has two functions…. hitTestPoint and hitTestObject. So what’s new about this hitTestPoint and hitTestObject and which one do you use? We’ll discuss it and how to make our bullets hit enemies and enemy bullets hit us.