Who’s Best? Keeping Track of High Scores

As well as providing a way of measuring ‘success’ whilst you are playing a game, scores also allow support the element of competition with other players and against your own previous attempts at playing the game. Game Maker provides support for a High Score table that will keep track of the 10 highest scores that have been achieved playing the game.

To display the High Score table at the end of the game, we need to add another event to the controller_score object (as introduced in Points Make Prizes – or Penalties…) that will detect when the game has ended, and then display the High Score table.

From the controller_score Object Properties dialogue, click on ‘Add Event’ and then select Other. From the popup menu that appears, select Game End. This event is raised whenever the game ends, such as when you click on escape to stop playing the game. From the score actions tab, select the Show Highscore action and add it to the list of actions that are are executed when the Game End event is raised.

Now when you play the game, you should be able to keep track of your score as you play, and then see whether or not you have managed to make the High Score table at the end of the game!

To increase the element of competition when you start a game, how might you display the high score table at the start of the game using a similar technique to the way you added the High Score table at the end of the game? How satisfactory is this solution likely to be in general?

If you explore the Events option, you will see that as well as the Game End event, there is a Game Start event.

GM-otherEvent.png

This can be used to display the High Score table at the start of the game in much the same way that the Game End event displayed the table at the end of the game.

Unfortunately, whilst the display of this table at the start does mean you know what score you need to achieve in order to make it into the top 10, the fact that the game has actually started to run *underneath* the high score table may be problematic; for example, if you are playing a game where your player can be attacked and ‘killed’ by monsters before you manage to close the high score display, your experience of the game will not be a good one!

We’ll come on to see how to create a special start screen for the game in a few posts time – but for now, I need to get back to the grind and make that high score table mine… ;-)

Advertisements

5 Responses to “Who’s Best? Keeping Track of High Scores”


  1. 1 Matthew May 9, 2010 at 8:27 pm

    kind of already done this when got carried away lol but its nice to know how to do it properly. the coding was fun to

  2. 2 Martin October 17, 2011 at 5:12 pm

    Hi – you can display a high score table at the start of the game by putting this line of GML code in the Room Creation Code:

    highscore_show(1-10);


  1. 1 Upping the Stakes - Bonus Points « Digital Worlds - Interactive Media and Game Design Trackback on March 12, 2008 at 3:48 pm
  2. 2 Three Lives, Then You’re Out… « Digital Worlds - Interactive Media and Game Design Trackback on March 19, 2008 at 3:28 pm
  3. 3 Adding Title Pages and Game Over Screens to Game Maker Games « Digital Worlds - Interactive Media and Game Design Trackback on March 29, 2008 at 11:37 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Categories


%d bloggers like this: