Register
Lost Password?
Get The Latest Games Direct To Your Inbox Unsubscribe
New Games

High Scores Implementation

Our HiMi system allows users to save their personal best score, see their overall ranking and create leagues with their friends. Adding the HiMi system to your game will give it a better chance of getting on GameGarage.co.uk (but please note it won't guarantee it; it depends on the game itself too).

It's really simple to add to your game! Just follow these three steps:

1) Tracking

The HiMi system allows registered users to see how many times they have played your game and the last time they did. So first, insert the following ActionScript in the first frame of your game:

function tracking()
{
	myURL = "http://www.gamegarage.co.uk/scripts/";
	url = myURL+"tracking.php";
	lv = new LoadVars();
	lv.game_id = _root.game_id;
	lv.user_id = _root.user_id;
	lv.sendAndLoad(url, lv, "POST");
} 

The game and user IDs are passed into the game using FlashVars in our HTML. The above function needs to be run whenever the user:

  • Starts playing a game
  • Restarts a game
  • Continues a game

So insert this in the frame after the user clicks the Play button for example:

tracking();

2) Scores

The second part of the HiMi system is sending the user's score to us. So insert another function declaration in the first frame of your game:

function scoring()
{
	myURL = "http://www.gamegarage.co.uk/scripts/";
	url = myURL+"score.php";
	lv = new LoadVars();
	lv.game_id = _root.game_id;
	lv.user_id = _root.user_id;
	lv.score = XXXXXX; //Your score variable
	lv.alg = _root.game_id + _root.user_id + XXXXXX + "a83l9xj"; //Insert score again
	lv.sendAndLoad(url, lv, "POST");
}

Make sure you replace both XXXXXX's with the score variable (e.g. _root.score) you have used in your game. And again like the tracking, the scoring function needs to be run when the user finishes the game (completes all levels, dies etc):

scoring();

3) Submit

Next you'll want to submit your game to us, just make sure you say it is HiMi-enabled.

So that's it, you're done! Feel free to contact us if you need a helping hand or want us to sponsor / license your game and we'll get back to you ASAP.