Turn based Abandoning Rooms

Options
I have a big problem in my game World Of Pirate Ships for android devices. It runs on PUN v1.65. Although my game is typically real time 10 player death-match I choose to use turn based subscription because it never goes above 70-80 msg/s.
I believe the problem is when inactive player become masterClient. I don't know how is that possible. When player enter the room, master should send RPC with some information about the map. But it never arrives because master is inactive. I implemented following code:
void OnApplicationQuit()
{
PhotonNetwork.Disconnect();
}
void OnApplicationPause()
{
PhotonNetwork.Disconnect();
}
I tested that with my phones and it works. Is it possible that this never be called on some devices. How long it takes for photon server to realize that player is inactive and disconnect it. Is there any way to set some options to speed up.
I was riding Turn based feature overview: "players can "abandon" a game explicitly. To do so, use the leave operation with the fitting parameter value." I couldn't find any option for abandoning room. Also I couldn't found option for "room time to live" (room TTL)"
Does anyone knows what I'm doing wrong and how to fix this issue.
I have update the game with temporary solution: When I join the room, if I don't get RPC from master in 5 seconds, I'm becoming the master. It works but as soon as I leave the room, one of inactive players becomes a master again because it has lowest ID.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited February 2016
    Options
    Hi @Freeman,

    PUN does not include TurnBased features yet (PlayerTTL, OpLeave, etc.) and is intended for RealTime apps only for the moment.

    Currently, there is no "rejoin" or "inactive" actors in PUN.

    I recommend you try with a RealTime App first and check if the issue is not somewhere else in your code.