I had no clue these were even functional nowadays, I haven’t seen anyone mention them since 2014. Are there any games that use DP and have a player base?
I never used Data Persistence, but about a week ago I was curious to learn about it. I experimented with player:SaveInstance() and was so surprised to actually see it could save entire models.
I have a slight suspicion that someone at Roblox saw me using it last week and made the decision to remove it.
It would be nice if instead of completely deprecating these functions, it would automatically make a DataStore call instead, because I actually do have an old game that uses lots of data persistence calls. The only trouble is that these calls are in scripts that I have copied and pasted over and over again, and converting to data stores isn’t exactly trivial because of caching.
If this doesn’t happen, people’s games just won’t save which tbh isn’t the worst thing in the world for my game, but it would be nice if there were still a failsafe.
@jmkd3v
Roblox has already responded on this, and said that there are many reasons they won’t be doing this. For one, it is inefficient, as it is unlikely that you will need all of the properties to be saved. Also, Roblox said that in the backend, it would be impossible and not something they would be interested in doing, as long as they use JSON storage (which I doubt is being changed)
Most people don’t have the need to save entire instances and rather save the properties that need to be saved. However, if this is really neccisary, you can use something like InstanceDataStore . I already did a source code check and is optimized to not save properties that are default to save storage space, making the 4 million byte limit not too much of a worry.
Perhaps instead of doing this, it could make a “fake” request, where instead of writing and reading from Roblox’s datastores, it would simply cache it in the server’s memory. This would however mean that data would not save cross play-session, but it will at least stop games from completely breaking and stop functioning.
Basically it would save the data on the server rather than on a backend data server, which defeats the purpose of data saving, but is a better alternative to removing all functionality of it since it will allow old games to still work. Also, the fact it doesn’t save cross-session discourages the use of the function, which is what Roblox is trying to accomplish here.
I mainly just want to know what Roblox’s stance is on this. I at least think there should be a way to generate rbxm
binaries and load rbxm
binaries from lua code separate from the file system, because, that’d open up more use cases and would allow for people to easily save and load instances from data stores, plus the performance benefits, plus the storage benefits.
It’s good that a library exists for this. I still think it shouldn’t be up to the user to use hacky solutions and external APIs though, and, the ability to load scripts is still not there, which, wouldn’t benefit me but would be incredibly useful.
In my game it would actually be significantly more performant to be able to load instances in-engine, I’d be saving/loading the entire map in the game which contains hundreds of thousands of instances. That could hit the 4 million byte limit in datastores in no time even with this optimization, and, I just can’t afford creating that many instances and then setting that many properties, the performance cost is too great.
I could avoid my size issue by storing the instances by a reference to their model type and if I really want to preserve small changes I can preserve those too. That’s what I’d likely end up doing, but, again, that severely limits me due to performance, based on some benchmarks I did it’d take upwards of 30 seconds of straight CPU time with minimal yields before execution time errors to load a medium sized map for me. That would cause disconnects if I don’t space out that usage enough, meaning in reality it might be closer to 40 or longer, which, is an incredibly long time for users to wait for a server to start up.
The thing with compression is properties that are default would really only have to occur one time when saved in a really really big list of instances so the amount of data that could be saved with something like LZ4 is still massive not to mention the fact that I’d be saving on any repeat properties and things. Considering most of the stuff I’m saving is made up of lots of the same instances just with small differences having access to Roblox’s binary format for instances would result in tiny file sizes relatively speaking.
This is definitely getting into feature request territory since my use case here doesn’t exist with Player:SaveInstance()
but its still worthy to note that this is the last native feature that can do this afaik.
Aww, it was fun while it lasted. I’ve personally never used datapersistence, but some people have, and I feel like this just adds to the general variety roblox offers. Personally, I prefer a LOT of APIs even if some of them aren’t as shiny new as they used to be instead of just a few APIs that work and are kept maintained. In my opinion, it’s quantity over quality.
Can it save instances too(Without you serializing them)? If yes, that will be a time saver!
Does any new game even use the legacy Data Persistance system?
Reading through these comments are making me feel old for knowing what Data Persistence is, and when it was used while many haven’t even heard of it lol.
RIP the games I grinded 10 years ago.
Any particular reasons for removing them alltogether? To save data/money?
Won’t bother me much with my development, but sure, some memories and data will be gone from some old games.
I will be honest, I didn’t even know those existed. I haven’t seen anyone use nor talk about those. Although I’m sure not many games will break.
I thought for a while now that they returned at most what the code would expect to be returned, and saving was disabled already, too?
I had a game use it (very long time ago) and it didn’t save data nor load it at all. I wonder though, in my use case it’d be amazing to have the ability to export said data before it was deleted if we are the place owner, or at least have that option to do so? In my specific case, a friend gave me his game to actively maintain and the data from his place in theory due to this would still exist. I have ported it over to datastores however, so no worries there. Although, the DP APIs do not save nor load data as mentioned before already, at least to my knowledge.
I hope the various improvements to Datastore mentioned here will improve data consistency and performance!
It doesn’t actually save in LZ4 format. It still saves in the oldschool rbxmx format that it was initially implemented with
It’s good to see that Roblox is slowly retiring old, unused services. Can’t wait for the next generation, DataStore v1.1
:SaveInstance()
doesn’t save in the LZ4 format? That’s interesting. It makes sense, its been deprecated for a longgg time so it probably never got upgraded to the new format.
I still think there should be a better way to interact with the rbxm
format, I’m going to create a feature request.
You can use these functions to serialise and deserialise Color3
function c3tostring(color3)
return {R = Color3.R, G = Color3.G, B = Color3.B}
end
function stringtoc3(str)
return Color3.new(str.R, str.G, str.B)
end
I’ve just been responding to a ticket regarding right to erasure, and just wondered, what do we do if one of our old games used Data Persistence to save data, and then a user requests erasure after data persistence tools are removed?
@dragonknightflies
- Is Data Persistence and Data stores saved separately?
- How do we go about deleting user data once these APIs are gone?
- Would we potentially suffer repercussions from not being able to do anything about said data?
Roblox will automatically delete the data from Data Persistence so you don’t have to worry.
I think it might be a way of discouraging further use of the function, and possibly to clear up back end stuff.
Don’t get your hopes up. In my opinion, there are too many reasons and problems that come with adding instance support to make it not worth adding.
This would be your only real bet.
They answered this in the post.