|
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
Again we have a situation where a game contains a list of words that can be used to suggest a theme. In addition to varying the theme of the words, you can make the matrix a different size, or even adjust the difficulty of the game in a variety of ways. Word ThemesI won't even try to list suggested word themes for this game. The truth is that almost any theme can be used. You can do a list of words that are obviously related, such as the planets in my example movie, or you can make a list of words that vaguely suggest a theme. Matrix SizeAs mentioned during the "Making the Game" section, the matrix does not have to be 15[ts]15. A simpler game can be created with a smaller matrix, or a harder game with an even larger matrix. A larger matrix would also allow longer words. To change the code to accommodate a matrix of a different size, you first need to change the "pMatrixSize" property in the on beginSprite handler. Then, if you want to resize the letters as well, change the font size and the fixedLineSpace property mentioned in the code. You should also examine the game to see if the selection line width still seems to correctly highlight the letters. With a little trial and error, you can use this same code to present a word search game of any reasonable size. Word DirectionSome people, myself included, find it nerve-racking to have to search for words in all eight possible directions. You can change the above code slightly so that words are only placed horizontally from left to right and vertically from top to bottom. To do this, the piece of code in the "on buildMatrix" right after the "-- pick random direction" comment should be changed. Here is one way to do it.
-- pick random direction
if random(2) = 1 then
horizPlace = 1
vertPlace = 0
else
horizPlace = 0
vertPlace = 1
end if
A clever programmer could even set it so that the letters can also appear diagonally, but only in the two diagonal directions that read from left to right. Selection MethodsAs mentioned earlier in the chapter, using a line shape sprite is not the only way to highlight a selection. You could use two lines, one on either side of the selection. Or, you could use a vector shape member to create an oval around the text. You could also eliminate the need for a separate selection sprite altogether by just using different colors for the letters. Of course, this would mean keeping track of the previous colors of the selected letters so that they can be changed back to black or gray if a selection is not fruitful. | |