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 15 Section 5

Putting It All Together

The Stage needs to have three text members. The first is the "workspace" member. This member displays the phrase as a combination of underscores and letters, depending on how far along the game is. This member should use a monospaced, or fixed-width, font, so that the underscores and the letters that replace them are exactly the same width. Otherwise, the phrase might shift around as the user makes choices.

Figure 15.4 shows the hangman game screen as it might appear at the beginning of a game. The hangman graphic is just the platform of the gallows, while the phrase appears as all blanks and the letter list is full.

Figure 15.4
The hangman game is shown here at the beginning, before the user has tried a single letter.

The next text member is the one that contains the letters. This member also needs to use a monospaced font so the letters and the spaces that replace them are the same size.

The last text member is the "message" member. This member contains the "game over" messages when the phrase has been solved, or the hangman is complete. This member doesn't necessarily have to use the same font as the previous two members, but I have done so for consistency.

The only other screen element is the sprite that holds the hangman graphics. This sprite starts out with the first, or zero-numbered graphic, so place that one in the Score. You need to construct all the other hangman graphics and name them properly. The first should be "hangman 0", the second "hangman 1", and so on.

The number of hangman graphics determines how many chances the player has to get the phrase right. With eight graphics, like in the example movie, the player can afford to guess wrong six times. The seventh time the player guesses a wrong letter, they lose the game.

Finally, you need to populate a text member with phrases to be used. The next section gives some ideas as to what you can use.