Cannot join rooms after 2 minutes

MEDLJosh
MEDLJosh
edited September 2016 in DotNet
I have been working with the "Turn-Based" part of Photon Realtime. I went through the persistence guide and set up my room properties to persist the room. Everything is working great, but I discovered a small bug and I cannot seem to fix it. Players can only join a room for about 1.5-2 minutes after it was created. Users can join and leave the game fine, but after that amount of time the room seems to disappear and people cannot join it. So, the initial player is stuck in a room with 1 person in it without the ability for others to randomly join. Does anyone know why this is happening?

Here are my room properties:
TypedLobby asyncLobby = new TypedLobby("asyncLobby", LobbyType.AsyncRandomLobby);
this.OpCreateRoom(Utils.MakeRoomID(), new RoomOptions() {

CustomRoomPropertiesForLobby = new string[] { PropTurn, PropNames, PropRoomState,
	PropFBIds, PropNudgeCount, PropLastTurnStartTime},
	MaxPlayers = 5,
	CustomRoomProperties = CreateRoomPropsTable(true),
	IsVisible = true,
	PlayerTtl = -1,
	CheckUserOnJoin = true,
	EmptyRoomTtl = 5000}, asyncLobby);

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @MEDLJosh,

    Are you saving and loading the room state using webhooks?
  • hi,

    is there any reason why you picked AsynchRandomLobby? it mentions in the doc:

    "This lobby does not send lists of games. It is only used for OpJoinRandomRoom. It keeps rooms available for a while when there are only inactive users left."

    so indeed it seems to indicate rooms can get cleaned up. Can you try with the default lobby type? Else not joining any lobby could be an option too and stay on the masterServer.

    Bye,

    Jean
  • JohnTube said:

    Hi @MEDLJosh,

    Are you saving and loading the room state using webhooks?

    Yes, we are using webhooks to save and load the rooms.
  • jeanfabre said:

    hi,

    is there any reason why you picked AsynchRandomLobby? it mentions in the doc:

    "This lobby does not send lists of games. It is only used for OpJoinRandomRoom. It keeps rooms available for a while when there are only inactive users left."

    so indeed it seems to indicate rooms can get cleaned up. Can you try with the default lobby type? Else not joining any lobby could be an option too and stay on the masterServer.

    Bye,

    Jean

    Hello Jean,

    To my knowledge AsynchRandomLobby is necessary to create asynchronous matchmaking. The matchmaking guide says:
    "This type of lobby should be combined with webhooks or any other mean of persisting room states in order to get asynchronous (re)join fully working."
  • Hi,

    Yes, I'll take a close look at this early next week.

    Bye,

    Jean
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited September 2016
    Hi again @MEDLJosh,

    I will ask few questions here just to make sure you are doing asynchronous matchmaking/join properly:

    - Do you use webhooks 1.2? If not then please do so.
    - If you use webhooks 1.2, please enable "AsyncJoin" and of course "IsPersistent" should be set to true as well. So you have to save room state in GameClose (Type:"Save") webhook and load it in GameCreate (Type:"Load") webhook. You may try to return empty state (State:{}) in the latter.