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

How to save a plot in a tycoon/simulator game?

Asked by 6 years ago
Edited 6 years ago

Hello, I am going to make a tycoon/simulator kind of game and I wonder if it is any good way to save it. I want it to save like in Lumber Tycoon 2. Can anyone help me because I don't understand this? Have a nice day?

0
I imagine you'd store a table of information(save file) and then read from that table MooMooThalahlah 421 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

To expand on ax_gold's suggestion, I would recommend saving a bunch of intvalues that each stand for a structure. If the intvalue = 1, then the player owns the structure and it'll load it. If it = 0 then the player doesn't own it, and the game won't load it. You can expand on this idea yourself by learning about datastores here: (http://wiki.roblox.com/index.php/Data_store)

0
I was thinking so too but that would be a good bunch of code? GroovyFhish 8 — 6y
0
Not necessarily, it might take up more space then some other methods, but it's easier and more practical to use and doesn't require as much scripting experience EnderGamer358 79 — 6y
0
I have custom placement so I would need to check values for every tile? GroovyFhish 8 — 6y
0
What exactly are you wanting to save for each tile? Size? Location? EnderGamer358 79 — 6y
View all comments (3 more)
0
If you're saving a bunch of different tiles, this would require at least a fair amount of code, there's no way around it. If you have more scripting experience I would recommend making one intvalue for each tile, and if the intvalue equaled (say, 17), then the game would read it as having a size like (5, 1, 16), and the other properties would be specific like that as well. EnderGamer358 79 — 6y
0
This would make it easier to use as the game would have a bunch of properties ready for that specific value EnderGamer358 79 — 6y
0
@EnderGamer358 we can use bool instead of int. Bool can only store two values (true or false) and can be preferred over int zeusplayz2005 5 — 4y
Ad
Log in to vote
0
Answered by
ax_gold 360 Moderation Voter
6 years ago

Data Stores are a good way to save data, and is probably the method used to save stats in games like Lumber Tycoon 2. Read the link for more info on Data Stores.

Answer this question