I am not 100% sure but you can try saving it as a JSONencoded table (which means it will be saved as a string) and then just decode it using HTTPService
Not more than 45 bytes per Part. Which is really low.
DataStoreService automatically encodes the data as a string and decodes it on retrieval. This wouldn’t change much, if anything at all
You’re not the first one saving a ton of data. Think about games like bloxburg and jailbreak. Jailbreak has like hundreds of cars and saves your customization for each one of them whether you own it or not. I’m sure it’ll be fine
The problem is that datastores will fill up no matter the bitsize, and 1 map is still under the 4gb maximum on each datastore
Really just unsure if making a seperate datastore for each map would be smart or not
Can’t you use an external datastore like Datastore2 pretty sure its better
45 max bytes per part + 1000 max parts would result 45000 maximum bytes, which is 45 KB. You really don’t believe this to be a low number? For comparison, the average floppy disk is 1.44 MB.
You could alternatively store one array with a sub table in it for each map and thus only have one datastore. It’s up to you
Making good points! Think i’ll resume to that, maybe also jsonencoding it?
Guessing that’d cost a service fee?
You have enough storage. I really don’t see why you’d encode it
You want to JSONEncode the string? The function is only for tables, which you wouldn’t use here.
Ahh, confused it with something else, soz!
Alright? I’ll look into that then!
Alr ill pair everything together!
- Datastore2
- Single string (“Part+22356+10416-11541+0+0+0400100200”)
Apprichiate the help guys!
wow…
OK so, to store this amount of data you would first have to:
- join together blocks and use reference int to make them individual again.
- Make a map saveable to 1 long string.
- encode that string using ATLEAST some sort of compression
- then save it in the datastore for the corresponding map
this is the best way to do it, if you want to make it more then 1k parts then this is a MUST.
Edit: ive tried more complex ways, this is the best and shortest way ive found.
Ah yes, you’d want to use a table to store all the strings, but not as a dictionary. A regular table works. Only use JSONEncoding if you want to compress said string
Aight, for sure trying this if i ever need to get it over, tysm!
Just use buffers
They will allow you to save more data, since most of your data is numbers.
(with about 1/3 bytes overhead)
Using compression becomes completely unnecessary, Roblox issues it’s own compression on buffers when they are used on DataStores or even when sent over the network.
Save over 2 datastores.
When saving lost of of data more storage may seem essential, and it is pretty much fine to use 2 datastores if you think you really really REALLY can’t scale the size down further. (sometimes even 3 but I wouldn’t recommend going that high)
Just please don’t over-use datastores, write a piece of code to find the best size for the data you are saving.