You now have a complete, single-level Wild Pockets game. In this activity, you will add an opening screen with instructions for the user, and a closing screen that informs the user that the game is over. To do this, you will use the user interface components of the Wild Pockets environment to write text on the screen.
In order to make the game a little more realistic, you will also add a scoring function to the game. Decide on how the score should be awarded (add points for good things, subtract points for bad things), figure out where to update the score in the game code, and print out the user's score on the game over screen.
At this point you have completed the Wild Pockets tutorial, and should be familiar with using the development environment and using the documentation (the Wild Pockets API Reference, the Lua programming manual, sample program code, etc.). This activity will not provide all of the code that you need, you will need to develop the code on your own. Remember, if you need help, ask for it in the forum!
. In this activity, you will:
- print instructions on the screen, and wait for input from the user before starting the game
- implement scoring, and print a "game over" and score screen
Skills you will learn include:
- working with the game system's user interface to print messages to the user
- game design; the score keeping function should accurately reflect a user's skill with the game
- Visit http://wildpockets.com and log in to your account.
- Click on the Build icon (the screwdriver) to enter the Builder.
- Open your previously saved scene.
- Use the Wild Pockets API Reference (it can be accessed by clicking on the '?' in the Builder), and read the documentation for the User Interface components. These components can be used to print text on the screen. Print some instructions on the screen, including instructions for starting the game ("click left mouse button to continue" or something like that). You will probably use an EventMap to wait for the user to perform the action that starts the game.
- Add code for keeping score. Modifications to the user's score (adding/substracting points) are probably done in places like an event handler (for example, when the user shoots) or in a collision handler (for example, when the user hits a target, or is hit by a bad guy).
- Add code (again, using the User Interface components) to print some "Game Over" text and the user's score at the end of the game.
- Complete the activity by submitting the URL for your game. In the builder, go to the File menu, and select Send To A Friend. A small dialog box will pop up containing a URL; copy the URL and submit it to the activity. The URL will probably be longer than you can see in the box, so be sure to scroll and grab all of the text!