How is the synchronization with latency and packet loss, i havent started my project yet but im wanting to have the networking flushed out I watched a video saying unreal engine has problems syncing custom movement and animations, is this still true in 5.3?
@unreal-dev-with-yaz10 ай бұрын
Hey :) These videos are showing just how you can manually handle some of the networking aspects using custom server and Unreal Engine This is mainly for educational purposes and in production HTTP would be quite bad for these events Here is a video about how you can sync motion using websockets, which is better than HTTP: kzbin.info/www/bejne/Z5_be4B-rMqAh6csi=EEaRWe-tG4KT4aZP UDP will still perform better, particularly when you have packet loss, but I’ve not covered that yet Unreal Engine has native networking implemented, which is advised to be used in most projects UE5 brought in a lot of networking improvements, but there can of course still be some issues which may be difficult to optimise Despite those issues, considering how simple it is to setup in comparison to creating manual network server, its very good
@janbataclan76882 жыл бұрын
Just a week passed, from part 3 to part 12. Not sure if I'm going too fast or going too slow, but one thing's for sure, I'm enjoying this. XD Though I noticed something after applying the updated commit after the one mentioned in Part 10, there's a delay in the movement? I'm guessing it's because I'm using MongoDB Atlas, the cloud one, that's why it's taking too long to update? I might have to try using a local one later before I proceed.
@unreal-dev-with-yaz2 жыл бұрын
hey! That's actually pretty fast pace :) Not sure which part you mean, can you point to the docs perhaps? but yes very possible that would cause delay as the server at the time would respond synchronously to the write. For synchronising motion specifically, it would be better to do them over websockets for those kinds of performance reasons which are covered in these chapters: Logging into the game from character selection: kzbin.info/www/bejne/jHekaWeogLSqp6c Synchronise motion part 1: kzbin.info/www/bejne/Z5_be4B-rMqAh6c Synchronise motion part 2: kzbin.info/www/bejne/b4m0k3Rpo61nr8U
@janbataclan76882 жыл бұрын
@@unreal-dev-with-yaz Hey! I just got home from work. I tried to setup a local MongoDB instance instead and using the cloud one was indeed the problem 'cause of the delay of the requests probably. But yeah, after setting up the local one, it's now smooth. I mean, the animation still stutters but at least it's better now. I'mma check the items and inventory implementations first before I head on the the websockets part. Gonna follow the full blog! Thanks again for this tutorial. ❤
@winchatheone2 жыл бұрын
login/spawn and move characters isnt a problem for custom server. the problem come when u plan to add a AI for monsters, etc. How u can implement it if u cnat access to map data on custom server?
@unreal-dev-with-yaz2 жыл бұрын
hey :) great question! so basically this is an indeed complex part for a server, so I'd suggest you implement it using Unreal or Unity using the great tools they already have. Basically In your game, you can create monsters (spawning can still be controlled via custom server for example) Assign monsters AI within UE itself. UE already has the concept of the map + the AI tools are really great. The trick is to still create UE as a server and add a toggle if the UE server has authority (docs.unrealengine.com/4.26/en-US/BlueprintAPI/Networking_1/HasAuthority/) I.e. if it has authority, then you can send all the monster updates to the server, which relays it all back to the users. essentially, UE will be almost like a 'player' controlling the mobs to your custom server. The way you keep it scalable is by creating maps and regions and assign them their own ID. Then you can create multiple concurrent UE servers, each one assigned its on ID to control. So each UE server can be in control of X amount of mobs. For small games and maps you shouldn't have to worry about that though. Perhaps I will make a video on this soon, but still got few things to cover till then! btw feel free to join this newly created discord channel where people can ask and answer similar questions in future hopefully! discord.gg/7CunWUU8
@winchatheone2 жыл бұрын
@@unreal-dev-with-yaz nice, so i was on the correct path too doing custom server structure. I dont thinked on that part xD so basically we need to cover the "server" part connect to our custom server for do the updates/etc we need on our custom server, is nice, thx for the hint/trick. 😉🤗
@ThapakornTantirattanapong2 жыл бұрын
There are several Java MMO servers out there you can use and they use TCP Socket I think it will be better than HTTP one? Or at least WebSockets is better than HTTP in my opinion.
@unreal-dev-with-yaz2 жыл бұрын
yep that's right, web sockets are better for real-time applications like this. But I am not sure if they're new starter friendly. The purpose here is to kind of demystify what happens under the hood of the server - there's some very good open source servers available which should be used rather than starting from scratch :)
@ThapakornTantirattanapong2 жыл бұрын
@@unreal-dev-with-yaz but anyway your tutorials are a good for learning, thank you for hard work on this series. Maybe in the future will have the transfering this HTTP to TCP Socket or WebSocket? It should be the best series :)
@unreal-dev-with-yaz2 жыл бұрын
recently I changed these over to websockets btw :) Logging into the game from character selection: kzbin.info/www/bejne/jHekaWeogLSqp6c Synchronise motion part 1: kzbin.info/www/bejne/Z5_be4B-rMqAh6c Synchronise motion part 2: kzbin.info/www/bejne/b4m0k3Rpo61nr8U
@Funktionreal2 жыл бұрын
Yaroslav! Will you be continuing this MMO server set up? I am extremely interested in the backend and have recently stumbled across your videos. I have looked everywhere to get an understanding on how to set up a backend for an MMO and your videos and blog posts seem to be the only resource for people like me who has no experience. Please tell me you plan to continue 🙏🙏. Also do you have discord server? I would very much like to follow all content you release. Thanks for the info, fantastic!
@unreal-dev-with-yaz2 жыл бұрын
I share your pain with finding documentation! :D I will look to continue it to some degree and would also like to avoid re-inventing the wheel where possible. To be honest I was waiting Atavism to add support to UE and maybe work off the back of that: atavismonline.com/atavism/atavism-for-unreal-project However that may not happen until some time next year so perhaps I will continue these until that's ready.
@Funktionreal2 жыл бұрын
@@unreal-dev-with-yaz i would VERY much like to watch this and learn from you. Backend completely baffles me and i really want to learn the process. So PLEASE consider continuing this :). Also if you have a discord please link :)
@unreal-dev-with-yaz2 жыл бұрын
@@Funktionreal ok cool I will have a think about next episode content :D For now I haven't created discord server but will consider in near future
@kenreed14672 жыл бұрын
I really enjoy this, you have done some awesome work. I do believe your update character & nearby characters is too taxing when you have alot of networked actors. I would mark them 'dirty' upon change and just update those that are 'dirty'. Otherwise your bandwidth usage per player will be high with unnecessary updates when networked actors have no change. Ie player standing still.
@unreal-dev-with-yaz2 жыл бұрын
you're absolutely right :D this is a base implementation and there should be many optimizations that should go on top of it (or change it pretty much entirely) some implementations will only send updates upon any changes registered. e.g., with third person controller, when you're pressing the 'move forward key' it will send that request to server to 'move' the character and the pawn that you have is not actually controlled by the button, but via the response from server. there are many flavors of client-side optimizations (e.g., evaluating if there's a diff and only sending the diff). In this approach, getting 'nearby players' should be disassociated from the update. then you should also consider server-side optimizations - bear in mind if you have 1000 players and each one is trying to fetch many 'nearby players' which are individual calls to db - this is also very taxing. so, you may look to put a lot of this info on cache layers and fetch from cache, with cache lifecycle being very short and also, you'd be able to spin up multiple servers, sharing that cache
@unreal-dev-with-yaz2 жыл бұрын
btw I recently made such a change with websocket implementation, which would be a lot more efficient than the one displayed here. kzbin.info/www/bejne/b4m0k3Rpo61nr8U Of course can still be even better but I think its good to show 'how' these can be optimised
@nawradislegend68732 жыл бұрын
я понял,ну ты вроде на русском должен говорить,я просто уже 4 месяца голову себе ломаю,хотел узнать может сможешь помочь?
@unreal-dev-with-yaz2 жыл бұрын
Привет! да, я немного говорю по-русски, но я живу в Великобритании более 20 лет, так что мой русский определенно уже не так хорош. Но если у вас есть общий вопрос, задавайте, я не могу гарантировать, что узнаю ответ, но давайте посмотрим