

Limit the rate at which clients send movement updates to the server.We set the limit to 25 in the lobby and 50 during gameplay. (Will be in 4.19) Added the ability to limit how many players receive updates from the server per frame.Reduce bandwidth for CharacterMovement RPCs when the character is not standing on any component, such as when jumping or falling. (Will be in 4.19).This prevents simultaneously connecting clients from overflowing these buffers resulting in excessive server load. (Will be in 4.19) Make the OS socket buffer sizes configurable and raise them for Battle Royale.Batched level streaming RPCs to reduce the number of RPCs that need to be sent to clients when they connect. (Will be in 4.19).Here are some of the dedicated server optimizations we made for the engine:
#Epic fortnite code
Much of this work was profiling and optimizing the game code but we also found many engine optimization opportunities along the way. In order to minimize CPU time and bandwidth we need send the minimum updates needed to provide a good experience for players. That means for each player we need to determine all relevant actors, figure out what has changed on those actors, and send a packet to that player with the differences. With every frame the server sends updates to all actors near that player. Our first challenge was to optimize the dedicated server so that it could handle 100 simultaneous players, maintain 20hz, and minimize bandwidth. Many will ship in Unreal Engine 4.18 this month with the rest shipping in 4.19. In the course of developing the Battle Royale game mode we’ve made many performance, memory, and workflow optimizations that not only benefit Fortnite: Battle Royale but every developer using Unreal Engine 4, especially those building games with similar requirements.Īll of these improvements are already available in both Perforce and GitHub.
