Lobby related issue
Options
Hi,
How can i make different lobbies using photon?(each lobby can contain 4 rooms).
Please suggest.
How can i make different lobbies using photon?(each lobby can contain 4 rooms).
Please suggest.
0
Comments
-
Hi @Yogesh_Dev,
you can join different lobbies by usingPhotonNetwork.JoinLobby(TypedLobby typedLobby);
. The typedLobby object needs to have a name and type, which you can set after creating it by usingTypedLobby lobby = new TypedLobby();
.0 -
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,
Hamza0 -
Hi,
I have created a lobby "mylobby". how to other client check the room list in this lobby.0 -
Like photon.getRoomList gives room list of default lobby, how can i check roomlist in a lobby0
-
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 callbackOnReceivedRoomListUpdate
and inside it get the list usingPhotonNetwork.GetRoomList()
.0 -
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?
0 -
Hi @Yogesh_Dev,
If you do not want to join that lobby.
You can implementOnLobbyStatisticsUpdate
and inside it get lobby stats usingPhotonNetwork.LobbyStatistics
.0 -
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?0 -
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.0 -
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.I prefer you show some efforts and share with us what you have tried then we can help you.
if lobby filled, create another lobby with same situation.
0 -
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.0 -
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.0 -
0
-
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.0 -
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?.
0 -
0
-
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.
0 -
Hi,
Please resolve this.0 -
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 callPhotonNetwork.Reconnect()
To Reconnect and Rejoin callPhotonNetwork.ReconnectAndRejoin()
To detect disconnection implementOnConnectionFail(DisconnectCause cause)
.0