It seems like a pretty useful, and obvious method that should already have been thought of being implemented with the push of ordered data stores(also i don’t think it’d take an intern more than a few hours to implement either). Practical uses for such would be displaying individual ranks without the use of external databases.
This would be very useful, it should come as a feature and stop developers having to max out requests searching pages
As a Roblox developer, it is currently too hard/extremely inefficient to find the position of a certain key in an OrderedDataStore. Right now, you would need to use a for loop to go through every single key top to bottom until you reach the desired key, and then use the loop’s index variable for the position.
Something like :GetPositionAsync() would be extremely useful for stuff like say a global rank display, that tells the player what rank they are without being near the top.
Support, however maybe to lessen DataStore requests, it would be better if we had a GetAsync function that returned the value and the position, e.g:
local Value, Position = OrderedDataStore:GetAsync(Key)
Many developers still need this feature; we have to resort to third party services for this. Here is an explanation of the current limitations: OrderedDataStore get ranking? - #5 by Corecii
The importance of knowing where you are on the board is incredibly important for player retention and feelings of progress.
As a developer, getting the rank of a key is a core feature and expected functionality of OrderedDataStore.
This is essential for the experience I am building in which global leaderboards are a key part of the experience. I implore Roblox adds this functionality as soon as possible.
Given that DataStores are getting updated and changed frequently now (and especially with the Addition of MemoryStore,) I decided it would be okay to revive this topic instead of just hearting a comment.
As a Roblox Developer, I find that this feature is very useful, and would help improve my experience a lot as it gives other players an understanding of where they stand.
We have not gotten a response related to this feature, it would be neat if an implementation like VitalWinter’s was added.
This is long overdue, many games outside of Roblox utilize this.
I’d like to see a response/update to this, as this is very difficult to implement currently.
Working on a module for this as it’d be useful to my needs as well, releasing in a couple of hours.
I’ve been working on a Datastore system for in-game analytics tracking and came across various methods as to retrieving a position or page of an entry containing data. Sorry for the revival, but if one doesn’t do it, another must.
Edit: My version can be found here
just what i needed. thanks, also epic revive…
This is so crucial. It would simplify our job and reduce amount of requests being made to roblox’s servers since we’d only need one. Since clearly many people are already implementing some sort of loop to try and find a certain user’s rank, I can’t imagine large scale server health with all this load.
Not to mention that the for loop has to be made in a linear scaling algorithm. Binary search or other better searching algorithms can’t be used as we can only iterate through 1 page at a time. It would also be nice for OrderedDataStores have basic paging information that things like Spring Boot for java has. So, whenever you made a request you knew what page you were in, how many pages there are and be able to request one of those pages at any given moment.
Again, I don’t know how Roblox implemented the OrderedDataStores, but this shouldn’t be difficult
Vouch for this being a feature. It would save a load of development time and definitely make competitive games better. Tracking a player’s position in the ranking system is a crucial feature for player engagement, and right now the only way it’s possible at large and reliable scale, is externally.
bumbity, bumpy.
devs be getting jumpy
Surprised this doesn’t already exist. Would be incredibly useful for me!
bump, this would be a very strong feature for a lot of games, some big use cases for developers could be rewarding players based on their rank in a global leaderboard, anyone below roughly 1000th rank would be almost impossible to get now without eating up your entire GetSortedAsync budget trying to go one (100 entry) page at a time
if possible for efficiency to be able to query multiple keys in batches, for example getting all players ranks within the server in one get call
It is still surprising that this hasn’t been implemented 9 years on. It would be super useful for a lot of competitive games and there isn’t an effective way to do this currently
Just spent a couple hours working on a feature that allows the player to see their position. I didn’t even think about wether or not OrderedDataStores would support looking up the rank of a single entry since it seems like such a trivial feature.
Just learned a lesson…
Of course, as is the usual case with features like this there’s already a feature request that’s nearly a decade old. Anyways, here’s my bump.
Surprised to see this doesn’t exist. Definitely an L for OrderedDataStores. Will bookmark this and check back every now and then to see if there’s any official response.