Recently I had to work with Leaderboards and scores for our new game QuickAZ. So while I was developing and testing the game, my scores were registered to Leaderboards, which was a good thing :D.
RESET THE SCORE BEFORE PUBLISHING
But, before publishing the game, I wanted to reset my score. In this phase is pretty easy to reset the score. You have to open your Google Play Developer Console – Go to Game Services – Select Leaderboards – Select Your Leaderboard – click the button labeled “Delete” at the bottom of the page.
RESET THE SCORE AFTER PUBLISHING
Well, in this phase, the reset is not so straightforward. After I published my game, I started fixing a few bugs and I did something that altered my score, so I needed to delete it from Leaderboards. I spent a lot of time searching on the internet how to do that and in the end I found this solution that I hope will help you guys to save some time.
1. Tools needed
- Google Play Developer Console (site where you publish your apps)
- Google Developer Console (do not confuse with the first one)
- OAuth 2.0 Playground
2. Link your app
You have to have your app linked to OAuth 2.0 Playground. In order to do that you just have to make sure that you have your email in the TEST list in the Game Services from Developer Console and after that, follow the steps from this tutorial.
3. Reset score request
Now that you have your app linked, and learned from the previous tutorial how to use playground, you just have to get your Leaderboard id from Google Play Developer Console and add the following request in the OAuth 2.0 Playground page:
The above example will reset all scores for the leaderboard with the given ID for the currently authenticated player. For more types of reset requests visit https://developers.google.com/games/services/management/api/scores
After you send the request you can open your leaderboards from your app and you will notice that your score has disappeared.
I hope this tutorial will help you!