Server Physics Optimization
- Collider batching is no longer in use, but the code to check whether or not a collider is batched was still running and was extremely slow since there are now hundreds of individual colliders in any area of the map instead of the previous handful of batched colliders.
- Optimized code to get entities in a radius.
- Optimized code to look up entities from game objects or colliders.
- Optimized physics transform sync by batching FixedUpdate calls on identical components instead of executing them in a random order.
- Optimized player server updates by only doing a single transform synchronization for all players on a server.
Distance Tree Memory Optimization
Changed the way far away trees are networked to the client. This saves 300MB of RAM on a 4k map.
Client Inventory Optimization
Crafting UI no longer refreshes in the background even when it’s invisible and instead postpones this to the next time it becomes visible.
Server Packet Optimization
Getting the current machine time appeared to have gotten slower by an order of magnitude with one of the recent engine updates. We need the machine time for essentially every packet, so we had to replace it with a faster alternative that is still highly accurate (double precision) after days of continuous uptime. This fix made server packet handling significantly faster across the board, which is particularly noticeable on high population servers.
Monument Memory Optimization
Spawning in monuments requires many large assets to be loaded and processed when loading into a server. These assets contain all of the objects that need to be placed and the terrain that they need to be placed on. However, after the map is fully loaded, they are no longer required and can be unloaded from memory. It took a few attempts to successfully unload them without causing engine crashes or other errors but we found a way to sidestep those issues. From our testing this saves about 800MB of RAM.
When I first added the lasers to the auto turrets they didn’t seem to have much of an impact on client performance. But then zergs would put 87 into their base and anyone within network range would run at 30fps. Now laser updates are throttled to a small percentage of overall frame time.
The horse hitching post is now in game and is available as a default blueprint. Doubled the number of horses, so a 4k server will see 64. Giddy up!
Taylor Reynolds has completed a new, updated, high definition horse model and a bunch of breeds and Matt Isaac has updated the hair to be less Janky.
There was a bug in unity where setting the breaking amount or speed of the wheels on a vehicle would wake the vehicle up, even if the value was the same as last time, or even if it were 0. This meant that minicopters never went to sleep and were constantly eating up server performance. To make matters worse they are set to globally broadcast so that you can see them very far away. These two conditions meant that the servers was networking tonnes of data to every client for every minicopter every frame. This was extremely slow on the server and every client as well. The fix I’ve applied has improved server and client performance and also significantly reduced the amount of network traffic ( the minicopters were accounting for 40%!) testing indicates a framerate improvement of about 1ms or for the average user about 5fps more.
Adjustable Player Tick Rate
Two new optional convars for server owners:
- player.tickrate_cl – the rate at which players send their updates to the server
- player.tickrate_sv – the rate at which the server calls the player update
Adjusting these values should only be done as a last resort when nothing else helps and a server is nearly unplayable.
For a long time the Water Purifier has been unusable due to it being basically invisible You all should be able to turn salt water into nice fresh drinking water now!
A number of convars for video creators:
- cinematic_play “point” plays a cinematic animation called “point”
- cinematic_stop stops playing a cinematic animation
- cinematic_list prints a list of available cinematic animations
Also two new convars to disable the procedural eye animations:
- eye_blinking whether or not players should blink
- eye_movement whether or not players should move their eyes
Launching EU and US small servers
Today we’re launching an additional two Facepunch EU small servers bringing the total to three. Small servers run at smaller map size which slightly benefits lower end systems. Unfortunately, we’re unable to launch US small servers today but you can expect to see these live in the coming days.