[Sandbox-Game] Save Scene Map after game end

Options
Hello Everyone,

I want to create an Multiplayer Survival & Sandbox Game with PUN.
In the game, all players will can build some House with some GameObjects.

But i have an question, if all players leave the game (the master too), all the Houses will not saved ? Because it's Peer to Peer and i don't have an "Server" where i can save this datas.

How can i do that ?

Thanks in advance :)

Comments

  • Hi @Zusoy,

    after each client left it, the room will be removed from the server's cache as well. Means that every data, that belongs to that certain game, gets removed.

    To persist player or game data, you can use Webhooks.
  • Zusoy
    Options
    Hi,

    Thanks you for your answer.

    Okay, so i create an extern REST app and setup webhooks url in it and i can saved data at room end ? nice :)

    Thanks for your response

    And i have another question, if i create an "bot" for the master client. I mean, for exemple i let the master client turn 24/7, and all client join the master. So the master is the "Server" and rooms will never be removed ?

    It is possible ?

    Thanks in advance (sorry for my english) ^^
  • You can keep rooms alive for a certain amount of time, even if they are empty. However, it is not recommended to keep rooms alive forever.

    You should not 'waste' the MasterClient's role with a bot doing nothing for the game, because you might have other important tasks for the MasterClient in your game.
  • Zusoy
    Options
    Okay i understand :) so i'll use webhooks for that :)

    thanks you so much ^^