GML Highscore Table

Hi! I'm an absolute noob at GML, so please make your answers simple or well explained. I finished the Space Rocks tutorial, and am trying to add on to the game with my own twists, such as multiplayer and a highscore table. Does anyone know how to make a highscore table, that will save after the game is closed?
 

obscene

Member
It's not a very simple thing. There are a few parts to it you should learn individually....

First is how to hold the data. Basically you need a way to hold a bunch of score values and be able to sort them. This is called a data structure and the simplest type is a ds_list which is a simple, one-dimensional list which could hold scores, but no names, initials etc. You should start with the list and then if you want to add other fields you can graduate up to a ds_grid.

Here's a video on ds_lists

Specifically, you'll need to learn to 1) create a list, 2) add a new score to it, 3) sort it in descending order and then 4) read the list in your draw event.


Second, you'll need to learn how to read/write INI files which is how you will save the score when you close your game and load it when you start your game. Once you get the basics of that, you'll be using ds_list_read and ds_list_write to save your list into an INI file, which is actually the easiest part.

Here's a video on INI files

Good luck and feel free to ask more if you get lost.
 
It's not a very simple thing. There are a few parts to it you should learn individually....

First is how to hold the data. Basically you need a way to hold a bunch of score values and be able to sort them. This is called a data structure and the simplest type is a ds_list which is a simple, one-dimensional list which could hold scores, but no names, initials etc. You should start with the list and then if you want to add other fields you can graduate up to a ds_grid.

Here's a video on ds_lists

Specifically, you'll need to learn to 1) create a list, 2) add a new score to it, 3) sort it in descending order and then 4) read the list in your draw event.


Second, you'll need to learn how to read/write INI files which is how you will save the score when you close your game and load it when you start your game. Once you get the basics of that, you'll be using ds_list_read and ds_list_write to save your list into an INI file, which is actually the easiest part.

Here's a video on INI files

Good luck and feel free to ask more if you get lost.

Thanks a lot! I just saw your response, and am trying it now! But the video is on Game maker 1, or an older version. Is that pretty much the same to GML 2?
 
Top