question

Zak Stevens avatar image
Zak Stevens asked

Matchmaking for 2 players

Hello!

Can you help me, please!)

I create chess with multiplayer. And I have problem with matchmaking.

The problem appears when second player pressing cancel button after 6 seconds of waiting(cancel button finishing matchmaking search)

After that first player go to match with second player but second player remain in menu.

How I understand, that they got tickets, their status was matched, and got matchId and they went into game.

My question is how can I delete player from queue or maybe have solution for if player tap in last moment "cancel" he stayed in menu, and second player continue to find match. And for second player status remained "Waiting for match".

10 |1200

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

1 Answer

·
Seth Du avatar image
Seth Du answered

May I ask are you using any hosted multiplayer server for the game? If the matchmaking ticket state is matched (or canceled), it means the matchmaking process is finished, there is no other way to interfere a finished ticket. While if your game is implemented with multiplayer server and a player has connected to a server instance, this player doesn’t need to quit to the menu, instead, the server build should keep monitoring the number of connected players. When there are less than 2 for a specific time, the server can call CreateServerBackfillTicket API to match other players.

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.