Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Should I use data stores for better gameplay?

Asked by 9 years ago

Basically what I'm attempting to do, is use data stores to save all the blocks of the game to it. the MAIN problem is the size it would be. I want a max of 4 chunks per dimensions, each chunk is roughly 64 x 64 x 256 studs, with bricks in the 2 x 2 x 2 range, but can be cut into smaller .1 x .1 x .1 pieces. So would using data stores be practical?

The second question depends all on the first question. If you said yes then this question is along with the first. I am trying to use a rendering system that gets the blocks within a certain area, maybe 1 chunk in a square (circle?), and checks to see if they need rendered. This is due to me needing to cut down the lag ALOT, as in studio it drops to 40 FPS from 1 chunk, for 4 chunks, it was roughly 12 FPS. I have a good computer made for gaming and it can't handle this well, nevertheless phones. So is any of this possible right now, or should I just try something else?

~ Legobuildermaster

0
I might be wrong, but I believe you can't save parts with data stores. You'd have to use data persistence instead, but that has a size limit. IcyArticunoX 355 — 9y

2 answers

Log in to vote
0
Answered by 9 years ago

Datastore would be practical. Even though Datastores CANNOT store instances. It can store strings. So you can encode the blocks into a string, then decode them for loading. I haven't done this myself but I have seen it done for saving worlds similar to what you are doing. If you need help understanding how to do encoding and saving blocks you can contact "DevPierce". He has done this before.

The string character limit is roughly 50k characters per key. So you can save multiple keys if 50k characters is not enough for saving all your instances.

Ad
Log in to vote
1
Answered by 9 years ago

What you need to know about Data Stores is you cannot store Parts in a Data Store. A direct quote here from the ROBLOX wiki shows this:

A data store is essentially a long list. Each entry in this list has two parts, a key and a value. The key is the name used to find an entry in the data store. Keys must be strings. The value is the information you want to store or access. Values can be numbers, booleans, strings, or Lua tables. However, values cannot be ROBLOX types like Vector3, Instance, or Part.

So the short answer is no, this would not be practical.

Answer this question