Godot Tutorial: GodotSteam Lobby System

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

I'll get it added to the documentation's tutorial section today. Cheers!

UPDATE: It is now live on the GodotSteam documentation.

👍︎︎ 7 👤︎︎ u/grampsgarcia 📅︎︎ May 29 2020 🗫︎ replies

Is this the promised tutorial in 2 days? That was fast. Will check it out later!

👍︎︎ 7 👤︎︎ u/gramozilho 📅︎︎ May 29 2020 🗫︎ replies

This is really awesome!

Will check it out in a few days, as soon as I get back home.

Once again, thanks!

👍︎︎ 3 👤︎︎ u/c0ppo 📅︎︎ May 29 2020 🗫︎ replies

Just wanted to throw some more kudos your way for getting this out so quickly!

👍︎︎ 3 👤︎︎ u/Assimilation 📅︎︎ May 29 2020 🗫︎ replies

Thanks so much for the detailed walk through, I wonder if I can use steam p2p networking together with godot's networking library or I need to start from scratch if I want to use steam p2p?

👍︎︎ 1 👤︎︎ u/taromochi5 📅︎︎ Jun 01 2020 🗫︎ replies
Captions
hey guys and welcome to the video so in this video we're going to be going over how to set up a steam lobby system using the Godot steam module by Gramps for our Godot engine so before we can move on to the actual tutorial you need to make sure that you have your Godot engine fully recompiled and set out to use these Godot steam module as well as having your export templates generators as well this is outside of the scope of this tutorial but any information you need on that can be found over at the Adobe website a link will be in the description so the first thing we're going to need to do for our project is make sure the steam is initializing correctly I will do this by creating a global script which will also load with the project and this will check to see if steam has initialized correctly and also contain a few parameters for ourselves so we'll create a new script and call it Global's and then we can open it and empty we don't want any of this factor fluff so first we're going to need to paste in a few variables that we'll use throughout the whole project and we'll start with some steam variables these will be owned online steam ID steam name we're just setting these are some base default values but these will be edited and used throughout the project we also have some key Lobby information here that we will need to keep track of and use throughout the project as well next we're going to put in our ready function this is where we'll actually initialize steam and make sure that everything's working correctly as we want first we're going to run this in steam init function and capture in the in its variable the inter variable we're then going to use to check the status to make sure that it's actually running correctly make sure a steam client is running if a user tries to lose the game without a steam account connected then we will just shut down the game and prevent them from going any further otherwise there's a little bit of information we're gonna want to capture so the first thing is online make sure the steam user is actually logged on we've got the steam ID which is this the use of steam ID we want to capture that variable same with their name and we also want to make sure that the user owns the game so we'll check the is subscribed function we can then use this to check if they don't own our game then we want to close on the game and stop them from moving on after that we are just going to put in the process function and make sure that the steam is running the callbacks okay so now that we have our global sap we are going to want to make sure we set it has an auto load for our project so we'll go to project settings to our auto loads select our Global's and add it and we want to make sure that is added as a singleton this will mean that this script will load with the project and the variables we've put in here are accessible across the whole project okay so now that we have our Steamworks initialized in our project we can make a start on our lobby UI this can be something really simple for now as we will probably update this and iterate through multiple UI designs especially if you're trying to make a game then as you develop a theme for your game you're probably going to go back and reiterate through all your UI anyways so making something simple for the sake of testing purposes is what we'll do here so we'll initial initial e start by creating a 2d scene from a 2d node I'm gonna speed up through the process of creating this UI first and we'll get back to it and I'll describe what I've done afterwards you okay so then now that I've sweated through that I can describe exactly what it is that I've done so initially I created a set of buttons these are going to be used for creating that I'll be joining lobbies leaving lobbies I've got a start game button here we're not gonna use that for the tutorial you'll handle that in your own way and your own project but I thought it'd be good to showcase what you could do here after that I've set up two panels one of them is where we're going to hold the playlist and display the names of the players who are in the current Lobby the other one is going to be the sort of lobby chat boxes where we're going to be able to talk I've got a text field here with a Lobby name where you can give a name to your Lobby when you create one this will be updated into our lobby name and we've got obviously the message box here which where we can send our messages I've put a label at the top right and just steam name at the moment this is where I'm going to be able to display the steam name of the current user so they can see their name at the top right at all times lastly we created this pop-up panel this is what we'll use when the user clicks join lobby and it will display a list of lobbies when it searches this remains hidden by default and we'll call that in code when we need to okay so now that we have our UI set up it's time to start writing our script we do this by initially creating a new script onto our 2d node steam lobby that will be fine and we want to clear out the junk as usual the first thing we will add is going to be some connections to our UI elements these local variables we'll use throughout the project so that we're not grabbing direct access every time we want to use them these will be things like any labels and text fields and text boxes that we're going to want to populate and clear and iterate through as we go along the next thing I'm going to add at the top here is to enum containers we'll get into more details later about why we're going to use these but basically there are two places where steam needs values to the to decide how it's going to work for example when we're creating a lobby we'll want to know if we're gonna be private for friends public these would normally be you pass in a 0 or 1 or 2 or 3 a glance that can be hard to understand so by using the enums we can actually have it pass in private which will represent a 0 and then when we're actually looking through our project I'll a there is if if you're debugging or if your project gets much bigger then it's much easier to see at a glance exactly what Steam is actually doing so that's the way that I like to get around that next we will create our ready function the first thing I do in the ready function is I set the Steam name though we captured in the Global's when the client first connected and I set that label that we had at the top right to be equal to it so the user can see their name in the top right of their screen then we want to add our connections our for steam these will be the varying functions that we'll use throughout this project as steam callbacks last I have this jump check command line will grab this and now so I personally like to keep this towards the bottom this is entirely personal preference you can have it wherever you want this doesn't matter but I like to keep it out of the way as it's just this singular section so what the check command line is actually doing is it will allow us to be able to join friends or accept invites without the game being initially loaded this is what will load the game with the arguments that we require and then join the lobby obviously you can see the to join Lobby is complaining here we haven't created it yet and we'll get to that later so for the time being we're just gonna comment that out the last thing that we're going to want to do is quickly create each of our button press events so we'll go through and create these quickly now we're not gonna need the start and we also want the close one in the pop-up panel so make sure you don't forget that one I think that should be it and I like to create sort of dividers personally myself and I'm going to take this and move it to the bottom keep the buttons up above it's we'll keep them all as doing nothing for now because as we go through we'll slowly add the functionality for the buttons but it's good to have the buttons they are ready to be used okay so now let's mix start on actually creating some lobbies I'm first going to grab one of the separators I personally like to use these are the functions that we will create will then call the callbacks later so the first thing that we're going to add is this create lobby function this basically just double checks to make sure that the user is currently not in a lobby if they are then we're going to call the create lobby callback from function proofs team and pass in two parameters this is the first place where we're going to use one of those enums we were talking about this is where the lobby status is where we'll define whether we're going to be private public or friends by passing in the lobby state s dot public this will pass in the two which is what we want for create lobby only having that as a two they scroll past that as a lot harder to know exactly what that is doing the second variable that we're passing in is just the max lobby count this can go up to 250 I believe with steam this is highly dependent on your game you'll probably have some kind of variable saved some way maybe even in your Global's which is what contains your max play account for your game which is going to set this before for now just for allowing the function to continue okay so this is for the first place we'll be using one of the built-in steam callbacks so the first steam callback that we're actually going to use is this on Lobby created this callback is called if this steam function call is run successfully and a lobbyist created we have this connect variable we just check in to make sure that the status is won yes we are connected and it also provides us with a lobby ID one of the first things that we are going to want to do is set our Global's Lobby ID to be equal to the lobby ID it's good to capture this variable as there are many other situations and places throughout the script that we may wish to use this Lobby ID other than just this script so we want to keep a copy of it here we have this display message function we'll create that in a moment but this is basically just sort of replacing where you'd normally do a print statement in this case it's actually going to be used to print messages into the chat box for the sake of some user feedback so that they know what's going on we'll you'll see us use this many times throughout the project this in this case it's just going to say that we are we have created the lobby and what it's doing is taking that text field which we come we can put in a name for and it's just adding that to it and next we want to set up some lobby data so we want to actually provide our lobby with it you know it needs to know its lobby ID and we all we want to make sure that we also provided a name field in which same thing as with displaying the message we are just going to set into what we've typed in the field then this bit here is I'm just sort of capturing that name into a local variable this is just a cleaner easier way of doing this I'm getting the server's the lobbies data I'm getting the name and I'm setting the name in our if we go over here this name here I'm setting that label to be the name that we've say too this means that when you create a lobby and you have that chat box it will accurately display the name of the lobby that you set up okay so to get it out of the way as this is a function that we're going to use a lot throughout the project will just quickly create this display message all this basically does is it takes in the message whatever it is that we're sending to the function and it then adds the text to a new line to that Lobby output window that we have inside of our chat but yeah we're just adding the text so that as we go through do we have this label thing here and it will populate with messages including lobby messages not just once sent so this is good okay so the last thing we are going to need to do is to just set up our create lobby press function so in this when we actually click on our button all we want to do is call our create lobby function this button will now call this function this function will say this team lobby which in turn will do the steam callback for this function and that's how we create a lobby so let's give it a give it a quick test so I don't have steam running currently so if we try to run it I need to select our scene you'll see the game tries to load and it immediately clad crashes you can see we've got the print out here failed to initialize steam steam not running shutting down okay so now that I actually have steam running as you can see down here now if I load the game you can see it doesn't close out and we've got my steam name showing up right there we've had the steam lay overlay pop up that's correct we've got exactly what we want everything seems to be working there let's just create a test and click create and we have an issue okay what's gone wrong here the Creator I have not named this correctly this text field it's supposed to be called I knew I did it somewhere I knew there was a problem somewhere we want this to be not be named okay so that should have fixed that error always make sure that your connections are correctly named this is unlikely to be a problem if you're typing it out because I copied it in I've accidentally made that mistake but now we'll try again we load up everything as expected steam overlay will create a test lobby and if we create you go you can see we've had our update saying created lobby test you see that our actual lobby name has been updated to test so everything is now working correctly now I've solved that little mistake sorry about that and well now we can move on to the next part okay so now that we've got the ability to create lobbies we're going to want to be able to join lobbies as well and in this section we will not be covering the lobby searching that'll be covered in a later section for now we're just going to get the functionality to actually allow someone to join a lobby and that way you'll be able to invite and join through the steam overlay so the first thing that we're going to need to get for us to use is going to be our join lobby function so we'll just bring that in so this join lobby function we are using this as well it gets the lobby ID that's of the server that we're trying to join the first line we're just making sure that if the pop-up panel that we have for searching is open then we hide it if we're joining that way then we want to hide it if we're joining through friends that it's already hidden so nothing's really gonna happen then we're going to capture the name of the lobby with the get lobby data method just like we've done both before and we're going to display that in our chat box stating if they're joining the lobby passing in the name as some user feedback to let them know that they're joining the lobby and what Lobby they're joining next we are going to make sure that our lobby members array is cleared this will most likely be clear already anyways but by also making sure we do it here it just helps to make sure that we definitely don't end up with any kind of anomalies and mistakes where the members field is populated with old data and then some of our updating things will show incorrect information so just always want to make sure that we clear it lastly we are simply calling the steam join lobby and passing in the ID this will actually create the join lobby request and steam will handle the rest for us and if successful then we will move on to our to receive our lobby join callback which we will add here so if successful and we lobbie then we get this on Lobby joined this takes in a lobby ID there are a couple of other parameters like permissions and whether it's locked and we get their response these are something that we want to have because of our argument down here Bert's we are not really going to use if you could probably use these in the future feel free to check the search section with Godot steam you actually have type in steam you can see we actually have a steam section with pretty much everything we would want to know about steam here so if there's something here you want to double check feel free to look that up what you'll want to do you won't want to search this but you'll want to search what it connects to so if we add lobby joined and search you can see we have it here and this gives us a little bit of insight as to what those are so with that saw it now what we're going to do is we want to make sure that we set our lobby ID to be the idea of the lobby we have joined again this is something we can use throughout our scripts so it's always good to have a copy of the ID of the lobby that you are currently in for just numerous reasons anytime you want to use it then in usual fashion we take the name with the gate lobby data so that we can use that in this case we're updating the chat box lobby name here just like when we create one so that when you join a lobby it displays the name and then we have this get lobby members function that we haven't created yet and we'll get to that in a moment but before we do that there is a nother callback that we're going to want to add and this is when someone like your Lobby join requested so this is when you are attempting to join someone and through the overlay and or through an invite on Steam and this just takes in the lobby ID and the ID of the the friend of the the you're trying to join you set their name so that you can display a message saying that you're joining your friends lobby and then we just call join lobby like any other any other method that we would use to join and everything will continue as normal there and we'll join the lobby and we'll call this call back and so from from here we can move on to getting the lobby members as we should be able to join lobbies perfectly fine and so we'll move on to this next section we'll walk over how to get the lobby members okay so let's now move on to actually handling the lobby members so as we know from the last section whence joining we have this gay lobby members function that we are yet to create so that's the first thing that we're going to go ahead and create now so we go up here and after join we add in so we've got this get lobby members to start with we're going to like we pretty much always do make sure that the lobby members array is clear again there's a lot of repeating this but is maybe not necessarily required but it just as a fail-safe make sure that we have a very limited chance of running into any kind of issues so there's no harm in making sure that your list is clear before you start anything so after that we move on and we get the member count of the current lobbies we're getting how many people are in this lobby right now we can do this with a steam provided function which is just get number love num lobby members and we pass in the lobby ID that we are in right now this is one of those situations where it's good that we've captured our own lobby ID so that we don't have to do any kind of function calling and things like that to try and get it we have it captured already after that we can update the play account of the player section here we want to update this title display how many are in there obviously by default we have it set to zero so by this we're just taking the player count which we have defined up here we're just setting the text and we're basically typing in the same format that we had before only between the brackets we are now adding this member count as a string so that we can get the actual number of how many people are currently in the lobby then moving on what we can do especially now that we have the num has a number of people in the lobby this is very important for us to know so that we can now loop through each individual member or the lobby using a you know for in range function starting at the zero you know the first person and just going for as long as how many people we have the first two things we want to do is take the steam ID and steam name of these members there are many other things that you could possibly do in here depending on what kind of information you want there's many steam parameters again check the search thing if you're unsure on something but there's a lot of information you could grab here if you wanted to for our case the most important one that we're going to one is the steam name because that's what we're going to display but it's always handy to have their ID as well because there are some things in which we want to be able to pass in the ID for example getting the name once we have both of these bits of information we are calling a function again that we have not yet created which is add player list and we're passing in the ID and the name so let's go ahead and quickly create that function now so this should stop complaining now there you go so now we have this add player list function this is taking in the steam ID in the steam name and what we're doing is we're now finally populating our lobby members array we're doing this by appending each member because we call this individually on every single person so every time we reach a new person we are appending to the list this members ID and their name and providing it with a grab of value for us and we are then making sure that the actual player list on the menu so this is where our player list should be we're making sure that val is clear we don't want to have any people left over from previous servers we want to make sure we're only displaying the people in this current server and then again in another loop we are going through the array that we've created and we are populating the list with a the steam name of a new person who's in the lobby and we're you know creating a new line afterwards the next person when they get created simply move on to the next line and then we have our players count up in here and we'll just play each individual member right down by their okay so now that we have people joining and we can populate the field one key thing that we need to do is the callbacks for the on lobby update and the on Lobby chatter update so if we bring these in now their callbacks so we will be putting them down by here in our callback section and there's not really too much we need to know about this it's not really doing anything for us we've just got a simple print statement but it will complain as if we don't have this so there's just some parameters like whether it was three if they were successful and Lobby ID member ID and a key we're just gonna capture all that information just to make sure that we don't have any complaints down in our debugger the we're not calling a function that's attempting to be called or something but after that the one that we actually want to make sure that we have correctly is this on lobby chap chat update now this callback is called anytime there is an alteration or an update to the lobby so someone joining someone leaving some someone being kicked anything like that anytime something like that happens this callback won't fire it takes in the lobby ID the ID of the person who is the the changed ID sorry and the ID of the person who was making the change and the actual state like what change has actually happened so the first thing we want to do is to create changer which is just get the person who made the change so who is doing something here who are we talking about then we've just got these simple if else if and else statements you could probably use some kind of switch case statement or something like that but this is a nice clean way easy to show on a tutorial so we're gonna go ahead and do it this way and what we're basically going to do here is we're taking the chat state and comparing it to a value to find out exactly what state it is so if you wish to know what these states are if you search for chat state you'll see in the help section we have this chat member state change entered and this contains the values and tells us what each of them are for so as we can see someone entered one someone's left to disconnect it this fall we got kicked 8 and 16 so that's where you can find the actual value changes if you want some of these you may wish to have some of them you may not I've decided to just show them all just so that you know how to use them but you're definitely going to want to have this just say one which is when someone joins and what this will basically do is place a message in the chat box saying that someone you know the name of the person who is joined has joined the lobby same with two only this time it's 4 has left the lobby so you can the state that your friend has left the lobby in the chat box the other two are kicked and banned we don't have any kind of functionality for those in this tutorial but they may be something that you have built into your game so if you do kick or ban someone and then this is where these would be called and you'd get the message to say that they've been kicked or they've been banned different to the fact they've just left and if anything else happens that we're not sure on we're just for the sake of it gonna say this person did something well we don't know exactly what they did but they've somehow called this chat caused this child date to call so we're just gonna say that you know this has happened and lastly we're just going to call this gay lobby members function again which just makes sure that if someone joins or someone leaves or anything like that then we update the lobby which will get how many people are now in there if someone's left or someone's joined and you know go through as normal like in any other situation and just make sure that we update our player list and things like that so that everything is as we expect it to be okay so now that we have the lobby server list all updating it's time to move on to getting the lobby list so we're going to implement the joining I'll be the searching function now first things first before we move on we're going to uncomment these two lines down in the check argument now that we have the ability to join lobbies and updates and everything we want there to be able to join down in here as well so the first thing we're going to need to do for joining is connect this join lobbyist button to make sure that it opens up the pop-up panel so that is the first thing that we're going to do in there but there's a couple other things that go in there as well so we'll quickly add that but close while we're at it we might as well make sure that the lobby pop-up can also be closed hide it doesn't show up in just make sure they are the same yep okay so now we can open open it up and close it with our closed panel make sure that it is set correctly okay so there you go yep that's where we've got a separate name so we need to make sure that this is set to that same name that's why we're getting these it areas down here so if I save that go back to the script down here I try that again and go lobby Bob I should now have a they go I function so yeah that's now linked correctly so again similar case to before we just gotta make sure that it's definitely named exactly it was we're doing so back to the actual join press function once we've actually popped up the pop-up window the first thing we want to do is set some distance filters this is a function that is built right into steam we just call ad request Lobby list distance filter and this is the second place where we're going to use the enum containers from earlier or at least we're going to use the second one in a similar situation to before this would normally take in just a value like zero one or or two in this case we're going to use our search distance innum from before where our options of zero close one default too far and three worldwide we want to search worldwide so we would normally pass in a three but for the sake of easily being also read what is actually going on we're using the enum to just say that we're searching worldwide and that will act as a 3 then we want to display a message for some feedback just letting them know that they're searching for lobbies and once we've got the distance we can actually request from Steam to request lobby list so we're a question that we get a list of lobbies that it has found with its search parameters so with this in place it's time to move on to actually populating our pop-up box so we've got our go down here so searching for the calling the request lobby list this will call the callback of lobby match list so this lobby match list is where where we want to take in the lobbies that it has found and we're going to iterate iterate through each of them individually so we've got four lobby in lobbies and the first thing we're going to do is you know it's something we're just gonna use quickly for now so we don't need any global variable or anything we're just gonna locally define a lobby name get the data and just say there's the name there and we're going to do the same for the getting the number of members again just quickly gonna use that it's just so that we can lay out the button and display some information on them that we want then we're actually going to start populating this Lobby list the panel with some buttons so we're going to for each one create a new button on the button create new and we're going to set the text of that button to be the in this case we're setting the lobby ID the name of the lobby and we're also setting the displaying the number of players that are in that lobby all on the actual button itself we're then going to designer that decide a size for the button and we're setting it to 800 by 50 for this sample this is something you can play around with it depends on the menu you're using but this way you just find the size set a name for it and we're just gonna use a string lobby and then we are going to connect a callback so we're connecting a signal here to the actual buttons pressed call so like how we've actually used the built-in functions from the node panel and we've got oncreate pressed what this is basically saying is we want to connect the join lobby signal to call when we press this button this will mean that the button that is the name and I mean I will also act as our ability to join the server this will call our join function like anything else with passing in the lobby itself and there you go we we can now join just like we did earlier where we can join friends and lastly we want to actually populate our container so our container as you can see we've got a scroll container which is what's going to allow us to scroll through the many lobbies and this VBox container is what makes sure that all of the buttons will display quite cleanly and can distantly throwout being made up of all of these buttons over creating so we just need to with each individual bot button add it as a child and the fact that it's being put inside of a box container is where it'll actually handle that itself and the spacing and things like that will all be even okay so let's actually test this out now then shall we so if we load up you can see that now we are connecting steam as usual we click join we populate this list with a whole bunch of lobbies and when we click on the lobby we would join it now none of these lobbies are actually running our game these are just all the people who are currently using steams standard the development test app ID which is 480 but we can click close Nick closes or we can just choose a random one and you know it's updated it hasn't got the name correctly because again they're not actually running our game or anything like that so it's not gonna function properly but as you can see we were able to sort of connect with them and so yeah we now have joining the joining lobby pop-up fully functioning as well okay so we're now gonna work on getting our chat box up and running being able to send messages back and forth to each other which will display in our chat box so the first function we're going to bring in is our send chat message what this is going to do is capture in a variable string variable our message which we are taking directly from the message text field here we're just taking the text that has been typed into there and and then we can call the send lobby chat message function which takes a lobby ID so we're going to pass him the ID of the lobby that we are currently connected to and the message that we wish to send by capturing this function call into a variable as well however we're also able to check to see if it was successful as this will return whether it was successful or not so if the message was not sent we want to display an error message to the user so they're aware that their message didn't go through so we're just gonna say our chat message failed to send otherwise if it has been sent then we're going to clear the chat message anyways and make sure that it's blank ready for the next ones and if it has been sent then we will call the callback so the callback that's this function calls is going to be go to the bottom here on lobby message so this is called whenever the the server the lobby has identified that a messages attempted be sent through it and takes in some parameters gives us some parameter sorry a result user the message and the type we're not going to use the result or the type of the key things that we want to know for this is going to be user and message and so what we want to do is we want to find out and identify who it is that has actually sent this message so we're going to capture in the center variable here the user that's the message and then we're simply going to display the message so this is going to be called for everyone so everyone's gonna like that and I identify the person who sent it and for the sake of formatting I've put it here so that after a colon we will then put the message and then this will say so-and-so and display their message afterwards so with this in place if we give it a test we should find that if we just create a lobby we should then be able to testing my message of course so the thing that we have forgotten to do is actually have it so that our button actually does something so what we are going to do is what was the name of our function I think it was send chat message that's the one so we want our button to call Sencha message and so now if we just create a message we click send and as you can see it said that we have said testing a message and so we now have the ability to send messages we can send whatever we want whatever is typed into this message box will be sent and displayed and the message box is cleared okay so the last thing that we need to implement now is the ability to leave the lobbies so we start by creating our function so we've got our leave lobby function what this will do is initially I'll make sure and check to see if the user is actually in a lobby first we are want to attempt to leave a lobby if we're not in one so if our lobby ID isn't just zero then we want to be able to leave and so we want to display the message to the user for some feedback like usual saying leaving lobby and then we simply want to call the steam function leave lobby and passing the lobby ID now as far as actually leaving the lobby is concerned that is all we really need to do where steam will handle the rest for us but there are a few things that we want to do ourselves better clean up for the sake of our UI so the first thing we want to do is just make sure that we have updated our Global's Lobby ID to be zero and want to make sure that it doesn't keep the old lobby ID well we're no longer in a lobby and we also want to reset some of our labels back to their default names so for example the lobby name we don't want to keep the old names we want to say it to be just lobby name and our play account we're no longer in a lobby so we want it to just display this number of players is zero and we also want to make sure that we clear the actual list of players because we're no longer in a lobby with them so the other thing we want to do is also run through each member in our actual array of lobby members and just close any peer-to-peer sessions with the users in our current case we don't know we're not really using much of the peer-to-peer and stuff yet you may not have a peer-to-peer connection open with them but just in case you do you are gonna want to make sure that you have closed any possible connections you have with individual people and this helps to prevent any issues in the future we just do that by passing they're the members steam ID and then once that is done we can clear our lobby members array as when no longer connected with anyone at all the last thing we want to do then is to make sure that our leave lobby button is actually connected to our leave lobby function and that should be now working correctly so if we for example create one and create a simple lobby like usual if we click leave then we've reset this and let's reset the name and we've said - we've left the lobby and so we are no longer in a lobby it anymore okay so that is now everything set up we should have a fully functioning steam lobby so what we're going to do is we're going to export it and test it out so I've already set my project up ready to exports so I'm gonna go to export and you are going to want to make sure that you designate your custom templates which you should have generated when you were setting up your Gatos team and everything and I've designated a folder for that so it's just in My Documents I've got my Aikido tutorials and the steam builds and I am going to export this project okay so I've exploited the project as you can see here I've got my Godot steam Exe and the package file we are also going to want to make sure that we put in our steam steam API 64 DLL I've got the library in there as well but that one's not really necessary you just need the DLL if you're on Windows and we want to pass in our Steam app ID which is just 480 which is the as I've said before it's steams default thing so what we are going to do is we're going to run that now and here you can see our exported exported version appears to be running perfectly fine so I'm gonna go ahead and send this over to my laptop and we'll be able to test out running it on to clients so I'll be back in a moment okay so I have now sent this over to my laptop and I loaded it up on here so first we're gonna test our ability to invite someone so I'm going to create a test lobby create it so we can see we've updated ourselves we've got our lobby test here and I'm just going to go ahead and send an invite to my other account here over here on my laptop and we'll wait for that to join and they you go it's joint as we can see we've got my current account and the don't scroll account and so let's have them send over a message saying hey from the laptop and we can see it's come through immediately and I can say hey back and mine will also display and if they choose to leave then leave we see that they've disappeared from our list and don't go has left the lobby as shown up so let's now quickly test this the other way around and they will have them set up a lobby on the laptop they go create and instead of inviting this time what I can do is I can just choose to join gain and you can see that I have joined them I'm now in their Lobby doors Crow is what they say two doors close the name and if they send this time hello we can see that the message has come through and I can type a back and it will go through and yet again the lobby can be they can disconnect the lovely remains open the lobby itself hasn't been closed because it's peer-to-peer so I am now the one who's keeping the lobby open and I can click leave and the lobby has been closed so there you go we can see we've got the steam lobby fully functioning so thank you for watching my video I hope you enjoyed it I hope it was informative and hopefully you all now know how to create esteem Lobby using the Godot steam module first I would like to give a shout out to Gramps because this module is absolutely incredible and it's definitely coming in handy for the game that I'm making last on land at the moment which is where I learned why I learned to do this I followed the tutorials on Gramps website but I decided that it would be a good idea to make a video tutorial because I feel like myself and a lot of people prefer a video tutorial to a text tutorial and the information is very lacking out there at the moment with Godot being still kind of new I suppose so yeah and hopefully one day someone can make a better tutorial than this but for now I hope this was good enough and thank you very much for watching
Info
Channel: DawnsCrow Games
Views: 3,698
Rating: undefined out of 5
Keywords: Godot, GodotSteam, Godot Steam, Steam, Steamworks, Tutorial, Networking, Lobby System, Multiplayer
Id: si50G3S1XGU
Channel Id: undefined
Length: 51min 45sec (3105 seconds)
Published: Fri May 29 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.