Implementing Steam Advanced Sessions | 08 | Multiplayer Battle Royale | Tutorial | Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys quick heads up before I start the video the link down below takes you to my patreon where you can download the project files for this video also get access to my premium tutorials and in-depth courses where we build games together from start to finish check out my patreon below gain direct access to years of experience so that you can start working on your dream game tomorrow hello everybody and welcome back to a new episode of my multiplayer Bean batt roale Series so in the last episode we set up uh our Island to actually have water around it so we now have like this Ocean material here and then the island has complete water around it and then we also set up this other Island here which is basically the pre-match islands the spawning Islands so when take a look at pip G players typically spawn here now once a certain amount of players have been met then they will get a countdown after which the plane will spawn in and then the plane will basically fly over the main island where you then drop out and play the game so that's what we did in last episode in this episode we will be setting up steam so on I've been seeing a lot of comments asking me will you also do the series using steam and the answer is yes why not so in this episode we are going to be replacing the default session node so the default online subsystem with the steam online subsystem so let's go ahead and get right started so what we're going to do is we're going to close our project and then I want you guys to locate the project folder and then when we take a look inside of the project folder we can clean a couple things up so first of all the derived and intermediate data folders these uh get created every time that you start the game again so this one we can delete and then we see the saved folder also and inside of the saved folder we have the config folder now the config folder basically contains all of your editor settings so if you got preferred settings uh inside of the editor such as other comment colors or whatever then you can keep the config files but the others you can simply delete them since they get recreated every time that you start your pro project so for me I'm also going to actually delete the saved folder so now that we clean up the project a little bit then it's time for us to actually start to set the project up with steam so uh for that well first of all there are a lot of plugins available on the marketplace that expose the whole Steamworks API to blueprints but there's also a very famous free one which the community made which is called the advanced sessions plugin now what this plugin does is it gives you additional notes with which you can replace the create session and Def finding of sessions with the uh create Advanced session and the find Advanced session notes and what those do is that they allow you to play your game over the steam Network so if we take a look here at steam then we saw in a previous video that steam is basically our system to get our game online otherwise we would have to expose our uh local IP address and get people actually connected to your home network so in order to fix that we are going to be installing steam so that you can actually play over the internet together with your friends so um first things that we have to do is that if you take a look at the HRA engine documentation then we get to a category called programming and scripting and in that category if you scroll down we see online subsystems and we talked about that in a previous episode for this series and then we see the online subsystem steam so as it says here as well an overview of online subsystem steam including how to set up your project for distribution on false steam platform so keep in mind when using the online subsystem steam it is intended that you actually release your game on Steam if you are not planning on releasing your game on Steam then you can keep your default subsystem and then you can either set up dedicated servers or use something like EOS so epic online services which is uh actually cross platform but when working with steam then most of you actually want to use like achievements you want to use um perhaps the leaderboards for steam uh and also you got of course your steam friends so that's why we are looking at setting up steam for this video so the first thing that we need to do is that we need to scroll all the way down to where we read something about uh the finished settings so this is the end result and what we see here is that we need to configurate our default engine in file to now be set up that we no longer use the default platform but that the default platform is now steam so we're going to be changing the default online subsystem to the steam subsystem so what we got to do is we got to select all of this codes hit control copy then inside of your project folder we're going to go over to the config folder and here we see the default engine in file if we double click that then it gives us this text file uh and there's a lot of uh settings in here so these are all your project settings but what we need to do is simply scroll all the way down do a couple of enters here and then paste that code in here then hit contrl save to save it and there you go now what we see here is that that we have online subsystem steam enabled true and then we see see that we have a steam def app ID of 480 here now if we take a look at the website of the arm engine documentation then we see here what a steam app ID is so all games using the steam online subsystem must have a valid application ID because the Steamworks API won't initialize if you don't know your applications Steam app ID so you get one when you purchase a license for steam a license for steam is 100 bucks and that's the only lifetime fee and at that point you can just simply release your game on Steam now when testing steam provides a testing ID called 480 and when you use the 480 ID then we have to package the game as a development mode so you can package your game both in shipping and development so when using the testing ID package your game as a development mode and then you can test it with your friends but there are some limitations so you can test it with your friends but they have to be from the same country so we will get into testing a little bit later but first let us now actually download the plugin and set that up so um to download the plugin we're going to go over to the UN engine forms and then the advance session plugin uh link here I'll put it down in description of this video and then if we scroll down then we see here that we got a link to the GitHub so we can either download the plugin from GitHub now to download the correct version you can click here on master and if you scroll down you see all the different versions so on GitHub we see that their latest version is 5.0 so for those of you that have a later version and they haven't got it here on GitHub yet you can also click uh this link down here so if you click that link then it will take you to their website and then here we see that there's a couple of other versions so 5.3.1 5.2.1 Etc so download the version that you uh are going to need the version that I am using for this whole tutorial series is 5.0.3 so I'm going to click that one and it takes me over here so here where we can simply click on download and then click on download anyways now that this is downloaded we can open it up and drag this onto our desktop there we go now that we drag that on our desktop the example blueprint we don't need that so we can go ahead and delete that and this is then the folder for the advanced sessions so next up we need to put that plugin into our project so to do that we open up our project and we right click here and then we go ahead to new and create a new folder and we got to call that plugins now that we got that plugins folder we open it up and we also open up the advanced session folder and we can simply drag these two into here there we go once we did that we can go ahead and open up the project check out cact center right now steam in Early Access it's a very fun multiplayer video game cheaper than the Starbucks coffee so if you want to have a good time with your friends or strangers click that link down below and I appreciate every single one of you and enjoy the rest of the video [Music] bye there we go so when then opening up the project we see that the project detects that there are new plugins available so we're going to click on manage plugins and then over here we see the advance session plugins we see that they're both enabled if they're not enabled for you by default then make sure to enable them and then restart the editor then next up we're going to go over to our widgets folder and then our main menu folder sessions and then the create game widget so first of all we're going to be replacing the uh default subsystem create session node with now the new Advanced create session node so if we right click we can now type in create session and then we see that we got this additional create Advanced session one so if we click that one we see that it gives us us way more options than what the previous note gives us so now we're going to have to replace this one so remove this guy and then hook up the new one the new one also asks for a player controller it also asks for a public connection amount which is going to be our max players we can plug in whether or not we want to use lwn and then we do see a couple of other options here as well so you can go ahead and give yourself more options here there's also uh for example a nice one is that we have should advertise so that means whether or not you want your server to be hidden or public so that other people can join and then there's a couple of extra options if you want to know what these options are you can go ahead and read the Steamworks API documentation on Steam and it will it will explain in perfect detail to you what all of these settings are what we also get here is extra settings and what this allows us is to share way more than just what the previous notes uh gave us such as setting a server name the pain the current players um and yeah that was basically it so that was what the old session stuff gave us the new session stuff gives us extra settings so we can actually type in make and then we can make these settings so if we then go over here then we can see that we can make settings such as a float so we could then say for example that we are in a specific game mode and then instead of a float we of course would need something like a string for this string so we could say that we are in a specific game mode and then we could say we are in the game mode 3 for all and then when we uh input settings like these then players can also find these types of settings and basically display that inside of the server browser or we can specifically start to search for game modes that are equal to the to these values of freefor all so with the advanced uh session noes we can have extra settings that we want to display inside of our server browser but now for setting it up we're just going to continue so off of success we're going to be opening the the level here again and that's basically it so then hit compile and save now this blueprint is done then the next one that we need to replace is the server browser so if we open up our server browser go over to the graph then here we see the previous old find session Noe so yet again we're going to type in find sessions and then here we see find sessions advance that's the one that we need then we are going to disconnect this one and hook this one up so we want to hook up the player controller the Max results how many sessions we want to find so something like 50 is nice whether or not we want to use l and then here off of the uh success we want to hook up the results here again so this one is still the blueprint session result structure which is still the same that we were previously using now we can go ahead and hit compile and save so like I just said we could make extra settings and then we can also find games based on those extra settings so over here we got the filter and then if we are to type in make so here you can then drag off and then over here if we open this up you can make a literal session search property and then the search property that we would plug in here would basically be uh something of the type string for example so here we could then type in that key again and then type in the fre for all again and then we can say uh we want a filter on uh on the game mode freefor all uh something that is equal to freefor all now we can also do multiple so we can say freefor all in a specific map and that's the new type of data that we can now start to share in these sessions so for the sessions here we're going to hook up the on failure to this one and there we go so that's what this node is then we hit compile and save and that's all for this then next up we need to convert our project to be hybrid project so we basically need to add a C++ class to the project so that this is now a blueprint and a C++ project we need to do this for the plugin to properly work so how do we do that we go all the way up here to tools and then we see new C++ class if we hit that then we do not want to touch anything here so we're just going to click on next and then it will create a C++ class for our Bean Battle Royale uh and the name is perfectly fine so yet again we're just going to hit create cloud and then it tells us project now includes sources please close the editor and build from your IDE so what that means in short is now you can open up visual studio and rebuild the project there so we'll be doing that now so click okay and then next it tells you successfully added my class would you like to edit the code now uh what we need to click here is no so we don't want to edit the code now uh because when editing that code and building the project inside of Visual Studio we need to make sure that the project is actually closed so what we're going to do now is hit save all and close our project and then if we take a look at our folder for the project and we can now see that we got the sln file so we got the visual studio file in here so uh what we're going to do then is that we're going to double click the visual studio file which would open up visual studio now I am using visual studio 2019 you might be using a later version and that's all good just make sure that you got all the correct C++ components and that components installed if you don't have these components installed then unreal will tell you that or official Studio itself will tell you that in the errors and I simply follow the instruction in the errors so uh then what we have to do here is that we see that our project has loaded up and then if we click here on develop make sure that you click on development editor and that it is set to Windows 64 next up select your project and I right click it here and I click on build now that typically that goes go very fast so let's wait till that's finished this usually takes around a minute or so so it shouldn't take too long and there we go uh so after a minute or so we see that it say built one succeeded zero filled zero up to date Zero skipped so that means that it correctly uh built the project here so now we go ahead and hit close then our project has now successfully installed the plug-in now we can go ahead and test it so let's go ahead and make sure that steam is running yet again and then we will start the bean battle roale project all right so now a couple things to note so how can we now test if it works well testing steam can only be done in stand alone so if you if you start your games here in the editors then steam will not work it will only works in Standalone games so to test in Standalone we can also simply open up the project right click and hit launch game here that also launches your game is Standalone and then we're going to be looking in the bottom right corner here here to see if steam pops up now if it does so there we go then it is correctly installed and correctly set up so now that we see that steam pops up and has been initialized then what we can also test is to do shift top at the same time which gives us the steam overlay uh and when this all works it means that steam basically works fine so uh then what we see is that we are playing a game called space War so it will say that you're playing space War as long as you are using that development ID of 480 and when testing with the development ID of 480 then you can only test with people that are from the same region or country as you so if you are from the Netherlands you can only test with people that are also from the Netherlands so that region block it will get removed once you get your own game app ID so um if you buy a 100 bucks ticket for making a theme game install that app ID inside of that config any file then you can start to play uh with friends from all different countries so now we can just simply hit create and then click in five players create and this is now a session that is running on Steam so how can I test this locally well if I got another laptop with another separate Steam account then I can simply package my game as a x um in a development build and then I can give my other laptop that package development build and then if the other laptop is logged in with a steam account uh that is different than the steam account that I'm using on this computer then I can also test it myself without having to test it with friends so guys that's it for this tutorial video now that we've set up steam in the next video we're going to be continuing on the actual logic of the game play so we might work on that airplane that's going to fly over and spawn us on the island there or we might actually be working on some user interface so that we get somewhat of a view for like health bar uh and that we can start looting and picking up items Etc so we'll see what we do in the next video I hope you guys enjoyed this be sure to check it out on patreon if you want to get the project files with everything in it I appreciate you guys if you like this video please hit the like And subscribe have a good day and I'll see you guys in the next one [Music] bye
Info
Channel: Kekdot
Views: 11,671
Rating: undefined out of 5
Keywords: Blueprints, Unreal Engine 5, Unreal Engine 4, Steam, Multiplayer, Game, Marketplace, Lobby, Game development, Unreal Engine, UE, Multiplayer game, Host game, Sessions, Lobby system, Advanced, Tutorial, Server browser, Sessions Steam, Ready up system, Online, Multiplayer Unreal, Replication, Replicated, MMO, Subsystem, Game Engine, Solution, Modular, Devlog, Listen server, Dedicated Server, Seamless travel, GameMode, GameState, PlayerState, PlayerController, Widgets, RPC's, Steam advanced session, Plugin
Id: _U0BK0olC-I
Channel Id: undefined
Length: 18min 30sec (1110 seconds)
Published: Tue Oct 24 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.