Creating a leaderboard
To show how to deal with this scenario, we’re going to take the leaderboard definition from the Doing More With Leaderboards page. From this definition, we’re going to see how to add metadata to every row added to the leaderboard.Adding metadata to each row
We want to know if the player has any unauthorized hardware that affects gameplay or any other malicious software that could enhance the player’s performance. The anti-cheat system is capable of getting all of this information, but because there’s an enormous number of players, we’re going to focus on flag-checking high scores plus metadata from external components. To perform this action, we’re going to use the UpdateLeaderboard API. Here we can check the SDK example:Metadata parameter within the LeaderboardEntryUpdate to add information is meaningful for a developer. In this case, we use it to store anti-cheat data. With this example, we’re now equipped to track all relevant information from our top players, enabling game moderators
to make better decisions on who to ban.
Conclusions
In this tutorial, we learned how to do the following operations:- Create a multi-column leaderboard.
- Add metadata to each row of the leaderboard.
