Can you setup multiplayer lobby service then have it start a dedicated server?

I spun up the matchmaking service which is working great. But now I also want to add in lobbies. Can I use the Lobby Service as an add on as an additional way to get users together to start a dedicated server instead of relying on matchmaking?

Hi @Bruendermiester , have you found any solution for this use case?

Hi @Bruendermiester and @Mj-Kkaya ,

You can have a look at our Multiplayer Services SDK. It introduces the concept of session (a Lobby behind the scenes) and allows you to set it up easily so that players can join through both matchmaking and join code and even use Relay as an addon. Here how you use it: Matchmaking into a session.

Please note:

  • Both standalone SDKs (Matchmaker, Multiplay, …) and the Multiplayer SDK cannot coexist in the same project. Please remove the conflicting standalone SDK when installing the Multiplayer SDK.
  • This SDK uses the standalone SDKs behind the scenes (Matchmaker, Lobby, Relay, Multiplay Hosting, …). In fact, you can continue using them (without the sessions), even within the Multiplayer SDK ( Migrating from the standalone SDKs to the Multiplayer SDK)
  • The Multiplayer SDK takes care of all the wiring between them for you, including starting the connection (the NetworkManager Start calls if you use Netcode for Game Object).
  • If you use the Matchmaker backfill feature, please note it is automatically updated when a player joins the session even without using the matchmaking (through join code for example).
1 Like

Thanks for your answer @ArthurAtUnity.
I will definitely dive into the Multiplayer SDK, but is there a plan to migrate all other SDKs to the Multiplayer SDK?
Should I use the Multiplayer SDK even if I’m only using Relay and NFG?

Hi @Mj-Kkaya,
Indeed, you should definitely consider using the Multiplayer SDK even if you use only Relay. It is packaged with the Multiplayer SDK since it is actually used under the hood and you can continue to use it even if you don’t plan on using the Sessions (see the migration guide I linked in my previous reply)

1 Like

Hi @ArthurAtUnity,
I looked at the documentation and I have some questions.

As you mentioned above, Session uses a Lobby behind the scenes. I created a lobby with “LobbyService.Instance.CreateLobbyAsync” and then when I tried to join this lobby with “MultiplayerService.Instance.JoinSessionByCodeAsync” it was successful.
But I couldn’t get the Lobby instance.

This usage is probably not recommended. If I am using LobbyServices for creation, I shouldn’t use MultiplayerService for joining.

If I understand correctly, MultiplayerService provides an easier structure to manage Relay, NFG and Lobby systems together.

In my case:
I use Multiplay and Matchmaker and I also want to use the lobby system for players to play with their friends.

My solution:
I will create a lobby and then send lobbyCode to my friend than wait for them to join this lobby… After all players are ready, I will create a special matchmaker ticket for the players in the lobby so that no one can join their server. This will allow the matchmaker to find or start a server where players can play on the same server.

Is this the right approach for my situation?

Hi @Mj-Kkaya ,

Indeed, creating a lobby first and starting afterwards is a use case we don’t currently handle in the Multiplayer SDK with the sessions. However, there are ongoing internal discussions about how we can give you an easy to use API while still managing the boring glue code, so stay tuned !

For your specific use case, I would recommend keeping the Multiplayer SDK but bypassing the sessions entirely for now.

  1. One player creates a Lobby (and becomes the Lobby host)
  2. Friends join the Lobby through Lobby join code
  3. Since your goal is to use a Dedicated Game Server, you don’t need Relay
  4. Your Matchmaker rules need to have minimum 1 player and maximum 1 player
  5. The Lobby host starts the Matchmaking (because of the rule, no one else will have the connection details to this match)
  6. The Lobby host adds the connection details (IP and Port) to the Lobby properties with visibility set to Member (so only members of that Lobby can see it)
  7. The host starts NFG as a client (since the DGS is the host)
  8. All the host’s friends react to the Lobby changed and start NFG as client as well

Please note that because the rule states that there is only one player, you will need to base your game logic (teams, players setup, …) on the Lobby instead of the match results. If your game requires the players to be split in multiple teams, it will have to be handled in your game logic since Matchmaker. only sees one unique player for the whole match.
For the matchmaking feature without Lobby, you can create a second queue with different rules suitable for your game.

I hope this will help you !

1 Like

Thank you for your answer. This will be a good starting point for me.

Hey. Were you able to develop a flow with Lobby=>Matchmaker=>Dedicated Server using @ArthurAtUnity recommendations? This is something I want to achieve in my game and I was wondering if this is possible