I already have a global leaderboard displaying the top 100 players, but I’m wondering whether it is possible in roblox to display a player’s position (only to the player) out of all the players that’ve previously joined the game? I feel like it is kind of understand what I mean, so take an example:
I am the 550th player to ever join my game, I play it and reach position #250, when I look at the leaderboards, I see #250 / #550 displayed, along with the top 100 players leaderboard.
If this is possible within roblox, may I get some guidance, on what I need to use to achieve this, maybe some tutorial or similar topic on the developer forum? Thanks in advance.
This can be a bit tricky with our current DataStore tools. Keeping track of the number of unique players is easy: just increment a number in your data store if that player hasn’t played before. But getting your player’s position in that list means you have to have an ordered list of all players and their points or whatever. This can be done with OrderedDataStores.
However, we currently can’t query the OrderedDataStore. We can only get a paginated list in either ascending or descending order. This means you would have to traverse all the pages until you find the correct player, and then you could determine their # ranking. This is inefficient. Worst-case scenario is you have to traverse literally all players in the game’s history to find the ranking.
It would be nice if we had better querying tools against OrderedDataStores.