How to set up Relay and Lobby | Unity Gaming Services

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello good day to all my name is esteban malonado and i am a developer advocate for unity as part of our new unity gaming services that we're proud to give you today i'll be talking about two new multiplayer gaming services which are the lobby and relay packages to empower players to play together lobby is a flexible solution that connects players in custom private or public rooms for great multiplayer gaming experiences the relay service facilitates multiplayer support for peer-to-peer connections without the use of a dedicated server to get started using the unity gaming services login to your unity dashboard and you can either create a new project or use a previously created project as well after you log in on the service explorer under the multiplayer tab you'll find the lobby and relay sections once there click on the join now button so you can enable the beta services this can be done by joining on either relay or lobby as well after joining the unity dashboard will show you the easy instructions that it takes for you to join your unity project to your unity dashboard project although you can add these services independently to your unity project they work very well together and this is what we'll show you in our demo that you can download today so what you're going to be seeing here is two game instances running the same demo and by default there are no public or private lobbies available [Music] and we're going to change that by having the instance on the left create the first public lobby [Music] you may notice a little microphone icon on the right you can actually click on that to enable or disable sending voice as a bonus this demo also has our vbox integration which gives you the ability of enabling voice chat in your project and now both services are active and they're helping each of the users communicate with each other they also have the option of sending emojis with those little buttons that you see on the bottom left and now both services are now active and both players have actually joined on the same lobby and with a small amount of work you can actually provide this very same experience to your players in your own games i'd like to take a quick pause as a side note to go over the key benefits of using the relay package it is easy to integrate cost friendly with built-in security and it doesn't require the use of a dedicated game server and at the moment it is best to use the service for games that will host a relatively small amount of players 10 players or less all connected in the same game session is generally recommended and as of today these are some very good game genres for you to tackle when implementing this service onto your game or project back in the demo we left our two users joining the same lobby and now they're ready to start the game phase both users must click on the green ready button that you see on the bottom right which will start the countdown that leads towards the simulated game phase this timer gives a chance to any of the players cancel going into the next game phase for whatever reason maybe one of the players wanted to go and grab a snack before the game starts okay so now we are active in the simulated game phase of the demo which is still sending data in between the two clients you may think of this as an opportunity for your game to be sending important game world information from client to client so as you can see the host ended the game which is the only one that can do so and now the demo goes back to the two players being in the lobby maybe they're hanging out but let's go ahead and proceed to show you how easily a private lobby can be made the process really is essentially the same as before the only difference this time around is that you have to make sure to click on the private checkbox and here's the interesting part if you notice on the instance on the left it won't be able to find the private lobby by default the host of the private lobby will need to share the lobby code that you see on the top right corner to any user that would like to join in as well and there you go the two users have joined in on a lobby once again but this time it's a private lobby same as before the lobby still has the communication features which is the voice chat thanks to beatbox and you can also still use the emoji buttons on the bottom left and just like before we're gonna click on the ready buttons on both instances so that we can proceed again to the simulated game phase and now we're back in the game state of the demo but this time as a private session similar to how you could see it be implemented in other multiplayer games and of course now you can offer these features into your own project or game being in a private session doesn't limit you at all you can still use all the features and you can even change your name in the middle of the game if you want it and same as before the lobby owner is the only one that can end the game as a final feature to show if the host decides to log out and close down the lobby all of the connected clients will receive a message and then be automatically sent back to the main menu and as we wrap up this demo of the lobby and relay services working together i'd like to remind you that you can download this demo today from the unity dashboard or our own github website we're really excited to see how you implement these services onto your own games in helping you bring the experience that you envision for your players and of course if you have any questions about these two services or any of our other multiplayer services available feel free to reach out and ask questions on our unity forum or you can go ahead and join in our unity networking multiplayer discord server on this online community you'll be able to not only talk with unity developers that are making these features but also other unity users that are trying them out as well goodbye
Info
Channel: Unity
Views: 30,289
Rating: undefined out of 5
Keywords: Unity3d, Unity, Unity Technologies, Games, Game Development, Game Dev, Game Engine
Id: mgIDwkaVAqw
Channel Id: undefined
Length: 7min 11sec (431 seconds)
Published: Thu Dec 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.