Gameplay
Cubic Chunks: Reduced lag, infinite height, and more [The #1 Suggestion Thread of all time!][Updated! 6/14]
Poll: Which parts of this system do you like?
Ended May 15, 2014
Poll: Which parts of this system do you NOT like?
Ended May 15, 2014
Poll: Do you support this system's implementation overall? (If yes, if
Ended May 15, 2014
Mostly moved on. May check back a few times a year.
THOU SHALT NOT INSULT NOTCH.
For real, he invented Minecraft and you're calling him stupid?
As it will be in the future, it was at the birth of Man
There are only four things certain since Social Progress began.
That the Dog returns to his Vomit and the Sow returns to her Mire,
And the burnt Fool's bandaged finger goes wabbling back to the Fire;
And that after this is accomplished, and the brave new world begins
When all men are paid for existing and no man must pay for his sins,
As surely as Water will wet us, as surely as Fire will burn,
The Gods of the Copybook Headings with terror and slaughter return!
-The Gods Of The Copybook Headings, by Rudyard Kipling.
Well, the Nether 8 blocks rule works on the Y-axis too, it's just that you'd need to go above bedrock to reach a higher position in the Overworld. Already possible because the Nether's ceiling was never raised along with the top of the map the first time, but with cubic chunks just considerably more evident.
[quote=Badgerz]You have to keep in mind that people are stupid.
[quote=Catelite]Just because you don't understand how something works, doesn't make it broken or pointless. >_<
Support.
Dude, don't make fun of Notch; he invented the game. You wouldn't be playing Minecraft if it wasn't for him. And besides, he's not even working on the game anymore. I don't think Mojang looks at these either.
It doesn't? Whoops.
[quote=Badgerz]You have to keep in mind that people are stupid.
[quote=Catelite]Just because you don't understand how something works, doesn't make it broken or pointless. >_<
I wasn't quite referring to all the Mojang staff, which are pretty experienced at what they're doing.
Excuse my lack of manners, this term might not have been appropriate to express what I was trying to say, which, in this case, is that Notch might not have the best of the coding skills/technical ideas. However, I must explicitely admit that the basic concept of minecraft are amazing, although, Minecraft has much more potential than what it currently is right now.
As I've stated earlier in this post, Minecraft's concept is amazing.
The server described below has been founded by me ( but is currently on a hiatus )
Pretty much this.
Bravo, to you, Calacbolg.
You seem to forget that chunks are never 100% full. The average height of a chunk is, in my opinion, around 70-80 blocks high. You would also need to include caves in those.
Yet again. However, this might be valid if the world generation changed or the building limit changed.
No matter what, the cubic chunks would win over those horrific 16x16x256 chunks. Seriously, how could a programmer not go over details like these?
Edit: Oops, I didn't realize those weren't recent posts.
The server described below has been founded by me ( but is currently on a hiatus )
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumTake the first block in the chunk as it is (e.g.: An integer which contains the block-data), then go trough all the other blocks, and check if they are equal to the first one, if they are, we throw away the entire chunk-data, and replace it with a single integer which contains the data of the first block.
In code:
int firstData = chunk.getData(0); boolean isAllTheSame = true; for(int i = 0; i < 4096; i++) if(chunk.getData(i) != firstData){ isAllTheSame = false; break; } // If isAllTheSame is true, the entire chunk consists solely of the data of firstData, so we only send firstData to the client. // If isAllTheSame is false, the chunk contains any random data, so we send the whole chunk to the client. // PS: This little piece of code is executed incredible fast thanks to the JIT-Compiler!The only bad thing is, that this only works for air chunks, and chunks that only consist of one material.
Meaning: Only air chunks, full-stone chunks, and full-water chunks will probably be affected by this.
But this can still give a massive performance boost if there is a lot of these "full" chunks!
(In the ocean, places under earth where theres nothing in the stone, and all chunks which are empty)
And otherwise said, this does not kill the performance of everything else, since its very small and simple.
And again another idea:
Store the chunks block-data in direct byte-buffers, it gives a lot of performance in sending/receiving/writing-to chunks.
Endianness doesn't matter in this case, since the byte-order is always, and has to be always, the same.
Have a nice day!
- Longor1996
Mostly moved on. May check back a few times a year.
It will work brilliantly in the nether, and in places with full chunks. Unfortunately it won't work well underground, where there are many things, such as ores, dirt, caves, and gravel, which will mess it up.
This is where we add other optimizations, like;
if chunk.getData(0) = chunk.getData(1) = ... = chunk.getData(n), then send "0 to n = ###'
Meaning that a chunk made 99% from one type of block would still get sent with less than 5% of the bandwidth requirement of an entire chunk made of random blocks.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Sorry for raining on your parade, but that won't really help, and here's why:
Other than all-air chunks, there aren't really any chunks that are entirely one block. In the overworld, the only ones that would be affected would be large chunks of stone, but there are ores enough to generally cause it to fail. In the nether, since there are random lava blocks, again, it generally fails. The lava ocean generally doesn't have complete 16-deep 16-aligned chunks. About the only place that would affect would be the end, and most of the end is air chunks anyways, which are already covered by the existing algorithm.
Also, it would come at a price, by definition, as does any compression algorithm. The act of requiring a flag for "this chunk is entirely a single block type" means that chunk network data would be larger for non-uniform chunks.
A better method would be to gzip / some other compression algorithm the chunk data before sending it over the network, if it isn't done already. They tend to be faster / have better compression ratios than home-brewed compression algorithms.
Or alternatively, use a true RLE algorithm.
You do bring up a good point. Though there are a lot of Air-Only chunks over the nether sea, where the lag is worst. Perhaps another way you could do it would be a layer-by-layer compression in each chunk. Where the same layers are saved smaller.