- Title: Custom High Score Tutorial
- Description: How to add a custom high score to your game
- GM Version: GM8.0, GM8.1, GM Studio
- Registered: No
- File Type: ZIP
- File Size: 1.9Mb
- File Links: Highscore Tutorial GM8.x Versions OR for Studio Highscore Tutorial GM Studio GMZ Version
- Required Extension: None
- Required DLL: None
Game Maker 8.x versions include a built in high score system which uses the registry to record the top 10 places and contains several functions to allow it to be customized. Sometimes however it is desirable to store more than just a Name and a Score or avoid using a Windows style pop-up window which freezes the action or maybe you need to format to include decimal places or commas to separate thousands for the score.
Game Maker Studio cannot use the Windows registry and is not allowed to block the client device. For this reason a new version of this tutorial was created specifically for GM Studio. It essentially performs the same function using different techniques.
The illustration above depicts a Custom High Score layout showing Name, Money and Score. It is easy to customize and add to your games and does not freeze the game action. It can also add a thousands separator to the scores (to make them easier to read) and allows you to set decimal places for the additional score date (useful for collecting money amounts). The best part is you don't need to be a "wiz" to learn how.
This tutorial will teach you how to make and add a custom high score system to your game. It is aimed primarily at novice GM learners but experienced users may find it simpler than writing their own from scratch.
The High Score Example supplied with this tutorial shows how the Custom High Score System operates by simulating a game. It allows for a Name, Amount and a Score, the headings for each can be easily changed to suit your game. You can also specify the number of decimal places to display for the amount (useful for currency values) and whether to add commas as a thousands separator to the score.
The Example serves to illustrate how it works, allowing you to experiment with it before adding it to your game. The default image sets are unlikely to be in keeping with your game and alternative image sets are also supplied which you can edit or replace with your own.
The download also includes an example game together with a tutorial with step by step instructions to explain how to replace the example game's default high score system with the custom one. Knowledge of GML is an advantage but not a requirement; customizations can be done without coding knowledge.
The default GM high score system only saves a name and the score attained; this Custom display permits you to save an extra numeric field which can be used as a level counter, money earned, rank attained etc. It uses the default Game Maker high score system to store the top ten scores in the registry, so they are still maintained between game runs without the need to save any files.
*The Studio version uses data structures and files to save data rather than the Windows registry and is in-keeping with sandbox policies.
No credit required. Free to use for personal or commercial games.
Feedback and comments always welcomed.
Edited by Noele, 02 November 2013 - 10:08 PM.