Lobby related issue

Hi,

How can i make different lobbies using photon?(each lobby can contain 4 rooms).
Please suggest.

Comments

  • Hi @Yogesh_Dev,

    you can join different lobbies by using PhotonNetwork.JoinLobby(TypedLobby typedLobby);. The typedLobby object needs to have a name and type, which you can set after creating it by using TypedLobby lobby = new TypedLobby();.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Yogesh_Dev,

    Proposal:

    A client joined to a lobby can know how many rooms are inside a lobby.
    If the number is 4 do not create any new room if not then create a new one.

    Regards,
    Hamza
  • Hi,

    I have created a lobby "mylobby". how to other client check the room list in this lobby.
  • Like photon.getRoomList gives room list of default lobby, how can i check roomlist in a lobby
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Yogesh_Dev,

    You always get the list of rooms in the current lobby you're joined to.
    If you join "mylobby" you get list of rooms inside "mylobby".

    how to other client check the room list in this lobby.
    implement callback OnReceivedRoomListUpdate and inside it get the list using PhotonNetwork.GetRoomList().
  • Hi @JohnTube

    A client joined to a lobby can know how many rooms are inside a lobby.
    If the number is 4 do not create any new room if not then create a new one.

    How can i let a client know that all the 4 rooms in a particular lobby is filled to create a new lobby. Should i have to join that lobby?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Yogesh_Dev,

    If you do not want to join that lobby.
    You can implement OnLobbyStatisticsUpdate and inside it get lobby stats using PhotonNetwork.LobbyStatistics.
  • Hi,

    I have another question i have made the rooms according to user ranks in the game.
    Is there any way to find the lists of rooms of a particular rank?
  • Hi @JohnTube ,

    Could i get the example how to proceed for 1 lobby each having 4 rooms each room having 2 players.
    if lobby filled, create another lobby with same situation.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Yogesh_Dev,

    Is there any way to find the lists of rooms of a particular rank?
    In SQL lobby use the rank as one room property C0..C9 and make SQL query using GetCustomRoomList. See here.

    Could i get the example how to proceed for 1 lobby each having 4 rooms each room having 2 players.
    if lobby filled, create another lobby with same situation.
    I prefer you show some efforts and share with us what you have tried then we can help you.
  • Hi @JohnTube,

    Thank you for your replying.
    I have few questions.
    1. if i create a lobby , and there are 4 rooms , is each room has their own masterclient or there is only one masterclient who created the lobby?.
    2. onreceivedroomupdate is not called once is joined the room.?
    3. how to make looby invisible once 8 players enter in the lobby.
    4. how to track that 8 players have enter in lobby(4 rooms) including me.
  • JohnTube
    JohnTube ✭✭✭✭✭
    1. MasterClient exists only inside a single room.
    2. Yes, it works only when joined to a lobby, outside of rooms.
    3. You can't make lobbies invisible. You can make rooms invisible.
    4. You need to count the number of players inside all rooms using rooms list and add the number of players joined to that lobby.

    I think it's better if you use a room as a lobby.
    Some customers already made matchmaking using this method.
  • Hi @JohnTube ,

    Could you please elaborate how to use a room as lobby?
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited July 2018
    Hi @Yogesh_Dev,

    Matchmaking is done in steps:
    First, you join rooms of MaxPlayers 8 (2*4) which serve as a lobby.
    Once the room is full optionally close it IsOpen = false or hide it IsVisible = false.
    Then do the matchmaking logic in there using room and actor properties or events to obtain 4 room names with 2 players for each room.
    Every couple of players leave the first room and go to the new room. Preferably use JoinOrCreate with MaxPlayers 2 and IsVisible = false ExpectedUsers set to the UserIDs of the two players.
  • Hi @JohnTube ,

    Could you please tell me how to setting custom properties for two parameters (rank and gameType).
    How to get rooms based on these above two parameters?.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Yogesh_Dev,

    Follow examples on our "Matchmaking Guide".
  • Hi @JohnTube ,

    In my game when two players are joined and playing a turnbased game.
    I got this error sometimes due to which my gameplay stuck.
    Error "Cannot send messages when not connected. Either connect to Photon OR use offline mode!"

    Please resolve this issue as my gameplay got stuck and nothing happen after that.
  • Hi,

    Please resolve this.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Yogesh_Dev,

    When you have a new different issue or question start a new discussion.
    As the error message explains you need to be connected to Photon.
    It seems your connection was lost and you got disconnected.
    Reconnect again and if needed rejoin the room.
    To Reconnect call PhotonNetwork.Reconnect()
    To Reconnect and Rejoin call PhotonNetwork.ReconnectAndRejoin()
    To detect disconnection implement OnConnectionFail(DisconnectCause cause).