Best practices for multi AND single player game

Hi! Does anyone have any best practices when it comes to making a game that has a multiplayer mode AND single player mode (single doesn't require server connect).

Is it best to connect to the Photon master server once at session start and never disconnect while player players single player and/or multiplayer mode? Or is it better to disconnect from Photon master server when player is using single player, then connect again when they choose multi?

Thanks!

Comments

  • You should not connect to the servers in singleplayer mode, as that would count as CCU.
    Go online when needed. It doesn't take very long.

    PUN has a "Offline Mode", which behaves a lot like being online but the callbacks are just called locally without a connection. You can connect and joinrandom in it, if that helps you drive your logic as if online.
  • Thanks so much @Tobias

    Just confirming that ConnectUsingSettings() counts as CCU (without joining a room).

    So you recommend:

    MULTIPLAYER
    - Player presses "Play Multiplayer"
    - Connect to Photon (join room/etc.)
    - Game starts
    - Player finishes game
    - Disconnect from Photon
    - Rinse/Repeat

    Thanks again for your time!