Best way to transition from a hosted match to a server-authoritative match?

I'm building a somewhat unusual setup and was wondering what the best way to go about it is. I'm starting in client-hosted mode for the lobby of the game. But then once all the players have joined and the game is ready to really start, I'd like to transfer the game (and authority) to a server.

One possibility I thought of is to have the server join match in "client" mode and then just transfer authority to it. But I'm wondering if there's a cleaner way using the "server" game mode?

Answers

  • Hi @WhaleFood ,


    The simplest way is to just create a new "NetworkRunner" and start the connection with your "Authority Server".

    You can even run the initial part of the game (lobby) using Fusion in Shared Mode (so no client-hosted needed) and then create and switch to a ClientServer mode, using a new Runner.


    One possibility I thought of is to have the server join match in "client" mode and then just transfer authority to it. But I'm wondering if there's a cleaner way using the "server" game mode?

    In ClientServer mode, no Client has authority over any NetworkObject, only a Server.

    So, you need to start a Server and let your players connect to it.


    --

    Ramon Melo

    Photon Fusion Team

  • How do I add this server to the game ?