GDevelop now has the ability to create flexible, free and unlimited leaderboards ready to be added to your game in a few clicks. What’s more, you can send the player’s score to it with a single action. There’s no need to set up a database, send a request to an external API or set up servers.
Leaderboards have been designed so that they work out of the box, allowing you to focus on developing your game.
There is also a new object called Text Input, which allows you to easily create an input area for players to type up a nickname.
To populate a leaderboard, you have to use an action which sends the nickname and corresponding score to the leaderboard in question.
The score is a numerical value of your choice. It can be the number of coins collected, a timer, a death counter or anything you want, as long as it is a number.
Names can be both a string and a numerical value, as people may have nicknames that include both. A new expression has been added to sanitize entries, and you can read more about it in the documentation.
A game can have multiple leaderboards as well, such as one for counting coins and another for a timer.
Currently, leaderboards have a predetermined appearance. However, soon you’ll have the possibility to customize the board to fit the look of your game.
To manage a leaderboard you have to open a project, then in the Game Dashboard, click on Leaderboards.
In this new leaderboard management panel, you will be able to name and configure your boards. The example above shows the configuration for a leaderboard named Best Score.
In this panel you also set up how the values are sorted. In our example, we have selected Higher is better. Another option could be Lower is better - useful for speedruns, for example.
You can configure more settings here, too: resetting the date, filtering and making a leaderboard public or private, and more. You can read more about settings in the documentation.
Like any social feature, leaderboards mean you may have to moderate or delete bad entries. An anti-cheat system is already being worked on.
Leaderboards can be used in any GDevelop game and on any website because the leaderboard is integrated in-game. However, implementation is much deeper on our game platform: there’s no need to play the game to see where you rank!
Enjoy making your game more social using Leaderboards!