You NEED this if you want to make a multiplayer game in unreal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so you're an aspiring game developer you're working Solo or perhaps with a couple friends you pop Open YouTube and you start googling away on how to create a multiplayer video game in Unreal Engine because just like myself you love those sweet sweet multiplayer games that you play with your friends you see a couple posts and forums suggesting that perhaps perhaps maybe making a multiplayer game as your first game may not be the best idea you take those wise words from internet strangers into consideration and then keep searching for multiplayer tutorials you find a couple courses and tutorials you start following along and two weeks later you have a working prototype of your dream game you test it by yourself you test it with friends and all seems good it will never be because everyone has lied you're doing everything wrong but you are so unaware and you just keep going because this is gonna be so fun welcome everyone my name is Rory and I'm working on my first multiplayer video game for a couple months now I've been trying to document my progress and get at least one video out a month but I wasn't able to get the last few videos out for the very reasons that this video exists and probably why you clicked on the video today we're going to address the Trap of Unreal Engine we're going to address the Trap that no one talks about the Trap of using blueprints to create a multiplayer game if you already have a project going don't let this video stop you I encourage you to watch it through I'm using this video to explain my experience and the solutions that I found without having to scrap the last year of my work you may have started your journey by following tutorials on YouTube and learning from online courses when it comes to creating multiplayer game one of the most important things is Network replication which is the process of ensuring that all players in the game are in sync with one another so that everyone sees the same things Unreal Engine does a pretty good job at this even with blueprints build out pretty much anything using blueprint events that cast to the server and then the server will cast to all the other machines this is pretty much the flow of logic that you will find watching 95 of YouTube tutorials and for many multiplayer games that is fine but then we get to the Crux of this situation and the real trap that Unreal Engine blueprints don't account for custom movement specifically custom movement that doesn't already exist within unreal engines pre-made movement component when it comes to movement in general replication and keeping in sync is a complex task that requires a deep understanding of network programming but that's why we use blueprints because we don't want to learn C plus plus we just get the puzzle pieces and connect the strings and that's that but replication and keeping in sync with custom movement is not something that can easily be done using blueprints alone but no one tells you this or at least I didn't see anyone tell me because through every teaching material everything is just based off unreal's base movement component and before I go any further I want to make clear that I don't want to put these tutorials down I for sure wouldn't even be here today without I think these issues are quite a niche problem that I faced due to the fast movement of my gameplay and my blind naive determination to have unique custom movement on my first multiplayer game with blueprints those are a lot of things to throw together that you know they people just don't mention so Unreal Engine has its base character movement component you can run jump Crouch swim fly around those have already been built by the engineers at Epic to reliably handle these basic movement mode and it does a decent job that's why depending on the type of game some people never run into these issues but the default movement component is not designed to handle the specific needs of every multiplayer game for example you want to make a regular third person shooter game but in this game you can slide which is a pretty common thing in modern games but it's not so common that they've built it in to do this you need to build out your character in the blueprints and you'll do so using the previously mentioned method of casting to the server the server running the logic and telling everyone that play Ray is sliding you can build your whole character this way and it'll work each time you test it this is what my character blueprint used to look like because this is how I did everything I did running sprinting jumping crawling climbing swimming grappling everything so what's the issue by default when you run your game Unreal Engine does not test your multiplayer instance under real world conditions there's no packet loss no latency no separate processing times and it was when I discovered this and then I began testing with latency that I noticed everything breakdown in my year-long project blueprints lacked the important feature of client prediction or rollback networking which is crucial for smooth and responsive player movement for example with sliding when you press shift and control or whatever the input is you tell the server that you want to slide the server then starts applying that slide logic but because it runs on the server you need to wait for the server to apply the logic and then send it back to you if you're playing a multiplayer game where players are reacting real-time events you can't have this delay between your action and the response it's unpredictable it's not fair it feels clunky having to wait to throw a response so this issue of responsive gameplay is mostly sold by using rollback Network which is absent in anything built with blueprints by this point if you told me that I'd have to do any of this by myself I would have totally just given up because it very quickly just explodes beyond my comprehension and capabilities to code align so you have a project or you want to start one and Unreal Engine is the perfect engine for you but creating a proper multiplayer game just seems like such a huge task at this point and so I want to briefly explain my situation why I've kept going and then offer some suggestions to anyone in a similar position to begin my journey has been very unique to say the least I started early I started by myself and the only skills I had were my 3D animation and modeling after some success of my Prototype videos blowing up on Tick Tock over about the course of six months I entered into a funding partnership with landfall games pretty crazy and I'm really grateful for this unique opportunity and there isn't a day I wake up and don't want to work on the game the reason I'm quickly explaining this is because I know not everyone will have the same luxury of funding from landfall games that being said let me offer my solutions that I faced myself through my journey of creating a multiplayer game with the custom movement that I wanted solution number one learn C plus plus this one's a little bit of a doozy because it seems C plus is definitely one of the harder languages to learn especially for your first language I thought to myself if I just had enough knowledge to maybe read the existing code and duplicate some code to fit within my extra movement modes then that would be as deep as I need to go but ultimately I decided that this would take way too long for my projects timeline so then I moved on to finding another solution and I stumbled upon smooth sync smoothsync is a plugin that smoothly syncs clients over the network I did use this component in early prototypes for my physics-based Prop Hunt game mode and it worked really well and so when I was faced with this movement issue I thought I would try it again and it did indeed work the issue with this solution is because the code is on the client then it's client authoritative so while you don't really need to worry about rollback the movement calculated on clients makes it so much easier for them to cheat the reason I'm suggesting this is because I think it should be up to you whether you decide that your type of game needs to worry about cheaters for example if you're building Co-op experience games like a raft or the forest I think this approach would be okay because generally those games are just experiences to have have with your friends people want to cheat on those then that's up to them anyways after I tried both of these approaches I quickly stumbled on a different solution and which I think is the Holy Grail for my specific situation the general movement component here we go this is that juicy sweet sweet oh good good bit of this video the general movement component is a game changer for anyone looking to create multiplayer movement in Unreal Engine using blueprints the general movement component or GMC is a component that replaces unreal engine's pre-made movement component and it allows for seamless integration of your own movement logic it's seriously it blew my mind away once I got my hands on it once I had a very base character with some of my bass movement working in it I started simulating a multiplayer session with 200 ping and it did not break or look laggy at all after facing so much Jitter and lag issues with the previous movement component moving to this system and just watching it play a normal game but with 200 ping just it's just crazy it's just it's magic I don't understand it I don't comprehend it but it works and with this component it has client prediction replay interpolation and lag compensation I did have to rewrite my entire character from scratch so the entire thing is completely different from what it used to be and although the system is a little bit different to how you'd normally write a typical character if this sounds like a promotion it's not if you're in the market it just feels too good to be true even for myself after using it for the last three months but now the reason I mentioned my funding before is because this is not a cheap solution but I believe every penny is worth it if you are stuck like I was and serious about seeing your project through to the end without the need to teach yourself all of the underlying fundamentals of C plus and multiplayer replication then this component will benefit you the way I see it the developer has far more experience than I'll ever have focused on multiplayer movement replication they seem to know every nook and cranny of their component and the whole framework of network replication I could spend years trying to gain the same knowledge or use this pre-made framework as a reliable foundation for my game that will undoubtedly provide a better experience for players and at the end of the day that's all that matters so in conclusion if I'm being honest I do feel a little disappointed that I couldn't do it all myself but I'm just so grateful to have come this far and I don't know why no one ever mentions this I'm sure more in depth and specific multiplayer courses go into these topics and especially the ones that are C plus plus courses that focus on multiplayer gameplay but so many public tutorials that are just done in blueprints they just gloss over or don't even consider the network conditions when it comes to blueprint replication and so while Unreal Engine blueprints have literally saved my Game Dev career and can be a great tool for learning game development and prototyping it's been made clear to me that they're not well suited for creating professional feeling multiplayer games so I hope this video has shed some light when it comes to people teaching themselves character movement in Blueprints and at this point I'm probably just more annoyed at myself for not finding out sooner but you know we can't we can't blame the world for something that's only in our hands now that that is all sorted I will be returning to my regular YouTube videos and updates of my game if you want you can go watch my last video you can literally watch me run into these movement issues in real time and I had I didn't know what I didn't know what was happening at the time you can just what it's kind of embarrassing now that I think about it you can see me talk about these movement issues I'm just so unaware of them but I guess this video is making up for my past blunders and also go wishlist my games Spanky on Steam that's about all I have I could ramble on forever so I'm gonna go now goodbye [Music] thank you
Info
Channel: Rory
Views: 36,796
Rating: undefined out of 5
Keywords: unreal engine, game development, unreal engine blueprints, multilayer blueprints, ue4 blueprints, ue5 blueprints, ue5 multiplayer blueprints, ue4 multiplayer blueprints, indie gamedev, unreal engine 5 tutorial, unreal engine 5.1, game development unity, game devlog, game engine tier list, game development for beginners, multiplayer, multiplayer gamedev, coop gamedev, ue4 multiplayer tutorial, ue5 multiplayer tutorial
Id: YB_ew3j_HFw
Channel Id: undefined
Length: 10min 36sec (636 seconds)
Published: Tue Feb 21 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.