Page 1 of 2

Taller, Slower, Larger!!

Posted: 20 Jul 2011, 02:41
by Blackadder51
I am really surprised this is not posted yet,

Anywho are you tired of the small 128 hight limit? Well according to a new blog post from Notch himself so is he.
18heightmap.png
Spoiler! :
Notch wrote:Sharing an interesting email
I briefly talked to the crazy engineers over at Bat Country Entertainment about mods that alter the height limit in Minecraft. Ryan send me this interesting email about what different tradeoffs there are, and his experiences working with it
:

Very cool! Off the top of my head, here’s a list of the main points:

Implications behind changing height:

- Memory Implications: Due to the way chunks are architected internally, the only relatively-easy way of increasing level height is to double it. As a result, memory usage can spiral out of control very quickly when increasing the number of bits available to the Y axis. A somewhat short-sighted view would be to point out that this is wholly manageable in SSP, but pragmatically, SMP is already a hornet’s nest when it comes to RAM usage, and the only way to increase the level height would be to neatly double the memory footprint. Ouch!

- CPU Implications: Chunk terrain generation occurs in pieces on the X/Z plane, but expects the chunk to be fully populated along the Y axis, from bedrock to sky. To be fair, much of this can be mitigated by the fact that any terrain above a certain cutoff can be assumed to be completely air, and any terrain below a certain cutoff can be assumed to be completely stone, thus eliminating the need for temperature / humidity / biome calculations far down in the level or high up in the level. Nonetheless, it’s still a cache-thrashing memory-fill operation. Worse still, due to the fact that subterranean features are populated per-chunk, to maintain a consistent distribution of ore you would need to double the number of calls made to any given feature generator as well for each doubling of the Y axis. While this is relatively cheap for things like ore, it’s eclipsed by the idea that cave generation would need to occur along the entire Y axis, and being a recursive function, this has the potential to get very costly very quickly.

- Storage Implications: Anything stored in memory needs to be serialized to disk and read back from disk. Given the fact that in SSP, the number-one performance killer - even on my beastly computer - is disk I/O, it would be a highly questionable idea to double the amount of data that needs to be written out to disk. I’m not completely sure if chunks are gzipped before being written to disk, or if that only occurs to chunks when transmitted over the network, but if they are, this simply robs from Peter to pay Paul - it mitigates the disk I/O issue while increasing the enormity of the CPU issue.

- Network Implications: On SMP, Chunks need to be sent to many more people many times more often than in SSP. It can be taken for granted, from a client’s perspective, just how much data needs to be shoved around by the server, and although network packets are gzipped, it’s still an additional networking load, and still an additional CPU load as well.

Regarding changing the level height, it was “easy” to the extent that it took me around 4 hours yesterday morning to do it, but only because I’ve been poking around the engine internals since January and have been mentally keeping track of all of the assumptions in the code on exactly that topic. From top to bottom:

- Search through the codebase for « 11 and « 7, replace with « 12 and « 8 as necessary.
- Search through the codebase for 128, this will hit the majority of places that assume the map height as being 128, such as tile height checks.
- When changing the above locations, save yourself a recompile and make sure to change any variables from bytes to shorts or ints if you’re increasing them past 128. Being a C++ engineer, I keep forgetting that everything is implied as signed in Java.
- Search through the codebase for 127, this will hit the remainder of places that assume the map height as being 128.
- Search through the codebase for 64 and 63, this will hit the places that assume sea level is at 64, as well as Iron’s ore generator height cutoff. Personally, I dialed sea level up to 96 from 64, rather than fully double it up to 128, in order to have 32 additional tiles’ worth of water height, but have an entire 96 additional tiles’ worth of land height.
- Fix up the level feature generators for Redstone, diamond, gold et al.
- Visually grep through all of the level feature generator classes, doubling the RNG baseline and spread for each one.
- Change a few instances of 32768 to 65536 to accommodate 16*256*16 rather than 16*128*16.
- I’m not sure how much of this is a result of JAD and how much of it is actual code, but there are a few instances of “char whatever = ‘\200’;” in the MCP codebase, change it to a short or int containing 256 instead of 128.

I have to say that the game was *remarkably* performant with the Y height pushed up to 256. I imagine 512 might not be too bad on my beast of a machine, either, though 1024 would be pushing it. That said, one of my short-term “just for fun” goals is to see if I can’t get the Nether to populate from 0-127, the main world from 128-255, your Sky dimension from 256-383, and then that one group of modders’ new dimension, the Aether, from 384-511. That would be epic.

Additionally, there’s a mod that some guy made that re-works chunks to be 16x16x16 (it appears), but I’m rather nonplused by it. The bug list is as long as my arm, and it doesn’t actually rescale any of the terrain-generation features, so you don’t get neat things like this: http://moogle-tech.com/bce/gorge.png

As a result, I’m in the process of just trying to re-do what he did on my own. I’m filling all chunks above Y=256 entirely with air, filling all chunks below 0 with stone, manually invoking the cave generator, and theoretically things should just work. In principle, theory is a flimsy thing to go on, and to that end I’ve been chasing down bugs for the past 4-5 hours. At present I’m able to get in-game, but the chunks are horribly mis-arranged, so I suspect I’ve missed an important hashing function somewhere, since that would also explain why it’s spitting out reams of “Wrong location!” exceptions that it’s spitting out whenever it tries to spawn animals - the level provider is providing the wrong chunk.

<snip>

Cheers,
- R

posted 20 hours ago
Really though this got me the most excited,
That said, one of my short-term “just for fun” goals is to see if I can’t get the Nether to populate from 0-127, the main world from 128-255, your Sky dimension from 256-383, and then that one group of modders’ new dimension, the Aether, from 384-511. That would be epic
That is a world that is four times higher then now. 0-511


And this should make Wokka cry,
Implications behind changing height:

- Memory Implications: Due to the way chunks are architected internally, the only relatively-easy way of increasing level height is to double it. As a result, memory usage can spiral out of control very quickly when increasing the number of bits available to the Y axis. A somewhat short-sighted view would be to point out that this is wholly manageable in SSP, but pragmatically, SMP is already a hornet’s nest when it comes to RAM usage, and the only way to increase the level height would be to neatly double the memory footprint. Ouch!
Also I really feel like chicken, do you?
18chicken.png

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 02:51
by Pinmissile
Delicious.

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 03:41
by aflycon
> go to future shift
> find nice floating island using jumpass
> island is at 128
> do some terraforming
> island is at 120
> still can't build anything tall
> keep terraforming
> island gone

Image

In other words, thank you, Notch.

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 04:34
by xidontcarex
im excited,that means even more crazy supertall skyscrapers, i would totally make a ladder to 511 and then jump to 0 XP

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 04:43
by michaeld20
Now we need ICE PICKS!!

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 04:44
by Iron_Fang
what about the airships from blue xephos's yogbox they sound cool

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 04:46
by Hytro
ooooo, with this I can finaly make my super nether tower design :o
Made the design, then to realise that mc does not have the hight I need... so it was filed under the Secret Stuff folder... and I can make a really bad ass nether world to...

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 05:57
by Skunk_Giant
:O AWESOME!

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 06:35
by vallorn
wait... wouldnt that mean we could have IC not in a crater and have plenty of space under it for dungeons and stuff? :D

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 07:49
by Hytro
O_O we could make the sewers (NO IDEA HOW TO SPELL IT)

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 08:15
by Aenir_bEPU
Hytro wrote:O_O we could make the sewers (NO IDEA HOW TO SPELL IT)
You spelled sewers correctly.

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 08:30
by Hytro
Aenir_bEPU wrote:
Hytro wrote:O_O we could make the sewers (NO IDEA HOW TO SPELL IT)
You spelled sewers correctly.
Yey, I'm so awesome :D

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 10:17
by random980
I could raise the height of solar city so its ACTUALLY in the sky!! AND I WOULD STILL BE ABLE TO BUILD SKYSCRAPERS ON IT! :D :D :D :D :D :D

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 10:28
by aflycon
vallorn wrote:wait... wouldnt that mean we could have IC not in a crater and have plenty of space under it for dungeons and stuff? :D
We could copypasta it up pretty easily with Regions, but that would break Blacks' rule of "no mod tools".

Still, that'd be really damn cool. :o

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 10:37
by Cho
Despite the 'coolness' of it - did no one read the section where Notch basically admits it's an smp server killer?? If he does make this change, I hope to heck that it's optional to turn it off; because it will kill us. We're already shrinking the border on Terra because it's too large. And he's talking about quadrupling the size with those proposed changes.

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 10:44
by Wildwill002
It'll kill us not only on memory but also on exclusives. If the skyworld is accessible to anyone with enough dirt for example then anybody can walk in and it would no longer be exclusive to vips

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 10:47
by Lord_Mountbatten
You honestly think Skyworld can be accessed that way?

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 10:48
by vallorn
aflycon wrote:
vallorn wrote:wait... wouldnt that mean we could have IC not in a crater and have plenty of space under it for dungeons and stuff? :D
We could copypasta it up pretty easily with Regions, but that would break Blacks' rule of "no mod tools".

Still, that'd be really damn cool. :o
your already shoving it into its own world ;)

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 11:31
by aflycon
Lord_Mountbatten wrote:You honestly think Skyworld can be accessed that way?
That is what's being implied by Notch. However, ours is different.

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 11:53
by Tulonsae
I noticed that it would kill our server. I also noticed that if Ryan was working with Notch's source code (and not something disassembled), that Notch has some really horrible coding habits.

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 12:12
by donkypoink
oehh, does this mean my crippled cathedrals towers wont be crippled anymore :o

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 15:47
by Sti_Jo_Lew
It would be nice to have a larger hieght limit, then I could expand my project upwards so it has more than 5 floors.

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 16:59
by Blackadder51
Uh yeah cho thats why i bolded it

Re: Taller, Slower, Larger!!

Posted: 20 Jul 2011, 20:27
by Lathania
Cho wrote:Despite the 'coolness' of it - did no one read the section where Notch basically admits it's an smp server killer?? If he does make this change, I hope to heck that it's optional to turn it off; because it will kill us. We're already shrinking the border on Terra because it's too large. And he's talking about quadrupling the size with those proposed changes.
128 will remain as default, it says.

Re: Taller, Slower, Larger!!

Posted: 21 Jul 2011, 02:49
by nart_21086
just wondering, was that first image enhanced in any way, or will notch program tall structures to 'bend' like that?

Re: Taller, Slower, Larger!!

Posted: 21 Jul 2011, 05:14
by derigin
I'm going to put this out there, and beat the dead horse, but...

... before notch goes ahead and does this, perhaps he ought to get someone to fix the problems associated with running MC on Java, first.

Re: Taller, Slower, Larger!!

Posted: 21 Jul 2011, 06:13
by mydrox
derigin wrote:... before notch goes ahead and does this, perhaps he ought to get someone to fix the problems associated with running MC on Java, first.
... before notch goes ahead and does this, perhaps he ought to get someone to fix the problems associated with running MC, first.

Re: Taller, Slower, Larger!!

Posted: 21 Jul 2011, 07:56
by vallorn
mydrox wrote:
derigin wrote:... before notch goes ahead and does this, perhaps he ought to get someone to fix the problems associated with running MC on Java, first.
... before notch goes ahead and does this, perhaps he ought to get someone to fix the problems associated with running MC, first.
... before notch goes ahead and does this, perhaps he ought to get someone to fix the problems associated with running first.

Re: Taller, Slower, Larger!!

Posted: 21 Jul 2011, 09:06
by Notch
Problem?

Re: Taller, Slower, Larger!!

Posted: 21 Jul 2011, 09:08
by Lord_Mountbatten
You can email the user Notch at thefakenotch@hotmail.com apparently.

...huh.