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.
All games need enemies…. okay, maybe not tetris. But if you’re in some game where you fly a spaceship it is more than likely that there’s going to be an enemy or two. So in this tutorial we’re going to learn to make our enemy class, making enemies randomly appear on the stage and move, and make them fire bullets at us.
So you need to create a weapon, maybe a laser, and you want your character to fire the weapon. At the same time, you want a nice delay between firing each round instead of a crazy Gatling gun effect. Well this Flash tutorial is for you. We’re going to learn to make our Spaceship fire lasers with a nice timeout between each fire. To do this we’re going to use AS3 Timers, so get ready to use a timer and create the perfect delay for your laser.
Okay, so your character is designed, moving correctly, and all around pretty fun to control… but when you move off the screen, he just disappears. So you want to make him always stay on the screen… Maybe an invisible wall that bounces him back… maybe he flips to the other side of the screen. And your background, it’s cool and simple but you want something that has some movement. This tutorial is about making your character interact with the level correctly and look good doing it.
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.