What is the maximum value an entry in a leaderboard using the Google Play Services can have?
-
\$\begingroup\$ Is there a particular reason you need to know this? A specific higher-level problem you are trying to solve, for example? \$\endgroup\$– user1430Aug 22, 2014 at 23:09
-
\$\begingroup\$ Well I have a game where you have over 5000 different object, each of which you can have a whole lot (I store how many in a UInt64.) I wanted to make a leaderboard for who has the most in total, across all 5000. Perhaps I'll make the leaderboard in millions, then I should have more than enough range, even if I can "only" store 64bits xD \$\endgroup\$– The OddlerAug 23, 2014 at 8:33
1 Answer
The leaderboard documentation doesn't explicitly say (as of this writing).
However if you look at the documentation for the C++ API's Score
object, you can see that the value of the score is exposed as a uint64_t
, which means you have 64 bits of storage for your scores (as integers, times, or currencies).
As an integer this value is 18,446,744,073,709,551,615.
Note that you can also set explicit upper and lower limits on scores allowed on the leaderboard via the API.
-
\$\begingroup\$ Yes I found something similar, but in the Unity API. Though I wasn't sure if it was a limitation of the API, or one of the Google Play Services itself. \$\endgroup\$ Aug 23, 2014 at 8:31