Although there are examples of timed autosave (for example, every 30 seconds for the player), I ask:
- Is it really necessary to do a timed autosave?
- Would it be safe to save all data just in BindToClose?
Although there are examples of timed autosave (for example, every 30 seconds for the player), I ask:
Timed autosave is fairly simple to make and cuts down on unreliability (so I dont see why not)
If the server crashes, if a client crashes (depending on how you set it up), those could all be major issues and they could use hours of progress
I think an autosave is a pretty nice and easy solution to a fairly big problem
Thanks, I know it’s easy.
If the client crashes, I don’t see any problems, because all players’ data is in the server’s RAM.
My question is if Roblox Servers are trusted to the point that many developers save everything just in BindToClose?
Do you know of any real cases of data lost due to Roblox server failure?
I save using BindToClose, PlayerRemoving, and UpdateAsync
auto save should only be used if you need to use it, saving at the end is better because of the limits
You can if you want, the one I use in my games saves every tick, meaning no loss, and it also doesn’t lag yhe client or the server.
I don’t believe this is possible since you can’t save before 6 seconds between saves.
you shouldn’t even do that anyways unless you only have one person in the server(the 6 seconds thing)
Well what I mean is it instantly saves, there no delay whatsoever.
I’ve just tried it, I added a mini time counter to test what you meant, I instantly joined and gave myself 100 coins then left, then did that twice and it added up, I don’t get what you mean by 6 seconds here.
@rogeriodec_games so I don’t know where you are getting this from, also I tried it with 2 other people in the server, worked fine.
Well thing is I use “GetPropertyChangedSignal” for mine and use a while loop to get data and stuff, so I think it ignores it because I use secondary values too.
another reason auto saving is bad is because if multiple people are in the game you have more of a chance of hitting the limit
saving at the end is smart
I have 3 games, in 2 I use player added and player removed, in only one I use this system. I would prefer not using timed but I’m only bringing it up for this forum, I can give an example of what I mean when I do get on my pc.
I remember now that DataStore2 already does this, that is, it keeps all data in a cache (RAM) and only saves them at the end.
To answer your questions:
Players.PlayerRemoving
to fire. I would suggest using it.