mindflayer Posted March 2, 2023 Share Posted March 2, 2023 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!! 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! 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: 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: 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 More sharing options...
EnigmaGrey Posted March 2, 2023 Share Posted March 2, 2023 Others have looked at using containers for PZ before. For example: https://github.com/Danixu/project-zomboid-server-docker You don't change the base game files to add custom spawn points. You modify the $userhome$/zomboid/server/ spawn_regions.lua file. It's not practical to have to decompress the entire map directory at runtime. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now