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

Would Data Stores Be Appropriate For Save/Loading?

Asked by 7 years ago

I am thinking of making a game that involves saving and loading a base. Would it be appropriate to use Data Stores to save that data or should I use something more efficient?

1 answer

Log in to vote
1
Answered by 7 years ago

Options include:

  • AssetService, which only works if each base is an entire place (probably only useful if the base you want to load/save takes up an entire place and you're willing to use the TeleportService to transport a player to it)
  • HttpService, which requires renting or buying your own server and configuring it to work with Roblox's requests to it
  • Data stores

(There is technically Data persistance, but this is deprecated and thus should not be used.)

You'll definitely want to use data stores if you can. You'll need to encode/decode whatever a "base" is made up of into something that you can store in a data store. ex, you cannot store a Part into a data store, but must first encode that into a simple value (string, boolean, integer, or table).

There is a huge amount of data that you can store in a single key of a data store. Data stores are perfect if each base is owned by only a single player (or even a few), but have limits on how many times they can be accessed universe-wide (200 requests per 10 seconds per key as of a 9 months ago) - this means that if want a single base to be opened/modified by hundreds of servers every 10 seconds, data stores aren't going to work.

More information in the Data store manual

Ad

Answer this question