Jump to content

Rework Multiplayer server files & Compress worldmap


mindflayer

Recommended Posts

Hi devs,

I'm trying to containerize the PZ server to deploy it to a k8s cluster, and noticed that your game files are huge!!


2023-03-02-085522_517x113_scrot.png.75c7fe78b3c71cac6ba73efd2cdd9146.png

 

Uncompressed v compressed, the media directory is 4.8G -> 860M, or 5x smaller

 

An area we can focus on specifically are the maps. If we look at all of the `media/maps/Muldraugh,\ KY` dir, it's 3.9G!
2023-03-01-143451_412x144_scrot.png.6e5eba0d6cd88c39c1c2c67b8a34fff2.png

 

It's a large directory, but it's also doing 2 things at once, which might have been a legacy decision.
 

Muldraugh is a named spawn point, but unlike its 3 neighbors, it also holds the entire gameworld files. This is slightly annoying as a server operator, because if I want to modify the spawnpoints in Rosewood, it's very obvious where the work needs to be done:
2023-03-02-095655_701x172_scrot.png.be90da97c528230bf4ecb130c6bbd5b7.png


I can't say the same for Muldraugh. That directory is full of chunk data files that get in the way.

 

I think you should crowbar the functionality of Muldraugh being a named spawn point away from it storing the whole default world map. Doing so would be a nice quality of life improvement for server ops.

additionally, having the world map stored off somewhere else would allow you to compress (zip?) the big chunk files into a nice, single binary file that can get decompressed at runtime, without closing off tweaks to the spawn area.

 

Here's what that could look like:
2023-03-02-091110_588x116_scrot.png.5469412c74a551148dfff477738f16e1.png


It's not lost on me that right now the team is going through a major rewrite of the game for 42... Maybe now's the time to tackle a bit of tech debt?

If you want to talk more about this, I'm MindFlayer # 0001 on the Discord. Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...