Master client disconnection

Ok, just to double check. In Bolt, if the player that started the server loses the internet connection, the application is paused (Android) or the application hangs/crashes, another client will become the master client, yet, everybody connected to the room will be disconnected? So in conclusion, there is no way to prevent disconnection from everybody and give the server title to another client?

Comments

  • Hello @Hagen ,

    Photon Bolt does not offer host migration out of the box.

    When using Photon Bolt Free, you need to maintain a connection with Photon Cloud. If the peer loses connection with the internet, and by consequence with the Photon Cloud, the peer will shutdown itself.
    There is no hang or crash, you will receive the BoltShutdownBegin callback and work from there.

    From the Client perspective, it will timeout the connection with the remote Game Server and shutdown itself, as there is will be no packets flowing from the server.

    Bolt relies on the information stored on the Game Server, as it's the central point of communication between the players and also the owner of the real game state. If it shutdown, you lose that information.

    One way to accomplish a host migration process would synchronize the important parts of the game state to a secondary client, that will store the latest state in case the server goes down.
    If the main server goes down, the secondary client will start a new session with the same ID and wait for other players to reconnect, update the world state with the latest snapshot and continue from there, repeating the process with another secondary client.

    As the game state is very specific for each game, we don't offer an implementation of such an approach.

    In summary, if the server goes down, yes, all clients will be disconnected and shutdown.
    This does not mean that the game is really terminated, as you can continue it using another server using a custom implementation.

    --
    Ramon Melo
    Photon Bolt Team
  • Ok, thanks, I was hoping for a short cut, but as you mentioned I do need to reconnect all the players and restart from a known state.