Networking in UE4: Server Optimizations | Live Training | Unreal Engine

  Рет қаралды 38,744

Unreal Engine

Unreal Engine

5 жыл бұрын

This week we'll be joined by Ryan Gerleve and Dave Ratti to discuss general server optimization in UE4, as well as techniques and solutions to improve your Actors' performance in a networked environment.
NEWS
Unlocking Breach’s combat with Unreal Engine
www.unrealengine.com/en-US/te...
Mutant Year Zero - from pen-and-paper RPG to pixel perfect post-apocalypse
www.unrealengine.com/en-US/de...
Optim leverages the power of Datasmith to take the pain out of data-prep
www.unrealengine.com/en-US/bl...
Get ready for the 2019 Global Game Jam
www.unrealengine.com/en-US/gl...
COMMUNITY SPOTLIGHT
What Never Was
forums.unrealengine.com/commu...
FrostRunner
store.steampowered.com/app/93...
Baroque Room
forums.unrealengine.com/commu...
ANNOUNCEMENT POST
forums.unrealengine.com/unrea...

Пікірлер: 46
@HangryBunniesFromMars
@HangryBunniesFromMars 5 жыл бұрын
26:00 That "waste" variable is pure gold! Thank you!
@nguyensong5506
@nguyensong5506 5 жыл бұрын
Thanks so much, this is the most helpful live training about networking
@Protonwar
@Protonwar 5 жыл бұрын
Thank you Epic! Always appreciated :-)
@Drakuba
@Drakuba 4 ай бұрын
I really dig these, seeing theres no script and you guys go on they fly really speaks volumes impressed by the Dormancy system, as someone whos making RTS with destructible building and dynamic environment im really happy about that system. Now i just need to learn how to use it properly, but knowing is half the battle so they say :P
@skaalfort
@skaalfort 3 жыл бұрын
A lot of gold nuggets in this video.
@iamisandisnt
@iamisandisnt 5 жыл бұрын
Yay, something to pull me away from playing too much Everquest 1999 :D
@reallyhu2906
@reallyhu2906 3 жыл бұрын
The player movement is lag when I use standalone mode. Even the thirdperson template. Is it my network problem or project setting problem? Any solution?
@narendur_
@narendur_ 5 жыл бұрын
I'm trying to understand the difference between Set Net Dormancy "DormantAll" and Flush Net Dormancy. They look awfully similar inside of the source code as well. Anyone knows when you'd use which?
@JimmyCougar
@JimmyCougar 5 жыл бұрын
I am only guessing and am focused on the Flush name. As in it doesn't set DormantAll or anything, but resets or gets rid of the Dormancy setting. You'll have to test it yourself.
@Deck_Dynasty
@Deck_Dynasty 5 жыл бұрын
From the way I understood it, the only difference is that Flush Net Dormancy does the same (sets to dormant all) but, before doing so, also replicates itself over the network once immediately to replicate itself to all clients.
@kaptenmugg
@kaptenmugg 5 жыл бұрын
The function SetNetDormancy sets an actor be dormant i.e. it removes it from the list of active network objects. When you change a replicated property in C++ code you must call FlushNetDormancy in order for that actor to be replicated. What happens when you call FlushNetDormancy is that the actor is put back in the list of active network objects
@Deck_Dynasty
@Deck_Dynasty 5 жыл бұрын
If a player outside an actor's Net Cull Distance Squared then comes into range of an actor which had Flush Net Dormancy called on it while the player was out of range, am I to understand they will not see whatever property was updated? Example: I change the color of a dormant building on the game map, then call Flush Net Dormancy to update it. A player from the other side of the map makes his way over. Will he see the original color or the new color? It seems like a huge optimization, but if it's the former, I can't see the use case for it.
@kaptenmugg
@kaptenmugg 5 жыл бұрын
If the player comes in range and the actor was waken up from dormancy (flushed) then the player will receive these changes, if the player is more then the NetCullDistance then it will not be replicated to that player unless you have set AlwaysRelevant to true. If the actor is AlwaysRelevant then the engine will replicate that actor no matter how far your player is from that actor. This check is done in the function IsNetRelevantFor in ActorReplication.cpp.
@LuizGamingYT
@LuizGamingYT Ай бұрын
Hey, I thought of such a system: Singleplayer game and saving the character, current map, etc. on mysql server where the data will be sent via VaRest plugin to a PHP file which will be a validator whether the character has definitely gained such experience and items and trading in singleplayer game will be possible, because the game will send and receive data, so it will be possible to do chat/trading between players. Can such a solution make sense? It will save a lot of costs, because there will be no need for a dedicated server or vps. Everything would operate on detailed validators. what u think?
@ryanw8985
@ryanw8985 3 жыл бұрын
How would I manually set latency for testing multiplayer? The things I have found online dont see to work. Thanks.
@programthis3805
@programthis3805 6 ай бұрын
2 years ago comment..but if you set the play mode to listen server go into editor preferences and search network...there is a simulate network setting
@iamisandisnt
@iamisandisnt 5 жыл бұрын
TIL (yes 1 day later) how initial dormancy works. Sweeeeet
@esotericgamedev
@esotericgamedev 2 жыл бұрын
Can anybody give some examples of reasonable versus unreasonable OutgoingBandwidthSizeSec from the network profiler? I have some rubberbanding in my game but I'm not sure if it's a network bottleneck or another issue
@jcdentonunatco
@jcdentonunatco 2 жыл бұрын
my project grinds to a halt with a mere 4.8KB/s. The engine should be able to handle that no problem. Perhaps its my settings, who knows, would also love more insight
@Thoriumus
@Thoriumus 5 жыл бұрын
I have a problem with joining a server that has a lot of replicated actors on the map. It's kind of hard to reproduce because it's not happening in the editor but only if i have multiple players on a server, which played for a while. The more enemies and the more items on the ground, the more likely the client will crash on join. If that happens it's constant, crash on every try. However all players, who are already joined have no problem and can keep playing just fine without any glitches. Only new clients trying to join crash. Any ideas what could cause this? Do i need to take special care of actor replication on join? Or any ideas how i could debug this, i am kind of new to C++ (worked mostly in other languages) and Visual Studio.
@Deck_Dynasty
@Deck_Dynasty 5 жыл бұрын
My guess is it's a timeout issue: your server trying to perform a join process for too long and the base ue4 code deciding it's taking too long and cancelling it. It's likely due to one of the accumulations/leaks they mentioned: actors, timer handles, or something else being created and never destroyed. One solution which most games seem to do is downtime the servers for "maintenance" once/day. In terms of finding the source, I'd love to know if you figure out a way.
@kaptenmugg
@kaptenmugg 5 жыл бұрын
We have experienced this exact problem on Xbox and PS4 and the problem was that there was a huge spike of data when the client joined the game. This was due to having all the Net GUIDS being replicated when the client joined the game, these network GUIDS is not taken in to account when the engine checks if a connection has been saturated or not. One way to mitigate this is to set AlwaysRelevant to false on as many actors as possible. Use the Network Profiler as described in the video and look for big spikes in the beginning of your recording and you can see if it might be related to that.
@Thoriumus
@Thoriumus 5 жыл бұрын
@@Deck_Dynasty So, i figured it out. It's not a time out issue. The problem is that everything seems to be replicated pretty chaotic from the server to the client. Something can be replicated before something else it depends on. Even the NetDriver can be nullptr on the world object in a replication notification. I used World->GetNetMode don't referencing it from the world works, you can't expect the world to be initialized on replication. You even can't expect BeginPlay was called on an actor before it's properties notifications are replicated. It gets very messy to fix this all. Basically you need checks everywhere if stuff you need is already initialized and if not save it for later.
@Deck_Dynasty
@Deck_Dynasty 5 жыл бұрын
@@Thoriumus What a nightmare! How is this not part of the base code? God. Glad I'm hearing this from you now rather than later, but wtf... we need to figure this out.
@Thoriumus
@Thoriumus 5 жыл бұрын
@@Deck_Dynasty I implemented an event buffer to catch most of it. In some cases it's just checking objects for validity and skipping the code that operates on them. In many cases things sort themself out on a later replication notification after all is initialized. However for BeginPlay you really need to add some code it. Basically i check if it was been called for this actor and if not push an event to a event stack and on the end of BeginPlay i have code that works though that stack and calls all the functions. // If BeginPlay was not called, buffer the event for later execution. // This is specificly for cases in which client RPC's are called befor BeginPlay. if (BeginPlayCalled == false) { GEngine->AddOnScreenDebugMessage(INDEX_NONE, 10.0f, FColor(0, 255, 0, 255), TEXT("RPC befor BeginPlay")); FItemEventBufferEntry Event; Event.Type = EItemEvent::Drop; Event.Vector1Param = Location; Event.Rotator1Param = Rotation; EventBuffer.Add(Event); return; };
@guxxus
@guxxus 5 жыл бұрын
13:30
@psalm702
@psalm702 2 жыл бұрын
Reliable RPC @ 1:08:15
@ROSALIEIK
@ROSALIEIK 10 ай бұрын
reading scripts is hard isnt it
@thomase5286
@thomase5286 4 жыл бұрын
Lmao do u plan on updating the fps project
@perpetuaL524
@perpetuaL524 3 жыл бұрын
?
@thomase5286
@thomase5286 3 жыл бұрын
@@perpetuaL524 project in back ground needs update 19:00 its like 6yrs old lifetime in solfware
@perpetuaL524
@perpetuaL524 3 жыл бұрын
@@thomase5286 I think they update it? www.unrealengine.com/en-US/tech-blog/redesigning-audio-in-unreal-engine-s-shooter-game-sample-project?sessionInvalidated=true
@thomase5286
@thomase5286 3 жыл бұрын
@@perpetuaL524 They updated an aspect of the project - and not the features the project was show casing
@netpeggle4458
@netpeggle4458 5 жыл бұрын
I belive Amanda is a Bot... Just sayn.
@Deck_Dynasty
@Deck_Dynasty 5 жыл бұрын
I bet she's never heard that one before.
@netpeggle4458
@netpeggle4458 5 жыл бұрын
@@Deck_Dynasty yeah must be a super overused joke :D
@davidencarnacion5020
@davidencarnacion5020 5 жыл бұрын
sever for latinoamerica in fortnite i have 120 ping is unplayable
Multiplayer in Unreal Engine: How to Understand Network Replication
22:08
[柴犬ASMR]曼玉Manyu&小白Bai 毛发护理Spa asmr
01:00
是曼玉不是鳗鱼
Рет қаралды 42 МЛН
Normal vs Smokers !! 😱😱😱
00:12
Tibo InShape
Рет қаралды 112 МЛН
Cat story: from hate to love! 😻 #cat #cute #kitten
00:40
Stocat
Рет қаралды 7 МЛН
Demystifying Soft Object References | Inside Unreal
1:27:51
Unreal Engine
Рет қаралды 83 М.
Blueprint Optimization | Live Training | Unreal Engine
1:01:17
Unreal Engine
Рет қаралды 37 М.
Network Multiplayer Fundamentals | Live from HQ | Inside Unreal
1:52:10
Unreal Engine
Рет қаралды 103 М.
YOU'RE LEARNING UNREAL ENGINE 5 WRONG
5:09
Crimson
Рет қаралды 79 М.
Female Cop Shoots Man After He Tases Her Dog
17:09
Vigilant Cam
Рет қаралды 2,2 МЛН
Action RPG: Gameplay Abilities System | Inside Unreal
1:28:24
Unreal Engine
Рет қаралды 56 М.
Nanite for Artists | GDC 2024
22:09
Unreal Engine
Рет қаралды 84 М.
I Made The SAME GAME in 3 Game Engines
6:34
velander
Рет қаралды 476 М.
Dynamike 1v3 Challenge 💣
0:38
Toodyxz
Рет қаралды 5 МЛН
Maze Challenge with Sonic and Knuckles #minecraft #sonic
0:22
SonicCraft
Рет қаралды 10 МЛН
MAZE CHALLENGE With HEROBRINE and NIKOCADO AVOCADO
0:20
Mazizien
Рет қаралды 14 МЛН