This Week In Veloren 172

4 minute read16 May 2022

Authored by AngelOnFira

This week, we hear about performance improvements being made to the game server. We also learn about balance changes to items and monsters. Finally, there is some work being done on water caves.

- AngelOnFira, TWiV Editor

Contributor Work

Thanks to this week's contributors, @GLawrence, @Sam, @zesterer, @BryantDeters, @xMAC94x, @holychowders, @Snowram, @Pfau, @HugoPeixoto, @Isse, @UncomfySilence, @markobekko, and @CheukYinNg.

Performance improvements by @xMAC94x

by moving chunk serialisation out of the hot loop

With the recent growth of our community, and hence our main game server, we were in need of some performance improvements. One of those planned improvements was moving the serialisation and compression of chunks out of the ECS. Serialisation is the task of moving the chunk data into a format that can be sent over the network from the server to the client.

For measuring the results we calculate a metric that basically says "how many cores would need to run at 100% when the game server would be under full load".

Let's assume we would have a 32 core server, that manages 37 ticks per second (TPS) with an 28% CPU usage. 37 TPS means the game server is at 30TPS/37TPS = 80% of its maximum capacity. We can then look at the full system usage 28% / 80% = 0.355. That multiplied by our number of cores gives us 0.355 * 32 = 11.36.

Graph of this tracked metric on our game server dashboard

This means that under a full load of our server we would parallelize everything to 35.5% and would reach a theoretical usage of 11 cores of our 32. For us as a server owner, it's important to optimize the software to parallelize more, as we still have to pay for 32 cores, even though we only "use" 11 of them.

The numbers above were the status quo before moving chunk out of the hot game loop. After the optimisation we reach a metric of 41.3%, or 13 cores. 2 cores don't sound much, but it's a 15% improvement which will help us to keep the tick times low and stabilize the server even with many people on it.

The cost for this optimisation is that chunk requests are now delayed up to half a second due to clustering multiple requests and only serialising them once.

This optimisation is only part of a series of optimisations that were done and will be written in smaller blog posts over the next weeks.

Balancing by @Chaseowski

I've made a bunch of balancing adjustments and tweaks, as well as redid or edited a lot of descriptions for most items, I am now much happier with them and item drop-rates etc now, but there's always room for improvements!

This involves more headgear, necklace stat balances, and drop-rate changes to items within enemy loot-pools, I also went ahead and moved some items around (such as straw hat and wanderers). Adjusted loot tables and drop rates involve creatures like rats, wolves, pirates, yaks, cattle, highland, salamander, and elbst.

You'll see a drastic change in Crown and Pirate Hat drop rates as well for those grinding those too 👀 You'll also notice changes to items tiers/color that should match how hard they are to get, or how good they are!

There's also a ton of other stuff, and there are over 123 changes to everything I did in total. I think I've covered the gist of them all here, but I am very excited to see how they work out! Enjoy!

Water caves by @Isse

I've been working on water caves. So now instead of a cave entrance in oceans being blocked off, you'll be able to enter. (Entrances in lakes will still be blocked off because of issues relating to water going through a cave to a lower altitude)

Right now they aren't filled with anything that makes them any more interesting than normal caves, but that will hopefully change soon.

The darkest of caves. See you next week!