Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to save a persistent world in the server?

Discussion in 'Multiplayer' started by deadlycrow, Feb 6, 2015.

  1. deadlycrow

    deadlycrow

    Joined:
    Feb 10, 2014
    Posts:
    159
    hey! im experimenting in the network side of unity(with unity built-in network) and i have managed to mount a "game" pretty much in the way of minecraft, by now i have players connected to the server(me), they can hit each other players, see their animations etc... but i dont have a clue on how to save the world? i mean, if anybody builds a house, cut some trees,etc how to shut down the server, re-open it and VOILA! the trees are still gone and the house is in place? maybe should i make a serialization file?(me being the server) or should i do a mySql database with tables(id, position, rotation, health,etc) ? i cant decide what it is the best way to do it :/
     
  2. JamesPro

    JamesPro

    Joined:
    Mar 5, 2012
    Posts:
    509
    If you will be hosting the Server I would say go with a MySQL Database. If your doing more of a Lobby based game where the players will host their own Servers and then connect to a Lobby to select a Server to play on then you would want something for a Flat File Storage System. If the Players are expected to host the Server then the less steps required to get it running the better.
     
  3. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,796
    Look at Azure Mobile Services. You can create your own database in the cloud and generate the design for it in Visual Studio.