New chunk compression on Survival

Discuss anything you want about Minecraft here including our own servers
User avatar
Pri
Site Admin
Site Admin
Posts: 5433
Joined: Fri Dec 14, 2007 8:59 am

New chunk compression on Survival

Fri Apr 05, 2013 5:57 pm

I have activated a new chunk compression system in Spigot which claims to decrease bandwidth by quite a substantial amount by compressing blocks in to a single type of block when you're not close enough to see them.

For example when you drop in to our Survival server about 441 chunks are loaded. Each chunk is 16x16x256. That's 16 wide, 16 long and 256 deep (from bedrock to sky).

99% of what gets sent to you, you'll not see because it is underground. So we may waste 250KB of bandwidth sending your game client specific block information for all 441 chunks.

What this compression system does is convert chunks you can't see (the ones underground) in to stone. So instead of sending your client a data packet consisting of this:

1112120418182271161811291285681919283102401238021
8398712937921378492783497812934719278349732289035
8105834509829487129387491753082094810293875918374
5987912734921809812019212354565731209812389210292

Which would indicate all the different blocks in a chunk, it sends a data packet like this:

1*256

Which would tell your client to render stone 256 times in a row. The amount of data sent is thus reduced. Meaning your client loads faster. Minecraft already has gzip compression to make this possible built in so you don't need to modify your client, all this server-side stuff is doing is making best use of this compression by telling your client everything you can't see is stone instead of what it actually is.

So you're probably wondering, but wait, what happens if I start digging down in to the ground? Won't everything be stone? .. Well, no it won't because as you get within 5 blocks of one of these chunks that your client has been told is full of stone your client will receive an update for that chunk which tells it what the blocks really are.

And because we are only sending your client that one chunk and not 441 chunks our overall bandwidth use is greatly reduced. As much as 7/8ths. The net result is you login faster, you spawn faster, you teleport faster, warps are faster and your client will even have better performance as your client won't need to keep track of so many different voxels simultaneously.

And with these bandwidth savings we can better host the amount of users we currently have with the affects of lag setting in much later. But there is also another benefit. With all the blocks you can't see underground being set to stone it hides precious ores from cheaters who xray.

So thanks for reading hope this update was interesting! :)
jackerdelta
Legendary Crafter
Legendary Crafter
Posts: 209
Joined: Tue Jan 31, 2012 8:45 pm

Re: New chunk compression on Survival

Fri Apr 05, 2013 7:15 pm

I'd say that's a win win. Can't wait to see the changes and stuff :D
Image

Legendary Crafter 2016, Epic Crafter 2015-2016, City Planner 2013-2015, Architect 2012-2013, Apprentice 2011-2012
User avatar
Jayman0101
Supporter
Supporter
CPU: Ryzen 7 5800X
RAM: 32GB DDR4
Motherboard: ASUS TUF X570 WiFi Plus
GPU: ROG STRIX 3080
Display: 3440x1440 Dell S3422DWG
Cooling: CM MasterLiquid 240 AIO
Location: 'Murica
Posts: 144
Joined: Sat Apr 07, 2012 9:40 pm

Re: New chunk compression on Survival

Fri Apr 05, 2013 11:22 pm

I've noticed a substantial decrease in lag today, I think this did the job :) Thanks!
Image

Return to “Minecraft General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests