Building and Testing Dedicated Servers in Unreal Engine 5

2022 ж. 17 Қаң.
40 022 Рет қаралды

In episode 17 of the UE5 game development series, we'll configure the project to build a dedicated server and standalone client. We'll show how to cook content for each of these configurations, as well as run them both in the debugger and from the command line. We'll then fix a bug that comes about when the client and server tick rates do not match.
Previous Videos - • Unreal Engine 5 Game D...
Github Project - github.com/LivelyGeek/Flybot
Twitter - / livelygeek
Unreal Dedicated Servers - docs.unrealengine.com/en-US/I...
Unreal Target Files - docs.unrealengine.com/en-US/P...
Unreal Build Configuration - docs.unrealengine.com/en-US/P...
Unreal Content Cooking - docs.unrealengine.com/en-US/S...
UE5 Server Cooking Fix - github.com/EpicGames/UnrealEn...

Пікірлер
  • amazing series so far! loving the multiplayer tutorials, you explain everything so clearly. keep up the videos you're doing a great job!

    @LOL1423derp92@LOL1423derp922 жыл бұрын
    • Thanks, I'm glad to hear you're enjoying them!

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
  • Thanks for teaching everything free instead of in an expensive course

    @decisive5760@decisive57602 жыл бұрын
    • It's my pleasure! These are fun to make and a good way to learn along the way.

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
  • So many problems solved with this one video. Thank you very much!

    @ugurkupeli6779@ugurkupeli6779 Жыл бұрын
  • so much clearer than the official documentation! thanks

    @toasty2942@toasty29425 ай бұрын
  • i love the format of your video ! not too longa nd super informative this is exaclty what i need !

    @blauzon23@blauzon232 жыл бұрын
    • I'm glad it was helpful!

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
  • Amazing info, thanks bro 💪🏼

    @sebastianvelasco3825@sebastianvelasco3825 Жыл бұрын
  • Amazing tutorial! Thank you for sharing! Subbed!!

    @user-sf5jz4me4g@user-sf5jz4me4gАй бұрын
  • You are the guy in the right time! I just want to find this topic! Thx you

    @DanielDaAbadSukarno@DanielDaAbadSukarno2 жыл бұрын
    • I'm glad you found it useful!

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
  • Great video bro...1 question??..where can i upload dedicated server for mac builds

    @rajsans8061@rajsans8061 Жыл бұрын
  • Hi, thx for sharing. I see in cooking settings there are 18 classes excluded for dedicated server, is that by default settings? I'm wondering whether I can add more in the list.

    @nathanpang1038@nathanpang103811 ай бұрын
  • Great video, it helped me understadnding the matter better now. So the build targets are the sepearation and base. But how does unreal engine know what to pack into what of the game project? Does it automatically pick the server related game logic based on the functions and settings on the functions? Example: Does unreal engine know, that if I set a function in a blueprint or c++ to be "run on server" - that it packs the class into the dedicated folders?

    @taigabit@taigabit10 ай бұрын
  • wow, this explains so much that wasnt in the tutorial in the documentation :o

    @gnome6969@gnome6969 Жыл бұрын
  • This is absolutely amazing! I found your video because I'm migrating my project from UE4 4.26 to UE5; in fixing up my Visual Studio I was looking at if I should build UE5 from source... My game is multiplayer and works well in 4.26 as is, but going from client - client to dedicated servers would be ultimate! Checking out the documentation, looks like I have to convert everything from blueprints to C++... So, does that mean hence fourth if I do this I would no longer use blueprints at all? Quite the commitment I am pondering for my coding level.. I appreciate any input. Excellent video! Thank you for your knowledge! Liked, Subscribed.

    @samohickey@samohickey Жыл бұрын
    • No, you can definitely still use your Blueprints with dedicated servers. You do have to build the engine yourself (because the dedicated server binaries aren't included with the engine builds that Epic distributes) but an engine build that you've made yourself still loads and uses your game stuff like Blueprints in the same way.

      @JJC1138@JJC1138 Жыл бұрын
    • @@JJC1138 Thank you so much! I have been looking all over for an answer to this. I appreciate you. 🤘🏻

      @samohickey@samohickey Жыл бұрын
    • Could you make it work?@@samohickey

      @laurino.@laurino.6 ай бұрын
  • 3:57 Just a heads up. The Server target cook issue has been merged for 5.1.1.

    @sgtbooz@sgtbooz6 ай бұрын
  • Can you make a tutorial that listing all dedicated servers with join function also using steam/eos thanks

    @marcooasan1668@marcooasan1668 Жыл бұрын
  • Thanks 🙏

    @givemerandom8617@givemerandom8617 Жыл бұрын
  • I'm using unreal 5.2 but I followed your instructions but got the error "Server targets are not currently supported from this engine distribution.". Do you have any way to solve this problem?

    @nhannguyen6842@nhannguyen68426 ай бұрын
  • so i do not have a source folder with my project.. The project was created with Blueprints. I tried the convert in place method but didnt notice any changes or game folder in VS?

    @SurvivalExposed@SurvivalExposed Жыл бұрын
  • Hey Lively Geek, I'm hitting an error that I replicated in 2 projects that I tried the first few minutes of this video in. When I try to build in Visual Studio, the build is successful but when loading the editor/server/client I am getting an error that reads: "Game files required to initialize the global shader library are missing from: (Content folder location of the project) Please make sure the game is installed correctly." Not sure if that has to do with it, but I had to change it to that because originally using Win64 it wasn't working, so I am wondering what your configuration manager settings were looking like for this? Thanks in advanced for any help!

    @wesleygilbert6422@wesleygilbert64222 жыл бұрын
    • Sounds like you need to cook the content for the sever and/or client. Only the editor build can use the raw assets. I show how to cook content later in the video.

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
  • Hi nice video! If i want to export my game for playing with a friend i just do a normal pachage from the editor?

    @420krow7@420krow72 жыл бұрын
    • Yeah, you can just goto package project, select the platform, and all the files output to the selected directory can be zipped up and copied over to another computer.

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
  • Hi sorry to bother you, would it be possible to use blueprints for prototyping ingame but with the engine source built to accomplish something similar for dedicated servers?

    @webbeveep2243@webbeveep22432 жыл бұрын
    • Yeah, you can do quite a bit of multiplayer interaction with just Blueprints. At some point you might need some C++ for more advanced logic though. Check this out to get started: docs.unrealengine.com/en-US/InteractiveExperiences/Networking/Actors/ReplicatingActors/

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
    • @@LivelyGeekGames Thanks for the reply and link. :)

      @webbeveep2243@webbeveep22432 жыл бұрын
  • Will this method work for computers at different networks.

    @owaizkhan2776@owaizkhan27766 ай бұрын
  • Is this all possible using blueprints as well?

    @tristankubih@tristankubih Жыл бұрын
  • Hi ! I past a lot of time to learn about server, and i feel confuse about it. For me there are listen-server that you can create on ue, one client is the server at the same time, is a host, for me its impossible to make my game use it cause i need a big player count and my computer and internet connection wouldnt be enough (ig), then dedicated server that you can create but i dont get one thing is that apparently they kind of are autonomous, like you're a client connecting to it and not more, the server run since it is started . But how does it runs, it need a card and ram and else so I, as the creator of the game, do runs the server that i've created right ?, cause it need an ip adresse, Then nobody's stalking about the performances of it, i create a dedi server with unreal but how well does it work ? It depends on my computer (and the game and clients also etc) right ? I've seen EOS too, steamcore as well (but idk this one) and ok it created me a dediserv but how good it is ? Then i know that we can buy and implement server hosting platforms services as AWS Playfab etc, they seems to be perfect cz they're expensive and im sure here that your computer don't run any server but is just a client , and as shown on your previous video about fornite's server are good, can receive a lot of packet and runs a lot of matchmaking games with 100 players and a big maps with a lot of polygons, animations, etc. I can't go with that since i'm trying to do a "game" (just an island where some friends would connect on it and interact as a metaverse, i say friends but its a part of a esport team community, and try to make some lobbies for them to join, like multiple sessions of 32 player would be good) for free and voila. I cant find the answer of these confusion about the subject but if you can help me with that, waaaaaaaaaaa it would be amazing

    @keeevart1424@keeevart14242 жыл бұрын
    • Dedicated servers run without any of the graphics rendering, audio, etc since the server doesn't have a local player (or viewport) connected like clients do. It's just a background process that runs without a window and only accepts network players. You don't need much for hardware to run one, just a decently fast CPU to keep up with game logic and collisions/physics. You could build and run dedicated servers on just about anything, but for hosting it probably makes the most sense to build for Linux since you can get Linux VMs fairly cheap. As you mention, once you have one or more servers running somewhere, you also need a way for clients to discover them. You could just have your game menu prompt for an IP/port to connect to, but a better solution is integrating a matchmaking service. Definitely check out all the services EOS provides for managing online based games. It's free and works great. It's also what powers Fortnite so you know it will scale.

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
    • @@LivelyGeekGames Alright, thank you a lot ! Thanks for your time and your 10/10 content and service. So if I understand well, I can make a multiplayer game by in a part building a dedicated server, it runs in the background, and is "connected" to each players, like you can play and have a good experience depending on your cpu as a player, like each player are connected by themselves to the server, it's not only min, right ? So in a context where every player have a good hardware, the gamee is not "heavy", not many polygons, interactions or calculs for the gpu and the cpu, how can we judge how well the server will run ? How can i figure if my game, with a certain hardware adviced and connection advaced to the player, will be playable at this amount of players by server/lobby or another one ?

      @keeevart1424@keeevart14242 жыл бұрын
  • what version of Unreal Engine 5 are you running? I have EU5 EA 2, but whenever i build, whether its in the engine or visual studio, it says that "Server targets are not currently supported from this engine distribution.". Also looks like my UE5 doesn't have the Platforms > Windows > Target Selection options as well. Its so strange because I have the same fix to PlatformInfo.cpp you mentioned and everything.

    @Havlark@Havlark2 жыл бұрын
    • Did you build the engine from source on github? This is required to do server builds. This is from the required setup under: docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Networking/HowTo/DedicatedServers/ I'm using a source build from tag 5.0.0-early-access-2 as I show in this video: kzhead.info/sun/qquqXbyDb5-cmZ8/bejne.html

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
    • @@LivelyGeekGames Oooh, I'm currently using the one built from the epic games launcher. I'll download and build the one from Git and try with that and report back! Thank you so much.

      @Havlark@Havlark2 жыл бұрын
    • @@LivelyGeekGames Looks like that worked! thanks so much for the info.

      @Havlark@Havlark2 жыл бұрын
    • @@Havlark Great to hear!

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
  • Whenever I change the solution configuration to DevelopmenServer or DevelopmentClient I get an error: Current solution contains incorrect configurations. It may cause projects to not work correctly. Open config Manager to fix them. Does anyone have any idea what could cause this?

    @michaelbabcock6997@michaelbabcock6997 Жыл бұрын
  • Can we create session on dedicated server method ?

    @OriginRow@OriginRow9 ай бұрын
  • Is it possible to make a version of the server that runs on Linux?

    @KevinelGamerlol@KevinelGamerlol13 күн бұрын
  • Any chance you can adapt this multiplayer game to Playfab?

    @0xBenR@0xBenR5 ай бұрын
  • I followed this video and it worked perfectly then after some days RDP setup was done in my pc so that maybe cause the server is not working properly it cannot connect to client it shows log up to Bringing up level for play then it does not show engine initialization. Anyone can help?

    @aadityarajkarki7610@aadityarajkarki7610 Жыл бұрын
  • How many concurrents users can this type of server have in average?

    @kevinmolinari8953@kevinmolinari8953 Жыл бұрын
  • intermediate project files invalid output?

    @ROSALIEIK@ROSALIEIK9 ай бұрын
  • 7:25 Please how did you do that I do not understand

    @poky-me@poky-me10 ай бұрын
  • Can I delete the binaries folder? or will that remove the FlybotServer.exe?

    @AMAND4@AMAND4 Жыл бұрын
    • u can remove it, same like the intermidate folder. it will be rebuild

      @unrealper6284@unrealper6284 Жыл бұрын
  • 4:01 this bug exist on 4.27.2 ???

    @__foo__@__foo__ Жыл бұрын
  • Why is this so overcomplicated? Why can't you just package the project from the editor? It's one click and does the same thing.

    @guesswho2590@guesswho2590 Жыл бұрын
  • Wait, dont you have to pay for a Dedicated Server?

    @Nin10doLetsPlay@Nin10doLetsPlay3 ай бұрын
    • the compiled gameserver he built in the video would then be ran on a dedicated server. "dedicated" meaning it's sole purpose is to run and handle the networking for the game server.exe

      @ryantylerMachete@ryantylerMachete2 ай бұрын
    • @@ryantylerMachete oh ok, thanks for the clarification 👍

      @Nin10doLetsPlay@Nin10doLetsPlay2 ай бұрын
  • 200 go

    @xLawification@xLawification Жыл бұрын
  • Good, but still too Advance for me

    @curiosity9283@curiosity92832 жыл бұрын
  • I didn’t understand Jack sh-$:-t but sure I want to learn it. Can someone point me to the right direction?

    @TheFunDimension@TheFunDimension2 жыл бұрын
    • Check out learn.unrealengine.com/ to get started. There are some great beginner tutorials there.

      @LivelyGeekGames@LivelyGeekGames2 жыл бұрын
  • I have serious problem with this step. I don't understand why it always shows 2 errors: 1. "Server targets are not currently supported from this engine distribution." 2. "The command ""C:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles\Build.bat" FlybotServer Win64 Development -Project="G:\Flybot-main\Flybot.uproject" -WaitMutex -FromMsBuild" exited with code 6." May I know what I'm missing? I am using UE 5.0.2 and Visual Studio 2022

    @waihanlim6699@waihanlim6699 Жыл бұрын
    • I finally did it!😄

      @waihanlim6699@waihanlim6699 Жыл бұрын
    • @@waihanlim6699 how? I got the same problem

      @patricksiebarth1718@patricksiebarth1718 Жыл бұрын
    • @@waihanlim6699 would be great if you can share how you solve it

      @patricksiebarth1718@patricksiebarth1718 Жыл бұрын
    • ​@@patricksiebarth1718 You have to download source code of Unreal Engine Early Access from Github instead from Epic Games Launcher. First, you have to join EpicGames organization on GitHub. The instructions are below the link: www.unrealengine.com/en-US/ue-on-github Second: You may follow this tutorial to install UE Early Access: kzhead.info/sun/qquqXbyDb5-cmZ8/bejne.html&ab_channel=LivelyGeek Hope it helps. Have fun!

      @waihanlim6699@waihanlim6699 Жыл бұрын
  • when i copy you i get this error 2>Done building project "Flybot.vcxproj" -- FAILED. how can i fix it?

    @Madpvponline@Madpvponline3 ай бұрын
  • [/Script/OnlineSubsystemUtils.IpNetDriver] NetServerMaxTickRate=120 (for those who just want to copy it 9:58)

    @saityavuz76@saityavuz76 Жыл бұрын
KZhead