Video Game Design and Programming Concepts 134 Copyright Goodheart-Willcox Co., Inc. May not be reproduced or posted to a publicly accessible website. 119. Add a String object that reads: Number of Hearts Collected. Position, size, and format the object on the frame as appropriate to be a label for the score. 120. Applying what you have learned, add a Hi-Score object. Format the text as appropriate. 121. Add a Quit button that will end the application. 122. Add a Replay button that will restart the application. 123. Display the storyboard editor. 124. Applying what you have learned, set entry and exit transitions of your choice for all frames. 125. Run the application. Fully test all frames. 126. Debug as needed. Tuning The computer will track the movement and position of objects even if they are outside the viewable area. To reduce the amount of processor load, or work the computer processor is doing, the objects outside the viewable area should be destroyed. This will help the game run without lag on a mobile device. The game should also be debugged for visual clarity. This means inspecting the game to see that objects can all be seen properly, text is readable, and objects are in the correct stacking order and fixing any issues. For example, on the Game Frame, the Score object gets covered by platforms during gameplay and cannot be seen. This needs to be fixed. 127. Display the Game Frame in the event editor. 128. Add a new event, and program this pseudocode: IF the Platform 1 object leaves the play area from the top, THEN destroy the Platform 1 object. 129. Similarly, program the Platform 2 and Heart objects to be destroyed when no longer needed. Storyboard Editor Run Application Drag and drop the object onto the frame Goodheart-Willcox Publisher Figure 10-17. Objects can be dragged and dropped between frames using the tree in the Workspace Toolbar.
Previous Page Next Page