image Tutorial on Plot 7 - Score and Game Control

image Scoring is easy. Simply describe how the score increases by any event. The following gives a couple of examples.

You can choose where the score is displayed on the canvas by using the map textbox. Use '=' to denote the position of the score.

You might also want to describe conditions for the game to be over. For example:


Try it yourself: Let's look at the carrot shooting game from the previous tutorial:

There are twenty carrots scattered near the top in the playing area.
There is one pointer placed near the bottom of the area.
The player controls the pointer with the keyboard.
When right arrow is pressed, the pointer moves right.
When left arrow is pressed, the pointer moves left.
When spacebar is pressed, the pointer shoots up.
When a carrot is shot, it explodes.

How would you add score keeping?

How would you change the game plan so that the game ends when all carrots have been shot? There are multiple ways to do this.


Complete Sample Games for Score and Game Control

// Game #1. Dino Breakout.


// Game #2. Don't let the rocks touch the walls.


// Game #3. Touch the Spinstars.



Next Page

Tutorials Home