Appsurd
Member
Online Highscores in GameMaker Studio
GM version: GMStudio 2023.11
Target platform: ALL
Download: https://marketplace.gamemaker.io/assets/4205/online-highscores-example
Links: N/A
Latest change: 2024-02-09
Level: Advanced
Summary
This tutorial will explain how to create a highscore system for your game. You can send the scores to the server and you can show a top-10 highscore list in your game. If the player’s name is not ranked in the top 10, but the player is ranked somewhere lower, then the player’s rank and score will be displayed in the eleventh position. The player’s name can be given a different colour. Don't forget to check the directory and the secret key very carefully, because this is the most common source of errors!
Table of contents
Introduction
Chapter 1: Creating an account on Altervista
Chapter 2: Coding and setting up the database
Chapter 3: Setting up GameMaker Studio
Conclusion
Frequently Asked Questions
Changelog
Introduction
An online highscore system is a cool feature for almost every arcade game. Highscores make people competitive and keeps them closer to your game, since everyone wants to be ranked first. Since GameMaker Studio has no built-in functionality for online highscores, you have to program them yourself. This tutorial will try to explain carefully and with many intermediate steps how this could be done. The tutorial includes two important scripts and a sample project, which can be downloaded from the YoyoGames Marketplace for free. After finishing the tutorial, you can make your own highscore table, where the player's name is coloured differently so he/she can find its position easily. Also, if the player is not ranked in the top 10, the position of the player will be displayed below the top 10.
If you are looking for a tutorial with more features, please have a look at https://marketplace.gamemaker.io/assets/8926/online-highscores-premium.
This tutorial and all its assets are completely free; you are not required to give any credits to Appsurd. If you want to give credits, please refer to us as Appsurd. We appreciate it if you rate the sample project in the Marketplace and tell us if something can be improved. Thanks in advance and enjoy the tutorial!
Chapter 1: Creating an account on Altervista
In order to make the online highscores, you need to have a server with a database. Since I understand that not everyone has one, you may choose to create a free account on the website https://en.altervista.org/registration.php?action=create-hosting. Please note that creating this account is for free, and you do not need to buy a premium account. Also, please do not use a VPN while creating an account, as it might cause errors.
Sometimes, while creating an account, Altervista will notify you that "The plain Hosting service is not yet available in your country." This means that you were unable to create the database. Luckily, there is a solution for this. Instead, you can create a blog first, and then convert the blog into a website + database. Go to https://en.altervista.org/registration.php and register your account. You may need to wait several hours (up to 48 hours) before your account is validated. After your account has been activated, you need to login and you will see the Dashboard of your blog. In the left column, find “Settings” and look for “Convert to hosting”. See Figure 1 for more details.
Figure 1: The Dashboard of the blog. The settings menu is somewhere at the bottom of the list and the button “Convert to Altersite” or "Convert to hosting" is indicated by the orange frame.
Then press “Convert to AlterSite” and click the “Go on” in the middle of the page. Then follow the instructions to convert your blog to a website with a database, since we need a website and a database (actually only the last one but they come together) and not a blog. Now we have succesfully created an account, so we can go to chapter 2 which will inform you what codes and settings you need!
It is not obligatory to use Altervista, but I strongly suggest you do. If you cannot use Altervista or you have your own domain, you need to apply a few changes, which are mentioned throughout the tutorial.
If you still encounter any technical problems while creating an account, try to Google your problem first. When you still haven’t been able to create one, you may always contact me directly via email or just leave a comment in this topic.
Chapter 2: Coding and setting up the database
After you’ve finished creating an account, it’s time to start coding. First go to the Dashboard. You should then see something like this:
Figure 2: The Dashboard of Altervista.
First we want to set up the PHP code. You do not need to know anything about PHP but it’s an advantage if you do. Click the “File Management” in the top orange frame. You should now see something like Figure 3. If you converted your Altervista account from a blog to a website + database, you need to delete all files first.
Figure 3: The “File management” screen. If this is not empty, delete all files first!
Here create a new folder using the buttons in the orange frame, and give it the name of your game. Therefore I will use “OnlineHighscores” (it is recommend to use only letters and no spaces!) Now open the folder. You should now see something like Figure 4.
Figure 4: Inside the “OnlineHighscores” folder. Here you must create two PHP files: addscore.php and display.php.
In the upper orange frame you see the map I’ve just created. It should of course display the name you just have chosen. Now select in the lower orange frame the PHP tag from the middle button. Give the PHP file an useful name, I will use addscore. I strongly suggest that you do the same, otherwise you might get weird errors in case you forget later on to change the file name to whatever name you had chosen.
For non-Altervista users, please remark that we are using php files, so please add the extension [/B].php[/B] manually.
Now the file opens. Copy and paste the following PHP code into it. You may try to understand what’s happening, but it’s not necessary.
Code:
<?
// Connect to database
$db = new PDO('mysql:host=localhost;dbname=my_tutorialappsurd', 'tutorialappsurd');
// Check secret key, if correct, then insert name and score
$secret_key = "1234";
if($secret_key == $_POST['secret_key'])
{
// Prepare statement
$sql = "INSERT INTO OnlineHighscores VALUES (NULL, :name, :score)"; // Change OnlineHighscores to your game name
$stmt = $db->prepare($sql);
$stmt->bindParam(':name', $name, PDO::PARAM_STR);
$stmt->bindParam(':score', $score, PDO::PARAM_INT);
// Get name and score from URL string
$name = $_POST['name'];
$score = $_POST['score'];
// Execute statement
$stmt->execute();
echo '1';
}
else
{
echo '0';
}
?>
In this script, at first a connection is ensured with the database. This is done using a PDO prepared statement, and not using the regular mysql_* functions as in older versions of this tutorial. This is done because to prevent parameter injection as discussed in the first comments below the tutorial (see https://forum.yoyogames.com/index.php?threads/online-highscores.4291/#post-34322). Please do not forget to change your “db_name” to “my_” and thereafter your login name. And the last argument should also be your login name, which in my case is tutorial_appsurd.
For non-Altervista users, you have to insert an additional parameter after ‘tutorialappsurd’, namely your password. You should have something like this:
Code:
$db = new PDO('mysql:host=localhost;dbname=my_tutorialappsurd', 'tutorialappsurd','mypassword');
Then the secret key is compared to the secret key on the server. Do not forget to change this value into the string/value you just chose! If this is correct, then the statement of inserting a new score into the database is prepared. Thereafter both the name and the score are connected to the prepared statement, such that the values are actually put into the database. At last the whole process is executed, and a value of “1” is returned to GameMaker: Studio if the process was successful.
I almost forgot to say that you need to change the table name in line 10 (which in my case is OnlineHighscores) to whatever you have chosen as a table name (I recommended you to choose your game’s name). Now we are done! Save the file, so it returns to the screen you saw earlier in Figure 4. You should now see the file you just created.
The previous script was created for submitting a new score, and we’ll also need one for displaying the top 10 scores. This is slightly more difficult, and again, you may try to understand the script but it’s quite difficult, so it's no problem if you don't completely understand it. Create a new PHP script as before and call it display.php. Then copy the following code into it.
Code:
<?
// Connect to database
$db = new PDO('mysql:host=localhost;dbname=my_tutorialappsurd', 'tutorialappsurd');
// Check secret key, if correct, then get names and scores
$has_found = 0;
$secret_key = "1234";
if($secret_key == $_POST['secret_key'])
{
// Get all data from the table, ordering from best to worst
$sql = "SELECT * FROM OnlineHighscores ORDER BY score DESC";
$stmt = $db->prepare($sql);
$stmt->execute();
// Fetch the result into a nice format EXAMPLE: 1. Guest2837 100
// no_lines is the length of the list, generally you will want a top 10
$line = 1;
$no_lines = $_POST['no_lines'];
while($row = $stmt->fetch(PDO::FETCH_ASSOC))
{
// We only want a top no_lines
if($line <= $no_lines)
{
// Check if you are in the top no_lines
if($row['name'] == $_POST['name'])
{
$has_found = 1;
}
// Echo the top no_lines list
echo $line . ".-" . $row['name'] . "-" . $row['score'] . "|";
$line += 1;
}
else
{
// When you are not in the top no_lines list, search for your record
if($has_found == 0)
{
if($row['name'] == $_POST['name'])
{
$has_found = 1;
echo $line . ".-" . $row['name'] . "-" . $row['score'] . "|";
break;
}
$line += 1;
}
else
{
break;
}
}
}
// Send some empty lines if there are not enough scores
if($line <= $no_lines)
{
for($i = $line; $i<=$no_lines; $i++)
{
echo $i . ".--|";
}
}
}
?>
Just as in the previous script, at first a connection is made with the database. If you do not use Altervista, please add your password in the second line. After that, the secret key from the POST request is compared with the secret key on the server. If the two keys are the same, the statement for retrieving all scores is prepared. Now the tricky part starts.
Using a while loop, we are looping through all available scores, starting with the highest score. We always want to return a top-10, so the first if statement inside the loop guarantees that we at least get back 10 lines. However, when the player’s name is somewhere in the top 10, we don't have to search beyond the top 10, so the variable $has_found will be set to 1.
After the first ten loops, we want to check whether the player’s name has appeared in the top 10. If this was not the case, the program continues the loop to hopefully find a score of the player. After a score was found, the script also returns an eleventh row which contains the player’s highest rank and score.
Of course it’s possible that the database doesn’t contain 10 lines yet. The last if-statement ensures that the script always sends back 10 lines (such that it actually fills it up the highscore list with empty lines).
However, you still have to change the variables into the ones you use! First of all, change your secret key! Also change the database name and account name (which are both in one of the first lines) to the ones you have chosen! Finally change your table name in line 11 to the table name you have chosen, which is preferably the name of your game! Now save the script. You should now see the same as in Figure 4 before but now your two scripts are visible too.
Now it’s time to create a database. Go back to your Dashboard (see Figure 2) and click this time on the lower orange frame on “Access to PHPMyAdmin”. Now a new tab opens. In the left column, click “Add database”. Please make a distinction between a database (which Altervista allows you to have only one) and a table (which is inside a database, and you can have multiple of them).
It’s possible that the database my_tutorialappsurd is already there (or at least with your account name). If so, click my_tutorialappsurd. This database should be empty, so delete all tables (“drop”) if there are any. Finally your database should look like Figure 5.
In case you do not already have a database, create one in the left menu and call it my_tutorialappsurd in which the second part after “my_” should preferably be the name of your loginname. After that, open the database by clicking in the left menu on my_tutorialappsurd. There you find something like is shown in Figure 5.
Figure 5: The PHPMyAdmin environment. I have created a new table inside my database, which is called my_tutorialappsurd.
Now enter a suitable name for your table, such as OnlineHighscores (preferably the name of your game). We will need three columns, so set the number of columns to 3. Then press “Go”. You should now see the following screen, see Figure 6.
Figure 6: Adding a new table to your database. For the creation of online highscores, only three rows are required: id, name and score.
Go to the first row under “Name” and enter the word id. Leave the Type to INT. Fill at Length/Values the value 10 and check the checkmark in the one but last column called “A_I”. This ensures that each player in the list gets its own id and that scores will not be overwritten accidently.
Now continue on the second row and enter name under “Name” and choose VARCHAR as “Type” and fill in the value 100 in “Length/values”. This means that name is a string with a maximal length of 100 characters.
Lastly, enter in the third row under “Name” the word score. Again leave the “Type” to INT and enter the value 10 under “Length/values”. This means that score is a integer with a maximum value of 9,999,999,999. If you’ve done everything correctly, the scheme should look like the scheme in Figure 7.
Figure 7: After completing all steps, your table settings should look like this.
In the down right corner, press Save to save your table. We are done now in Altervista! In the next chapter, we will get back to GameMaker Studio where we will setup the code.
Chapter 3: Setting up GameMaker Studio
After we have finished with Altervista, the difficult part is already behind us. I have already put everything together in a sample project, which can be downloaded from the Marketplace. Anyway, I will just continue setting up GameMaker Studio in case you want to code everything yourself.
Now open up GameMaker Studio and go to the object where you want to send in the player’s score. Preferably do this in a Mouse Pressed/Released Event, this prevents you from sending the score multiple times! Now create a script called server_send_score and put in the following code.
GML:
/// @function server_send_score(name, score)
/// @param {str} name The name of the player
/// @param {real} score The achieved score
///
/// @description Sends the player’s score to the database in Altervista
/// @date 2024-02-09
/// @copyright Appsurd
function server_send_score(_name, _score)
{
// We need to encode the name so that it does not contain any forbidden characters
var name = url_encode(base64_encode(string(_name)));
// Perform the request to the server
var address = "http://ftp.tutorialappsurd.altervista.org/OnlineHighscores/addscore.php";
var args = "name="+name+"&score="+string(_score)+"&secret_key=1234";
return http_post_string(address, args);
}
This script uses GameGeisha’s url_encode, which you can find here. It simply makes sure that “weird” characters are still send to the server without giving errors.
GML:
/// @function url_encode(str)
/// @param {str} str The string to encode
///
/// @description Encode the string <str> in x-www-form-urlencoded format.
/// @date 2020-01-18
/// @copyright GameGeisha (original), Appsurd (GMS 2 edit)
function url_encode(_str)
{
var s, hex_digits, special_chars;
s = "";
hex_digits = "0123456789ABCDEF";
special_chars = "$&+,/:;=?@ " + "\"" + "'<>#%{}|\\^~[]`!";
//Main loop
var i, l, c, o, escapes, escape_bytes;
l = string_length(_str);
for (i=1; i<=l; i+=1) {
c = string_char_at(_str, i);
o = ord(c);
escapes = 0;
//Single-byte characters
if (o <= $7F) {
if (string_pos(c, special_chars) != 0) || (o < 32) {
escapes = 1;
escape_bytes[0] = o;
}
}
//2-byte characters
else if (o <= $7FF) {
escapes = 2;
escape_bytes[0] = (o>>6)+192;
escape_bytes[1] = (o&63)+128;
}
//3-byte characters
else if (o <= $FFFF) {
escapes = 3;
escape_bytes[0] = (o>>12)+224;
escape_bytes[1] = ((o>>6)&63)+128;
escape_bytes[2] = (o&63)+128;
}
//Too long
else {
show_error("Invalid character.", true);
}
//Dump in escape characters, if any
if (escapes == 0) {
s += c;
}
else {
var j;
for (j=0; j<escapes; j+=1) {
s += "%" + string_char_at(hex_digits, (escape_bytes[j]>>4)+1) + string_char_at(hex_digits, (escape_bytes[j]&15)+1);
}
}
}
//Done
return s;
}
Perhaps you are wondering why I’m using base64_encode and url_encode. Normally, the username could consist of letters, numbers but also other strange characters. Since the server doesn’t like all types of input (and actually considers some characters to be ‘built-in functions’ such as the “&” sign) so therefore the script url_encode is used. Furthermore I’m using base64_encode. Since I want to show the highscores and eventually split up the highscores into different parts, I do need a variable to split to (perhaps you may recall from the PHP scripts that I’m using “|” and “–“ to split to). However, to prevent strange errors from happening, I want to ensure that the string doesn’t contain any other “|” or “-“ than the ones I want to split onto. Using base64_encode ensures this. If you are planning to use Altervista/PHP/Mysql for future projects, base64_encode might not be necessary in your case since you probably don’t need to split the string from the server. However, for this tutorial to work properly, it is vital to use it!
If you are a more experienced programmer, you might want to extend this script such that it checks using os_is_network_connected if the player’s connected to the internet. If not, you would have to call the script again after a few seconds. Normally, this almost never happens so I therefore chose not to implement it.
After creating the send script, we will also need a get script. Create a new script called server_get_scoresand put the following code into it.
GML:
/// @function server_get_scores(name, no_lines)
/// @param {str} name The name of the player
/// @param {real} no_lines The number of scores you want to display (generally 10 is fine)
///
/// @description Get the highscore list from the database in Altervista
/// @date 2024-02-09
/// @copyright Appsurd
function server_get_scores(_name, _no_lines)
{
// We need to encode the name so that it does not contain any forbidden characters
var name = url_encode(base64_encode(string(_name)));
// Perform the request to the server
var address = "http://ftp.tutorialappsurd.altervista.org/OnlineHighscores/display.php"
var args = "name="+name+"&no_lines="+string(_no_lines)+"&secret_key=1234";
return http_post_string(address, args);
}
Now it’s time to create the highscores! For showing the actual highscores, it’s the easiest to create an object named obj_highscore. Enter the following codes into the right events in this object.
obj_highscore Create Event
GML:
/// @description Initialise loading the online highscores
player_name = "Guest4033";
get_highscores = server_get_scores(player_name, 10);
text1 = "Please wait for the highscores to load...";
text2 = "";
alarm[1] = room_speed;
Of course the player_name I chose isn’t something you want to use in your game. You probably stored the player’s name as global.name so just remove the “Guest4033” and replace it with global.name, then you’ll be fine.
obj_highscore Alarm 1 Event
GML:
/// @description When the scores haven’t loaded, try again once per second
if (text2 == "")
{
get_highscores = server_get_scores(player_name, 10);
text1 = "Please check your internet connection...";
alarm[1] = room_speed;
}
GML:
/// @description Receiving the result from Altervista
if (ds_map_find_value(async_load, "id") == get_highscores)
{
if (ds_map_find_value(async_load, "status") == 0)
{
text2 = string(ds_map_find_value(async_load, "result"));
show_debug_message(text2);
if (text2 == "IOException" or text2 == "")
{
text1 = "Please check your internet connection...";
text2 = "";
}
else
{
text1 = "Ready";
alarm[1] = -1;
}
}
}
GML:
/// @description Draw the highscores if available
draw_set_colour(c_black);
if (text1 == "Ready")
{
draw_text_highscore(room_width/2-110, 50, "", "Name", "Score", string(text2), player_name, c_green);
}
else
{
draw_text(room_width/2-110, 50, text1);
}
In the last Draw code, you may of course change the x,y coordinates or choose different header names above the highscores. If you prefer not to give the player’s score a different colour, simply replace the c_green (which implies that in my example the player’s name and score will be displayed in green) to c_black, or whatever colour you prefer.
In order to display the table with the online highscores correctly, we will use a script called draw_text_highscore. Just create a script and call it draw_text_highscore and put the following text into the text field.
GML:
/// @function draw_text_highscore(x, y, text1, text2, text3, highscores, name, colour)
/// @param {real} x draw x position
/// @param {real} y draw y position
/// @param {str} text1 the text to display above the index
/// @param {str} text2 the text to display above the name
/// @param {str} text3 the text to display above the score
/// @param {str} highscores the highscores
/// @param {str} name the name to colour
/// @param {colour} colour the colour to give to the name
///
/// @description Draws a highscore with the player’s name coloured in a special colour
/// @date 2021-08-26
/// @copyright Appsurd
function draw_text_highscore(_xx, _yy, _header_index, _header_name, _header_score, _highscores, _name, _colour)
{
// Adjustable Parameters, if you need, you can change these values
var max_la = 20; // minimum width of the number column (1. 2. etc.)
var max_lb = 100; // minimum width of the name column
var max_lc = 20; // minimum width of the score column
// Initialise the drawing by splitting up the text
var default_colour = draw_get_colour();
var no_lines = string_count("|", _highscores);
var str2 = string_split(_highscores, "|", true);
var str3,str3a,str3b,str3c;
str3[0] = string(_header_index)+".-"+string(_header_name)+"-"+string(_header_score);
for(var i=0; i<no_lines; i+=1)
{
str3[i+1] = str2[i];
}
// Splitting up the text into a part with the number (str3a), the name (str3b) and the score (str3c)
// The output from the database is given by (Nr.-Name-Score)
for(var i=0; i<no_lines+1; i+=1)
{
var str4 = string_split(str3[i], "-", false);
str3a[i] = str4[0];
str3b[i] = str4[1];
str3c[i] = str4[2];
// Decode the name so we can use it (but do not decode the header containing "name" since it's not encoded!)
if (i != 0)
{
str3b[i] = base64_decode(str3b[i]);
}
// Assure that if a player has a \n in his name, then escape
str3b[i] = string_replace_all(str3b[i], "\n", "\\n");
// Adjust the width such that the text doesn't overlap
max_la = max(string_width(str3a[i]), max_la);
max_lb = max(string_width(str3b[i]), max_lb);
max_lc = max(string_width(str3c[i]), max_lc);
}
str3a[0] = "";
// The actual drawing of the highscores
var height = 0;
for(var i=0; i<no_lines+1; i+=1)
{
// Colour the player's data
if (_name == str3b[i])
{
draw_set_colour(_colour);
}
else
{
draw_set_colour(default_colour);
}
// Draw the numbers (1. 2. etc)
draw_set_halign(fa_right);
draw_text(_xx+max_la+5, _yy+height, str3a[i]);
// Draw the name + score
draw_set_halign(fa_left);
draw_text(_xx+max_la+10, _yy+height, str3b[i]);
draw_text(_xx+max_la+10+max_lb+10, _yy+height, str3c[i]);
// Increment height
height += string_height(str3[i]);
}
}
To see the scripts in action, I created a project which contains all the scripts as well as a nice example with the OnlineHighscores database I used in the tutorial. You can import the final project into GameMaker Studio, by downloading the example in the Marketplace: https://marketplace.gamemaker.io/assets/4205/online-highscores-example Unfortunately, due to some users abusing the example in old versions of the tutorial, the example does not work; you have to insert your own Altervista name and password.
Of course this asset is completely free and it’s advisable to download it and import the scripts server_send_score, server_get_scores, draw_text_highscore, url_encode each time you create a new project! Perhaps you also want to import the complete obj_highscore, at least I consider that convenient since all code is already in there.
If you want a more elaborate highscore system, for example where every player gets a unique ID to assign a highscore to one player only, you can visit the Marketplace to find the Online Highscore Premium Version tutorial: https://marketplace.gamemaker.io/assets/8926/online-highscores-premium
Just in case you forgot, you can do with it whatever you want, it’s completely free! Please do not sell the scripts or the tutorials, but you may edit it for your own purposes! If you want to give credits, please give credits to Appsurd.
Conclusion
The tutorial is finished by now, I hope you have learned how you can create your own online highscore system using the free online database Altervista and how you can implement this in GameMaker Studio. If there are any questions or if you find anything unclear, please post your response in the comments below. Thanks for reading the tutorial and have fun with your online highscores!
Frequently Asked Questions
I want more features
- This tutorial is completely free and allows you to create a simple highscore system. For users who want to do more, you can go to the Marketplace to buy the Premium Version: https://marketplace.gamemaker.io/assets/8926/online-highscores-premium. With the premium version, I explain how to create a unique ID for each player and also how one can add more columns to the database. Please visit this link for more information.
HTML5 problems
- All scripts and code should work on all platforms, except HTML5. I am not completely aware what the real problem is, but it’s due to connection problems between the server where your game is hosted and the Altervista server. You might solve your problems by placing the following line in ALL your PHP files at line 2 (just after the <?php ):
Code:header('Access-Control-Allow-Origin: *');
Android problems
- Sometimes, the communication on Android does not work whereas the communication on other platforms works fine. This was pointed out to me by Bastosz. A possible solution is to replace all connections to http by https, which is specifically a problem on Android P and above.
Altervista problems
- Sometimes Altervista starts on the Italian version. If you simply login, the environment automatically switches back to English. If this doesn’t happen, Google probably has more good ideas on how to switch it back to English.
- While creating your Altervista account, do not use a VPN, otherwise the receiving and sending of data might not work as expected. This was pointed out to me by Andrei.
Script shortcomings
- The script is vulnerable for a replay attack, which is described in this commentary on the tutorial and I found the Wikipedia page about replay attacks also very helpful. FrostyCat, thanks for mentioning this. It appears to me that these kind of attacks are not really a problem for such simple highscore systems, and there is no simple method to prevent this. In the future, I might be improving this in the tutorial.
The GDPR
- Some users have asked me about the GDPR (General Data Protection Regulation), a European law protecting the privacy of all European people. The law mainly exists for the protection of personal, online data. Although I’m not an expert on the topic, I would like to give you some advice. Never save any personal data, like real names, email addresses, home addresses, bank accounts, etc. If you bind to that rule, the GDPR is probably not a problem for you and this highscore system can be used without any problems. Again, I'm not an expert on the topic so please consult official sources for further information.
Changelog
V1.0.0 (2016-08-10)
First English version of the tutorial was written.
V1.1.0 (2016-09-24)
- Improved server communication (POST instead of GET, PDO Prepared statements instead of normal mysql_* functions and added url_encode)
- Improved support for other characters (by using url_encode and base64_encode the support of symbols like # was added)
- Improved explanation about creating Altervista databases & tables
- Improved explanation about draw_text_highscore
- Fix: text improvements
- Fix: HTTP Event: changed the status >=0 to status == 0
- Fix: display.php didn’t always return the right string when the number of available scores was lower than the number of requested ones
FrostyCat, thanks for helping out on the server communication!
GameGeisha, thanks for the wonderful script url_encode!
V1.1.1 (2016-10-01)
- Fix: Figure 7 showed the wrong numbers
V1.1.2 (2017-02-08)
- Fix: multiple spelling errors
- Small adjustments to example project
V1.1.3 (2018-07-21)
- PHP send script: removed ‘’ around score
- Changes some variable names into more ‘clear’ ones
- Fixed typo’s
V1.1.4 (2018-09-17)
- Thanks to BTS, added remark about adding password for non-Altervista users upon login
V1.1.5 (2018-10-21)
- Thanks to johnny-o, fixed a variable name in the tutorial
V1.1.6 (2019-07-31)
- Thanks to Bastosz, added a known issue
V1.1.7 (2019-09-17)
- Thanks to HayManMarc, a clearification was added for non-Altervista users
V1.1.8 (2020-01-08)
- Thanks to a user, added a clearification about using a VPN while creating your Altervista account
V1.2.0 (2020-01-18)
- Updated to GMS 2
- Various text improvements
- Various changes to the sample project
V1.2.3 (2020-01-28)
- Renamed hash to secret key
- Fixed minor spelling issues
- Added a new paid tutorial: Online Highscores Premium Version
V1.2.4 (2020-03-04)
- Clarified the Android http issue
V1.2.5 (2021-08-28)
- Update to GMS 2.3+
V1.2.6 (2022-08-06)
- Minor change in description Altervista setup (thanks to Dune Veteran)
V1.2.7 (2023-07-26)
- Removed string_split as it is implemented native in GameMaker now
V1.2.8 (2024-02-09)
- Fixed string_split issues
- Rename scr_send_score to server_send_score
- Rename scr_get_scores to server_get_scores
- Miscellaneous improvements
First English version of the tutorial was written.
V1.1.0 (2016-09-24)
- Improved server communication (POST instead of GET, PDO Prepared statements instead of normal mysql_* functions and added url_encode)
- Improved support for other characters (by using url_encode and base64_encode the support of symbols like # was added)
- Improved explanation about creating Altervista databases & tables
- Improved explanation about draw_text_highscore
- Fix: text improvements
- Fix: HTTP Event: changed the status >=0 to status == 0
- Fix: display.php didn’t always return the right string when the number of available scores was lower than the number of requested ones
FrostyCat, thanks for helping out on the server communication!
GameGeisha, thanks for the wonderful script url_encode!
V1.1.1 (2016-10-01)
- Fix: Figure 7 showed the wrong numbers
V1.1.2 (2017-02-08)
- Fix: multiple spelling errors
- Small adjustments to example project
V1.1.3 (2018-07-21)
- PHP send script: removed ‘’ around score
- Changes some variable names into more ‘clear’ ones
- Fixed typo’s
V1.1.4 (2018-09-17)
- Thanks to BTS, added remark about adding password for non-Altervista users upon login
V1.1.5 (2018-10-21)
- Thanks to johnny-o, fixed a variable name in the tutorial
V1.1.6 (2019-07-31)
- Thanks to Bastosz, added a known issue
V1.1.7 (2019-09-17)
- Thanks to HayManMarc, a clearification was added for non-Altervista users
V1.1.8 (2020-01-08)
- Thanks to a user, added a clearification about using a VPN while creating your Altervista account
V1.2.0 (2020-01-18)
- Updated to GMS 2
- Various text improvements
- Various changes to the sample project
V1.2.3 (2020-01-28)
- Renamed hash to secret key
- Fixed minor spelling issues
- Added a new paid tutorial: Online Highscores Premium Version
V1.2.4 (2020-03-04)
- Clarified the Android http issue
V1.2.5 (2021-08-28)
- Update to GMS 2.3+
V1.2.6 (2022-08-06)
- Minor change in description Altervista setup (thanks to Dune Veteran)
V1.2.7 (2023-07-26)
- Removed string_split as it is implemented native in GameMaker now
V1.2.8 (2024-02-09)
- Fixed string_split issues
- Rename scr_send_score to server_send_score
- Rename scr_get_scores to server_get_scores
- Miscellaneous improvements
Last edited: