How to reflect latest data after rejoin the game ?
Options
Hello there, sorry for my English.
This is my first game in unity and photon.
I'm making Ludo turn based game. In this game if one player's internet is disconnected for 10 seconds and other player plays his turn and move his pawn. Now when 1st player's internet connection is reconnected he don't know that 2nd player played his chance when his internet was disconnected. How to sync pawn on both side.
I have successfully rejoined room after disconnection of 1st player. But game states are not sync.
I'm using Photon and playfab.
Thanks.
This is my first game in unity and photon.
I'm making Ludo turn based game. In this game if one player's internet is disconnected for 10 seconds and other player plays his turn and move his pawn. Now when 1st player's internet connection is reconnected he don't know that 2nd player played his chance when his internet was disconnected. How to sync pawn on both side.
I have successfully rejoined room after disconnection of 1st player. But game states are not sync.
I'm using Photon and playfab.
Thanks.
0
Comments
-
Hi @nilesh123shripal,
Thank you for choosing Photon!
You could use cached events or room/actor properties.0 -
Hi @nilesh123shripal,
Thank you for choosing Photon!
You could use cached events or room/actor properties.
Hello there thank you for your support. I cached event successfully. But if a player gets reconnected old events are fired again. How to remove those old events which are executed properly during proper internet connection.
I don't want him to receive the old events which are already executed
0 -
Hi @nilesh123shripal,
You can clear one or more cached events using RaiseEvent also.byte eventCodeFilter = 0; // change this to event code you want to remove, otherwise it considers all event codes, 0 is wildcard object eventContentFilter = null; // if you use Hashtable as payload, change this to partial Hashtable subset of key/values to filter which events to remove from cache if you use the same structure per event code int[] senderActorNumbersFilter = null; // change this to the actor numbers of the players who cached events you want to remove RaiseEventOptions raiseEventOptions = new RaiseEventOptions {CachingOption = EventCaching.RemoveFromRoomCache, TargetActors = senderActorNumbersFilter}; PhotonNetwork.RaiseEvent(eventCodeFilter, eventContentFilter, raiseEventOptions, SendOptions.SendReliable);
0 -
Hi @nilesh123shripal,
You can clear one or more cached events using RaiseEvent also.byte eventCodeFilter = 0; // change this to event code you want to remove, otherwise it considers all event codes, 0 is wildcard object eventContentFilter = null; // if you use Hashtable as payload, change this to partial Hashtable subset of key/values to filter which events to remove from cache if you use the same structure per event code int[] senderActorNumbersFilter = null; // change this to the actor numbers of the players who cached events you want to remove RaiseEventOptions raiseEventOptions = new RaiseEventOptions {CachingOption = EventCaching.RemoveFromRoomCache, TargetActors = senderActorNumbersFilter}; PhotonNetwork.RaiseEvent(eventCodeFilter, eventContentFilter, raiseEventOptions, SendOptions.SendReliable);
Thanks John my problem solved by using your comments.0