If a player disconnects and reconnects, will he lose the RPC calls?

Hey, I am making a multiplayer card game. I am passing the cards that are played using RPC calls. So my question is, when a player plays a card and sends the card to everyone else. Some player gets disconnected at that exact moment. Will he get the card later or not? If not, Is there any other way to do it ?

Comments

  • emotitron
    emotitron ✭✭✭
    Typical way of dealing with late joiners or rejoiners is to have all clients send send a full state update for objects they control to joining players.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Brijesh,

    Thank you for choosing Photon!

    Did you try Buffered RPCs?
    Of course, there are other things to consider for disconnects & rejoins: RoomOptions.PlayerTtl, RoomOptions.CleanupCacheOnLeave, PhotonNetwork.ReconnectAndRejoin(), etc.
  • About Buffered RPCs...will it not create a stack of RPCs? If I buffer each turn. Is there a way to delete the stack of RPCs after a hand in my game is over (i.e. all four players have played their turn).
  • Also one thing if I use disconnects and rejoins, master Client changes and that changes everything in my game. I don't want the master client to be changed. I want the player joined first to be the master client throughout the game.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Brijesh,
    Is there a way to delete the stack of RPCs after a hand in my game is over
    Yes it's possible although it's not available out of the box.
    Also one thing if I use disconnects and rejoins, master Client changes and that changes everything in my game. I don't want the master client to be changed. I want the player joined first to be the master client throughout the game.
    This is by design. A master client cannot be inactive, it needs to be joined to the room so if master client disconnects or leaves someone else takes its place if any.
    If you don't like this behaviour you could:
    - make everyone leave the room when master leaves
    - when/if initial room creator comes back, make him master client again
  • Thanks.
    I tried making the room creator master client again and everything worked perfectly fine.
  • Since 2 days we are experiencing an issue that every game play gets terminated due to players disconnection.
    We are using 20 CCU pack. To analyse the issue, we checked our CCU and MAU as well. But total registered players are only 219, total games played are only 1015 and CCU as shown on Photon dashboard is 8 max.
    Please suggest if this is the case of CCU burst (which is not monitored by data stats) or some technical issue.