Name: ___________________________________________ 133 Lesson 10 Spawning Copyright Goodheart-Willcox Co., Inc. May not be reproduced or posted to a publicly accessible website. 104. Select only the Leaves in the bottom?, Leaves in the top?, Leaves in the left?, and Leaves in the right? arrows. The button for a selected arrow will be blue. 105. Click the OK button to create the condition IF Spiko leaves the play area. 106. For the condition just added, program the actions needed to match this pseudocode: THEN destroy Spiko AND go to the next frame. 107. Test the frame. Check that the frame ends if Spiko exits the play area on any side. 108. Debug as needed. Title and Winner Screens A game should always start with some direction on how to play the game. For this game, you will create a title screen to tell the player the name of the game and to give basic directions for how to play. The game also needs a winner screen to display high scores and to cleanly end the game. 109. Display the Title Frame in the frame editor. 110. Applying what you have learned, add a Play button that will advance to the next frame and a Quit button that will end the application. 111. Design a decorative layout for the frame. Use a background from the library, or experiment with the Backdrop object to use your own image. 112. Add text boxes to explain how to play the game. 113. With the Title Frame displayed in the frame editor, expand the tree for the Game Frame in the Workspace Toolbar. 114. Click the Heart object in the tree in the Workspace Toolbar, drag it to the Title Frame in the editor window, and drop, as shown in Figure 10-17. This copies the object to the Title Frame. Placing game objects on the title screen is a good way to let the player see what will be present during gameplay. The movement of an object can be changed on each level (frame) without affecting the same object on a different level. Movement settings are local to the frame. 115. Complete the design of the title screen using your imagination. 116. Display the Winner Frame in the frame editor. 117. Set the background color of the frame to black or other dark color of your choice. 118. Applying what you have learned, drag the Score leaf from the Game Frame tree, and drop it onto the Winner Frame in the upper-right corner. Run Frame Select the four “leaving” arrows Goodheart-Willcox Publisher Figure 10-16. Selecting which areas to test for the object’s position as it enters or leaves the frame.
Previous Page Next Page