question

laggyluk avatar image
laggyluk asked

Question about RequestMultiplayerServer

What I'm trying to do is have a 'lobby' server to which players are automatically connected after logging in. They can run around, manage their inventory and launch 'missions' with matchmaking from there.

If lobby server reaches player limit (32 for example) then new instance would be created for more players.

pretty much same setup as here:

https://community.playfab.com/questions/39878/two-questions-about-activating-dedicated-servers.html

Now, does RequestMultiplayerServer always create new server instance or it can be used to get existing server with free slots? Didn't encounter any mention of this detail so far.

If it's always new instance than what I'm trying to achieve can be done in some other way?

btw why matchmaker allows 2 players minimum? wouldn't 1 be enough to handle such case and people wanting to play solo?

game managerMatchmaking
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

>> does RequestMultiplayerServer always create new server instance or it can be used to get existing server with free slots?

The API will return the same instance if there is an existing instance, which is created according to the session ID, and it has nothing to do with "free slot". When the server instance is running, as long as players hold the IP, port of the server, anyone can connect to it, because it is the server side logic to determine if the connection is valid.

>> If lobby server reaches player limit (32 for example) then new instance would be created for more players.

I don’t think it is necessary for you to host additional “lobby” server as the scenario you have mentioned can be done without it.

  • There will be 2 parts of matchmaking. For the first part, you may create a queue with 8 for Min and 32 for Max.
  • 8 players will be matched soon, and like the common scenario, the queue is with server allocation enabled. Those 8 players will be received a matched ticket with IP, port of server instance.
  • They will connect to the server instance, while the game won’t start immediately. They are entering a lobby, where “They can run around, manage their inventory”.
  • According to your configuration of server codes, the server will continue the matchmaking process as the 2nd part of matchmaking, with CreateServerBackfillTicket API, until the number of players reach the Max (or until waiting time is up).
  • Give the last connected player some preparation time, then the game starts.

I have stated a Lobby feature, which is similar to PUBG and it doesn’t require additional hosted server. However, if your requirement will be more like casino, players are free to walk around ‘tables’, certainly a hosted lobby server will be required. Please feel free to let me know so that we can discuss more about it.

>> why matchmaker allows 2 players minimum?

Simply because there is no need for matchmaking when only 1 player is required. In this scenario, the player will directly ask the server to allocate an instance for him. The matchmaking feature is only for finding the players.

4 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.

laggyluk avatar image laggyluk commented ·

Thanks for the answer, unfortunately this lobby is like a 'casino' where players can 'run around, manage their inventory' and prepare for mission while seeing other people do the same. So yes, I do need additional type of server for this to work.

For starters each player can be put on random 'lobby' server, in future I'd like to give them ability to form a party and put them in same lobby (or rather migrate them from one lobby to another if they join a party).

From this lobby they would either solo join matchmaking or with their party and launch the 'mission' server. Once mission is over they would be sent back to lobby server, doesn't have to be the same lobby instance.

0 Likes 0 ·
laggyluk avatar image laggyluk laggyluk commented ·

one more thing: all players in the lobby are not meant be be sent on same mission, it's more like a common space for players to meet between missions. If they are not in a party then each of them can select on which type of mission he wants to join with matchmaking and others stay in the lobby doing their thing.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ laggyluk commented ·

In that case, you may host an external agent server, where a mapping database is also maintained.

The agent server will be used to allocate players with server instances ID. I assume you are still using PlayFab Multiplayer server 2.0.

  • Players connect to your agent server and the agent server should have a secure authentication system. Using PlayFab session ticket/session token should be a feasible workaround.
  • Agent server will find the latest server instance with empty slots available, otherwise, will require for a new one, then sending instance IP/ports to the player. Because it is customized and long time running agent server, you may add more functions like allocation based on region, but you may need to make sure the connection is safe. Because it is an external server that PlayFab won't support, we cannot provide any suggestion as we are not expert on it.
  • The agent server should be able to receive data from server instance so that when slots are released, instance is terminated, the agent server will get updated.

You may find more information and help from host-server related community.

0 Likes 0 ·
laggyluk avatar image laggyluk Seth Du ♦ commented ·

I rather not, server browser where player can pick one manually is also acceptable :P

1 Like 1 ·

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.