Saturday, October 19, 2024
Here's a pretty hot take—i'm leaving Roblox DataStores behind. There's a few reasons behind this, so I'm hoping you'll hear me out. It's 2024, times have changed, and Roblox hasn't.
I've spent a lot of time working on DataStores for various games. Some of which require leaderboards, some where they require a proper schema full of information and values. Most developers will be fine with this, as they're keeping their data within their games and not considering using it outside of that. Unfortunately, for the developers who want to use any of this data outside of Roblox, it WAS a struggle before the implementation of their new Open Cloud API, but it's still not enough. Developers who make games usually have the skills required to understand how data works. Majority of the users I know who develop on Roblox have used, experimented or been exposed to the use of external databases for their own projects—BUT there's still extreme amounts of flaws with the Roblox DataStore service, so I'll split this up to make it easier.
Extreme seperation
The separation of OrderedDataStores and DataStores feels absolutely useless. Some features like ordered pages of data is limited to OrderedDataStores which can only hold 1 single value. I experimented with a leaderboard system in one of my projects and found the translation between DataStores and OrderedDataStores to be insanely trash. I should not have to have 2 separate DataStores just because I want a list of one of them. The potential for miss-matched data/values is insane, and considering this isn't possible on a regular DataStores values makes hardly any sense.
Yes—all of this is done on Robloxs' backend, and the large amount of data they're carrying somewhat justifies the unnecessary separation, but is one of my exact reasons as to why I'm no longer using DataStores.
An example of a OrderedDataStore
And of course, a regular DataStore can be whatever you need
And yet, only Ordered can be sorted, whereas regular cannot.
So what's my point? A custom backend can do this for you. If you genuinely have the knowledge and time, It would be worth it.
DataStores is fragile and inaccessible
This might be debatable, but I've had my fare share of experiences. External databases allow for the perfect backup/save/protect system incase something goes wrong. DataStores has nothing. Absolutely nothing to prevent anything like this from happening.
Studio lacks any sort of native DataStore access, which means your data is unable to be viewed, modified, deleted or added unless you use a Third-party plugin created by someone else. Considering that this data should be backed up in additional locations rather than Roblox, this makes it extremely hard to do. Some of the DataStore plugins do allow for data exporting and importing such as DataStore Editor V3 (shameless plug for something I have no involvement in, genuinely a cool plugin.) But relying on another individual developer to provide these tools above Roblox themselves is unfortunately a let down.
NOTE, this plugin is now $10. Roblox removed Robux payments, so you have to fork out literal money to have this feature which should already be built in. No shade to the developer, you absolutely deserve compensation for bringing this control to
"It's expensive!1!!1" No.
After storing thousands and thousands of LONG field messages, I still do not have any costs in regards to data. I have *roughly 7-8 projects storing data on the same account (MongoDB), and i'm nowhere near the limit. All users automatically have 512 MB of free storage, which is more than you think. Remember, i'm already storing thousands of messages in large schemas, and yet, I've only used 2 MB.
AND if you believe this would become an issue, and I'm not suggesting any sketchy stuff, but there's a few ways you can get around these types of things.
Sure, skill is required
Let’s face it, the average developer isn't doing this. This is for the nerdy requirements of external use for anything else a developer might need for their game/service/product etc. Not everyone will know how to set this kind of thing up, and I wouldn't blame them, it's not a straight forward process.
BUT—if you know what you're doing, and educated well enough where the switch can be made, I highly recommend it. Fortunately the benefits are unmatched to the negatives.
The understanding of your chosen provider, such as MongoDB, alongside a VPS (personally I use a set-scaled VPS, but can also be 100% ‘serverless’ if you’re after something that automatically scales). BUT even then, the only thing you’ll really be scaling for is your bandwidth, and yet I don’t meet anywhere near 2% of the usage I’m provided every month. You can host your own instance of MongoDB if you’re after your own storage system, but even then, that could be a bit extreme for a Roblox game, to which I won’t recommend. Even additional services like Firebase have worked perfectly for smaller instances where data needed to be easily accessed and modified. Do I recommend Firebase? No. But at least you can visually see your data..
APIs my baby
This is pretty self explanatory. There's so much you can do with data if you're knowledgeable on applying your own API endpoints. Connecting the data on various platforms, using backend middleware to create content, etc etc, it's extremely exciting with the amount of things you can achieve when you're in full control of your platform.
Conclusion?
I don't like DataStores. I learnt it, because I had to, and everyone should learn it no matter what. Though for advancing developers who are skilled enough to deter from it (and can realistically scale to support the data without any necessary costs, like already having a VPS etc), I fortunately or unfortunately recommend it. Considering Roblox has added new ways to protect sensitive information within your game (which I believe is currently broken not surprised), the switch is becoming more and more realistic with each passing day.