Note About This Book: Advanced Lingo For Games was written by Gary Rosenzweig in 2000 for users of Macromedia Director 7. It is presented here for free on an as-is basis, with no updating. Most of the information and code here can be used in the most recent version of Director. The book has been reproduced from the final editing files archived in 2000, and not the final proof galleys. So some minor differences between this version and the printed version my exist. The entire contents of this book are Copyright 2000, Gary Rosenzweig. No part may be reproduced or copied without written permission. The text here is provided for individual use only.
Want to thank me for making this book available for free? Just buy Special Edition Using Macromedia Director MX and we'll call it even!

Advanced Lingo For Games
by Gary Rosenzweig


Chapter 10 Section 4

Putting It All Together

Each level of this game needs its own frame. Inside this frame, there should be three banks of sprites. The first bank is for the invaders; the second bank is for the player's bullets; and the third bank is for the invaders' bullets. In addition, the player's ship needs to be placed in the score as well.

The location of all these sprites is referred to by hard coded numbers in the behaviors. Here is a list, then, of where the sprites should be located:

  • Sprite 5: The Player's Ship
  • Sprites 6[nd]26: The Player's Bullets
  • Sprites 30[nd]53: The Invaders
  • Sprites 55[nd]75: The Invader Bullets

    Any of these numbers can be changed, but the code would have to be changed in the appropriate place to reflect the difference.

    After all the sprites are in place, the behaviors need to be dropped on them. Most of the behaviors require at least the speed of the element to be set. The frame behavior also needs to be dropped into the Score.

    Note that the bullet sprites all need to be positioned off the Stage so that they are not visible. The invader sprites need to be positioned relative to each other so that they are in formation.

    Remember to also add the second member for each invader. Don't forget to add the sounds that you want as well.

    After a single frame has been built, you can then make the frames to represent other levels. If you want the last level to be repeated until the player dies, then you can just duplicate it and have those last two levels refer back and forth to each other. For instance, the frame for the seventh level can have the frame for the eighth level as the next level, and the frame for the eight level can have the frame for the seventh level as the next level. Thus, the user plays the seventh and eight levels over and over until the game ends.