- Home /
UNET save server (world) progress
Hello, for a networked survival game i want to save the built elements. When the server disconnected and connected again, all objects should be placed again (otherwise the player starts again and again from zero).
That's how I'm doing it now:
When creating a world, the server creates a local storage file that gets filled with the built objects. When a player connects, a network message sends the current save file and loads the world for the client. If the server disconnected and connected again it reads the built objects from the save file and spawns them over the server again.
Is this one way you'd say it's okay?
Thank you
Answer by WinterboltGames · Jun 06, 2018 at 10:14 AM
I suggest you save them on the server's device and load them once when the server starts and from my experience using other networking solutions out there, Once an object is instantiated on the server it spawns on server. Correct me if I'm wrong.
Hi, that's exactly how i'm doing it right now. However the server is running locally (host) or on a dedicated server → when the server starts a world all saved objects are getting instantiated by the server.
What other networking solutions do you mean? And what should I use them for? $$anonymous$$y solution is actually working pretty good. Needed to create some structs because vectors and quaternion are not serializable (no saving) but I don't think that this is a big problem.
Greets :)