question

Phil Woods avatar image
Phil Woods asked

Matchmaking for single player

Hi,

On the title I am working on we would like the option to start a server with a single player and then use matchmaking to bring in additional players.

We have tried 2 different ways to implement matchmaking from a single player server both of which have issues.

The first option we considered is using matchmaking with a match size minimum of 1. Then when the server starts the server could bring in additional players using backfill. The first option does not work as matchmaking does not support a match size of 1, why is there a restriction on the minimum match size?

The second option we considered is to start the server using RequestMultiplayerServer. Then when the server starts the additional players can be brought in using backfill. The second option does not work as the server call to GetMatch fails so we cannot call CreateServerBackfillTicket.

What is the recommended way to start matchmaking from a single player server?

Thanks,

Phil.

Matchmaking
2 comments
10 |1200

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

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Hi Phil,


We encountered the exact same problems in our game. Unfortunately, we've had to just use Legacy Matchmaking (which does support a match size of 1).

Feel free to update my Feature Request here:

https://community.playfab.com/idea/33285/matchmaking-minimum-size-of-1-player.html

0 Likes 0 ·
Phil Woods avatar image Phil Woods Brent Batas (Lisk) commented ·

Thanks, I've put my vote in on your feature request.

0 Likes 0 ·
Rick Chen avatar image
Rick Chen answered

Currently there is no such feature. Yes, you can vote for that feature request and help the PlayFab team to prioritize this feature.

For your second option, it is not necessary to call the GetMatch API. The game server could query that single user for attribute information (entity key), and the server detail can be obtained from GSDK. You could call CreateServerBackfillTicket API with these parameters (the QueueName is your match queue name).

2 comments
10 |1200

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

Phil Woods avatar image Phil Woods commented ·

Thanks for the information on backfill without the call the GetMatch API. We managed to get option 2 to work okay.

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) Phil Woods commented ·

Hi Phil - I'm running into the same issues that you did. Is there any chance we could connect sometime? It would be a huge help to me to see how you implemented your workaround. I'm Lisk#6617 in Discord or you can email me at lisk@autoattack.net

0 Likes 0 ·
jriehl avatar image
jriehl answered

Hi @Rick Chen, this is actually a big limitation, as our game workflow requires a single player to be able to start a server. Do you please know if that feature will be added before the legacy servers get decommissioned ?

5 comments
10 |1200

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

Rick Chen avatar image Rick Chen ♦ commented ·

What is your scenario that requires a single player to be able to start a server? If you want to implement a lobby system, we have the Lobby feature on deck, it will be a new feature that allows for temporary grouping of players to orchestrate multiplayer experiences, including searching for available lobbies to join. It includes member properties, and lobby and search properties to use for gameplay coordination.

Currently, there is a workaround mentioned in the original post of this thread, where you start the multiplayer server using RequestMultiplayerServer, then the multiplayer server can get the server detail from GSDK and query the initial player for attribute information. After that, you can call the CreateServerBackfillTicket API in your custom server with a matchmaking queue you defined.

0 Likes 0 ·
jriehl avatar image jriehl Rick Chen ♦ commented ·

The scenario that requires a single player to start a server ? Our racing game is used to run real-time, broadcasted, competitive races. For each race, we need a single player (Admin) to create the game session, enter the game, and get the race ready and setup before the other players can join it. This is how our game workflow works, and we cannot change this.

0 Likes 0 ·
jriehl avatar image jriehl Rick Chen ♦ commented ·

Hi @Rick Chen,I please have questions about this suggested workaround of using the CreateServerBackfillTicket API. When the first client creates the server by calling RequestMultiplayerServer, the server gets started and creates a backfill ticket using that initial player attribute. Once done, could that same, initial client immediately join the server using the standard matchmaking API, or could there be some conflict from having the server backfill ticket and that client matchmaking ticket issued from the same player ? After any client connect, should the server create new backfill tickets for the next clients, or the same backfill ticket can be used forever (we don't want any time limit) and for as many clients as we need (max 32) ? Is there any samples anywhere demonstrating how this workaround works ?

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ jriehl commented ·

>> Once done, could that same, initial client immediately join the server using the standard matchmaking API, or could there be some conflict from having the server backfill ticket and that client matchmaking ticket issued from the same player ?

The initial player that requested the server will be in the server and will obtain the server detail, there is no need to join the server with matchmaking API (and the players inside the server cannot be matched to the same server). If the player lost connection, they can just use the server detail obtained previously and connect again.

0 Likes 0 ·
Show more comments

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.