MFGG High Score Service



How To

1. Create a scoreboard for your game

You can do that here. It will ask for a name for your game, and a password. The password is necessary if you ever forget vital information about your game.

What vital information, you may ask? Your secret key and ID. The secret key is for entering a score; never tell anybody what it is, or they can use it to put up fake scores! The ID is for retrieving scores.

If you ever lose this information and need it again, you can log in here with your password to get it again. Forgot your password? Contact HylianDev or VinnyVideo. They can get you the information you need and/or help you reset your password. This is still in alpha. No password reset, sorry ¯\_(ツ)_/¯

2. Sending scores to the database

When you send a score, there are four possible fields:

The secret key should be the secret key of your game, as mentioned above. The name of player should be self-explanatory; let users fill in their name. Score is an integer value; no decimals allowed. Auxillary is up to 255 characters of your choosing. Use it to say what level the player made it to, or what character they were playing as, or anything like that.

Where do you send this information? How?? You send it to the following URL:

You can also send these parameters over POST rather than GET. How you intend to send that via Game Maker (or your preferred IDE) is up to you.

One more thing! Feedback. Sending this signal will return a JSON string. Don't know what JSON is? Here's some info on that. All JSON strings returned by this service will have two nodes: success and data. Success is a boolean letting you know if the information you requested was retrieved successfully. Data is an array that contains other nodes. Which nodes it contains depends on the result. If success is false, something messed up. In that case, data will contain a string called message telling you why. If it's a success, then if you're sending a score, data will contain a string called message saying it worked. It's mostly for show I guess.

3. Retrieving your scoreboard

You can retrieve your scoreboard much like you send a new score:

You use the numerical ID of your game as game_id and include ajax so that it will return a JSON string. If you do not include ajax in the URL, it will download the HTML web page! This could be bad!

Note: if you want to retrieve ALL scores instead of the top 10, include donotlimit as a parameter in the URL. E.g.: ?game_id=0&ajax&donotlimit

As stated before, all JSON strings returned by this service include a success and a data node. Success is a boolean that will tell you if the request was successful or not; data will either contain a message string node telling you what happened if something went wrong, or a results array containing all of the data you need to present the scoreboard to your players.