suspendedPlayerLiveTime doenst work

Hi guys,

we are developing a game with photon realtime and we are not able to determine if a client has a connection issue. we have tried to set the suspendedPlayerLiveTime to 500ms (for example) but the suspend event is fired after about 5 seconds. We have tried to set the timeout by setter or options table (createRoom).

do you have an advice?

thanks!

Hi,

in the past few days we have been thinking about our problem. Maybe we have misunderstood the function off the suspendedPlayerLiveTime property. We thought it is the time a player have to response (in any way), otherwise the player leaves the room and onActorSuspend-event is fired.

Our newer approach is that suspendedPlayerLiveTime is the time between a suspendRoom()-call and onActorSuspend()-event. 

If our last approach is right:

How does the loadBalancingCllient know if a player has no network connection or the players phone has crashed so he can’t fire a leaveRoom()-event to room mates?! We need to handle this scenario…

Thanks

krns

Hi,

suspendedPlayerLiveTime and suspendRoom() used in ‘turnbased’ Photon API. Player can suspend turnbased room (intentionally or due to connection lost) and if he returns in time less than suspendedPlayerLiveTime, he can join with previous actorId and continue game as if he did not leave. onActorSuspend fired immediately as client calls suspendRoom() or after few seconds by server which have not received pings from client during that time and considers client disconnected. 

Note: leaveRoom() called by client tells server that client will never join again.

Thanks for your reply.

We know now that the suspend-functionality doesn’t fit our use case.

We need to know if a actor in our room has lost his connection accidentally (handy crash e.g.). so we are not able to call leaveRoom() bevor he leaves… If this scenario occurs photon sends an onActorLeave event 10 Seconds after the connection loss. Does photon provide any other timeout functionality that would help us to determine this event quicker?

krns

Disconnect detection timeout is not customizable. It’s quite high to avoid false disconnect detects. 

You still may try to detect if client is offline quicker with custom ping events broadcasting by every client each several seconds. Not receiving event from other client in given time frame means disconnection. 

Thanks, we’ll try your approach.

Hi,

in the past few days we have been thinking about our problem. Maybe we have misunderstood the function off the suspendedPlayerLiveTime property. We thought it is the time a player have to response (in any way), otherwise the player leaves the room and onActorSuspend-event is fired.

Our newer approach is that suspendedPlayerLiveTime is the time between a suspendRoom()-call and onActorSuspend()-event. 

If our last approach is right:

How does the loadBalancingCllient know if a player has no network connection or the players phone has crashed so he can’t fire a leaveRoom()-event to room mates?! We need to handle this scenario…

Thanks

krns

Hi,

suspendedPlayerLiveTime and suspendRoom() used in ‘turnbased’ Photon API. Player can suspend turnbased room (intentionally or due to connection lost) and if he returns in time less than suspendedPlayerLiveTime, he can join with previous actorId and continue game as if he did not leave. onActorSuspend fired immediately as client calls suspendRoom() or after few seconds by server which have not received pings from client during that time and considers client disconnected. 

Note: leaveRoom() called by client tells server that client will never join again.

Thanks for your reply.

We know now that the suspend-functionality doesn’t fit our use case.

We need to know if a actor in our room has lost his connection accidentally (handy crash e.g.). so we are not able to call leaveRoom() bevor he leaves… If this scenario occurs photon sends an onActorLeave event 10 Seconds after the connection loss. Does photon provide any other timeout functionality that would help us to determine this event quicker?

krns

Disconnect detection timeout is not customizable. It’s quite high to avoid false disconnect detects. 

You still may try to detect if client is offline quicker with custom ping events broadcasting by every client each several seconds. Not receiving event from other client in given time frame means disconnection. 

Thanks, we’ll try your approach.