I’m currently doing game inspired by Lumber Tycoon 2
So I want that I players can save their base and load them
But I tried to remake that I used RemoteEvents for Loading in or Saving
Also Region3 for detecting what is at the base but I did not get the result I want to
If anyone can help comment down below, Thanks
You can serialize the whole base, more info (whoops sorry for wrong link! updated it) on that.
It’s worth it to check this too
Note that, for games that have the same type of objects being used again and again (e.g. a building game, where you just have 3 (or more) types of building parts, like brick, dirt and plastic) you can simply save a table containing table where the key is each object’s name, and that table will hold a long list of
Vector3
s that indicate where each block of that certain type is placed. And when unloading, loop through the table, and each time just:Clone()
the original object of the current type (assuming it’s stored inServerStorage
orReplicatedStorage
) and position it at the current position. This is better than having to save properties and extra info we don’t need. Of course this depends on the structure of your game, you might need to store additional info such as color maybe.
You don’t need to use remotes for an autosaving feature. Lumber tycoon 2 has a multi-purpose invisible brick around every base, to both get all items on and around the plot for autosaving, and to blacklist certain players and prevent them from entering your area.
If you have a part like this, you can use :GetTouchingParts() to find all of the objects located on the plot. Then get all of their positional and orientational values and store them in the datastore. ( This will require its own focus to store all of the data in a minimal way. )
Its a different story if you intend to add non-autosaving to the game. I don’t think I can provide good information on remote usage.