question

forthright avatar image
forthright asked

Turn based Matchmaking not working

Hey guys,

We haven't tested match making in about 3 weeks. We went to start a test today and we are unable to match players. We are getting returns that our players are joining the Lobby and that they are joining the room, but then no match making happens. Are we missing something?

Joined the Lobby
"rizzonian has Joined the lobby!
UnityEngine.MonoBehaviour:print(Object)
MatchmakingMaster:OnJoinedLobby() (at Assets/Scripts/MatchmakingMaster.cs:95)
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
NetworkingPeer:SendMonoMessage(PhotonNetworkingMessage, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2099)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1400)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:92)"

Joined the Room
"rizzonian has Joined the room!
UnityEngine.MonoBehaviour:print(Object)
MatchmakingMaster:OnJoinedRoom() (at Assets/Scripts/MatchmakingMaster.cs:109)
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
NetworkingPeer:SendMonoMessage(PhotonNetworkingMessage, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2099)
NetworkingPeer:OnEvent(EventData) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1900)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:92)"

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hamza Lazaar avatar image
Hamza Lazaar answered

Hi forthright,

The logs you are providing dont say much. It only show that "rizzonian" player joined a lobby then joined a room.

I'm assuming by "matchmaking" you mean RANDOM matchmaking. In this case you don't even need to join lobbies.
But if you want players to choose which room to join from a specific lobby then you should join that lobby, get the rooms list* and show it to the player so he/she could join one**.
If you want to have asynchronous matchmaking then you need to use webhooks to save room states once a room is closed (in CloudScript) and later get the saved games using webRPC (eg. GetGameList, also using CloudScript) without the need to join any lobby.

In order to have random matchmaking using Photon you need to do the following:
- Call JoinRandomRoom with a specific lobby and optionally a matchmaking filter***
- If a room is found, player will join it automatically
- If no match was found then PhotonBehaviour.OnPhotonCreateRoomFailed will be triggered, you should create a new room using same lobby, player will automatically join it and it will be available to other players for future calls of JoinRandomRoom**.

Rooms stay in the lobby as long as a player is inside it (connected and joined to that room). Rooms become "empty" when all players leave it. Empty rooms stay in the lobby for an additional time set in EmptyRoomTTL (current threshold is 1 minute). If you want a pseudo-asynchronous behaviour then use AsyncRandomLobby type and the room can stay in the lobby for random matchmaking for an additional hour.

I hope this answer could help you with your issue. If you still need help, please give us more details about what you are trying to accomplish and how are you doing it.

: list of rooms, rooms info included, still available in lobby: "ACTIVE"/"open" (in servers "memory") and visible.
*
: you can join only the rooms not full (#actors < MaxPlayers) and still open (IsOpen = true) and if it's a random join then the room should be visible too (IsVisible = true)
***: custom properties and maximum number of players can be used to filter rooms and if the lobby type is SqlLobby then an SQL expression string can be used as a filter too.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

This is really a question for the Exit Games team (since it's about Photon Cloud usage), but I'll drop them a note to let them know the question was entered in our forums.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.