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

How do you efficiently store data about a game?

Asked by 5 years ago
Edited 5 years ago

What is the best way to go about storing a bunch of data about a game?

Let's say that I wanted to make a RPG game with a bunch of quests and weapons, armor, tools (you get me) and I wanted to make sure it all saves and loads properly.

Would you just use JSON and decode and encode the string or just have a complex table like:



local data = { armor = { gold = false; leather = true; diamond = false; }, stats = { level = 20; xp = 1332; strength = 2938; } };

And how would you update the table value easily without having to copy and paste the table and set each value to the previous value from UpdateAsync (gold = prev.armor.gold)

0
for that last part, couldn't you just do datastore:SetAsync() ? or am i just really misunderstanding the question ihatecars100 502 — 5y

Answer this question