RejoinRoom Problems

Options
I was implementing reconnect to game functionality and saw this in RejoinRoom api documentation:

" Important: Instantiate() and use of RPCs is not yet supported. The ownership rules of PhotonViews prevent a seamless return to a game, if you use PhotonViews. "

Is this still the case? Is there any way to get around this? We're a long ways into building a MOBA and reconnecting to the game is critical.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Statigar,

    Thank you for choosing Photon!

    Technically, RejoinRoom works w/ PUN but it does not support 'rebuilding' the game state 100% as expected since RejoinRoom allows the rejoining client to receive (or re receive) cached events: Instantiate + buffered RPCs. However, once joined the client will receive the live events: Instantiate calls + RPCs targeted to its photonView/interest groups + photonView serialization messages.
    So the rejoining client may have issues because the client missed all non-cached events while not joined to the room: photonView serialization messages (e.g. position/rotation sync) + non-buffered RPC calls.

    This is ok for a quick rejoin (use shortcut ReconnectOrRejoin), since the client will recover from an unexpected disconnect.
  • Tobias
    Options
    The trouble with PUN is that it assumes someone has to be in control of any networked object. So when a player leaves, the control is going to the Master Client in the room. The units can move / be moved, destroyed and you can call RPCs on them while the "owner" is gone.
    Now, when the owner comes back, PUN does not have a clear strategy to return ownership and the latest state. This is where things are not as smooth as we like them to be.

    So far, our customers worked around this but rarely told us their solution or strategy. A lot of games support rejoin but we can only guess what was needed to make it work properly in the game's context.

    We don't have a generic solution in PUN now.