I’m working on a Time Trial obby, where players can complete different obby stages, and have their personal bests recorded. I also want to have a leaderboard for each stage (top 25 records). But I’m not 100% sure what the best way to get/store the data for those leaderboards would be.
I’ve been using OrderedDataStores (one store for each stage), and everything works fine. But it uses one datastore per stage. I plan on the game to have at 25-100 stages. I assume 100 datastores for the stages probably won’t work. The docs on datastores say to create fewer datastores, but it doesn’t explicitly say if there’s a limit on how many you can create.
I’m a pretty experienced scripter, but datastores are definitely not my forte. Would using OrderedDatastores (aka what I currently have) work fine? If not, what would be a good alternate solution? From what I can get from documentation, using a normal datastore with ListKeysAsync()
seems like it could potentially work, but I’m not exactly eager to implement a totally new system if the one I already have doesn’t need to be changed (ListKeysAsync()
also has the PageSize
param, so honestly I don’t see a reason why this wouldn’t work - Edit: except that it really only returns the keys and not the actual values from what I can see…).
Would it just be better to have a datastore where players can get their personal bests from. And another datastore to store the top 25 times?
Overall, my current system works fine, but I’m not sure it’s optimized or easily expandable (mainly the 100+ ordered datastores part…), and I’d really like some outside opinions. Any thoughts? (thanks in advance :D)
(This is my first forum post in…ever? If I need to change anything about this post, or if something is unclear, let me know and I’ll try and get to it right away.)