|
Want to thank me for making this book available for free? Just buy Special Edition Using Macromedia Director MX
Advanced Lingo For Games
| |
| Game Variations
This version of Space Rocks does not have all the bells and whistles of similar games. Adding these could considerably increase the amount of code. However, I would be remiss if I did not mention them. ShieldsThe game already has a grace period built in for a short time after a new ship appears. You could also allow the user a limited number of shields that can be activated with a special key press. When the shield is up, the ship cannot be hit. You can use the same grace period code for this. For added effect, you may want to change the member that represents the ship to a bitmap that also shows the shield during this time. Flying SaucersYou could have a flying saucer appear every once in a while that is worth extra points. A simple one could just behave like a rock, except that it only flies across the screen once. A more complex one can change direction, and even shoot bullets back at the player. Thruster GraphicsYou can have a second ship graphic member that represents the ship while the thrusters are being fired. This member is put in place of the ship while the user holds down then up arrow key. More Rock VariationsThe example game includes two variations of each size of rock. You can have just one variation, to keep the file size down. You can also have many more variations to enrich the game. Just make sure you name the new variations properly and change the code to reflect that it has more than two choices for each rock. You could even have the rocks change as the player moves up levels. Using Vector ShapesInstead of using bitmap shapes for the rocks, you can use vector shape members. There are two main advantages to this. The first is that they draw nicely no matter what angle the sprite is set to. The second is that you can accurately detect whether a bullet has hit one rather than using the distance formula estimate. With a vector shape, you can use hitTest to determine if any point on the Stage is inside the boundaries of the vector shape. | |