Karl Schreiner
Karl Schreiner

Reputation: 1

Submit score problem in LeaderboardsClient class

I intend to introduce a leaderboard in my turnbased dice game. When reviewing the Google Play Games API, I found that only the highest score was updated in the submitScoreImmediate(...) method:

Description in API: The score is ignored if it is worse (as defined by the leaderboard configuration) than a previously submitted score or the same player.

For many games, this implementation is sufficient. However, there are also games (in special competitions with 2 players / teams) where both an increase and a reduction of the score is required, e.g. chess (Elo rating) or a dice game.

Is there an optional solution to this problem? What other possibility of realization do I have?

Upvotes: 0

Views: 249

Answers (1)

retodaredevil
retodaredevil

Reputation: 1382

Because once you submit the score to a leaderboard, you cannot take away from it.

For your case, the best way would be to submit the score once you know the score cannot go down. This might happen at the end of the game, at the end of a level, etc. Depending on the game you can choose where the best place to submit the score would be.

If you wanted to, you could even have two separate leaderboards. One for "highest score ever" and a "highest score after finishing" so the "highest score ever" could be updated constantly and the "highest score after finishing" would be updated after finishing. This is just an idea and may be confusing for some players. In some games, this may be a cool addition, though.

It's also worth noting that there are also daily and weekly high scores. So even if a call to submitScore isn't the highest, it still may be used for daily or weekly.

Upvotes: 1

Related Questions