﻿ Small World…Not Quite! « Stack Exchange Gaming Blog

# Small World…Not Quite!

This post is based on our Gaming Question of the Week #1!

You may have heard that Minecraft can theoretically generate a map 8x the size of Earth. Is that really possible? Our very own Jim wondered just that.

In Minecraft, presumably the world is finite. What happens when you reach the edge of the world? Or will the world become too large to reasonably deal with before this happens?

Rapida found Notch’s (the creator of Minecraft) answer to this exact question:

“First of all, let me clarify some things about the “infinite” maps: They’re not infinite, but there’s no hard limit either. It’ll just get buggier and buggier the further out you are. Terrain is generated, saved and loaded, and (kind of) rendered in chunks of 1616128 blocks. These chunks have an offset value that is a 32 bit integer roughly in the range negative two billion to positive two billion. If you go outside that range (about 25% of the distance from where you are now to the sun), loading and saving chunks will start overwriting old chunks. At a 16/th of that distance, things that use integers for block positions, such as using items and pathfinding, will start overflowing and acting weird.

Those are the two “hard” limits.

Most other things, like the terrain generation seeds and entity locations use 64 bit doubles for locations, and they do much subtler things. For example, at extreme distances, the player may move slower than near the center of the world, due to rounding errors (the position has a huge mantissa, the movement delta has a tiny, so it gets cut off faster). The terrain generator can also start generating weird structures, such as huge blocks of solid material, but I haven’t seen this lately nor examined exactly what behavior causes it to happen. One major problem at long distances is that the physics starts bugging out, so the player can randomly fall into ground blocks or get stuck while walking along a wall.

Many of these problems can be solved by changing the math into a local model centered around the player so the numbers all have vaguely the same magnitude. For rendering, Minecraft already uses local coordinates within the block and offset the block position relative to the player to give the impression of the player moving. This is mostly due to OpengGL using 32 bit floats for positions, but also because the rounding errors are extremely visible when displayed on a screen.

We’re probably not going to fix these bugs until it becomes common for players to experience them while playing legitimately. My gut feeling is that nobody ever has so far, and nobody will. Walking that far will take a very long time. Besides, the bugs add mystery and charisma to the Far Lands.”

So maybe 8x the size of Earth isn’t exactly right, but just to give you an idea of how big a Minecraft world can get think about this:  The distance from the center of the Minecraft map to the beginning of the Far Lands is about 31% of the circumference of the Earth at its equator. Just to get to the Far Lands (without cheating) it would take an estimated 800-900 hours of walking in one direction.

So what do the far lands look like? The Minecraft wiki has some excellent screenshots:

Filed under QOTW

• Macha says:

Those Far Lands pictures look really cool. I didn’t think buggy landscapes would have such a quick transition.

• Lucas McCoy says:

@Macha It is surprising that transition from normal landscape to the Far Lands is that sudden. However long before you get to the far lands you will notice odd behavior. This video shows what happens: http://www.youtube.com/watch?v=1i7fW2xRQng&feature=player_embedded

• Comments have been closed for this post