# How to make a Minecraft like world round?

I'm interested in making a Minecraft-like voxel world that's spherical.

Idea is that there is a sphere which consists of cubes like in Minecraft but they are on the surface of it. The player can go around the world and come back to their starting point.

How can I build something like this?

• Possible duplicate: gamedev.stackexchange.com/questions/45167/… Jul 17, 2013 at 14:10
• A minecraft youtuber named Jeija did this project recently as a proof of concept in minetest, an open-source voxel game engine. Here is his video demonstrating the math behind this: youtube.com/watch?v=joFWr3JzBOI You can download a built version of the version here: github.com/Jeija/spheretest/releases This is not a full version, however, and there are some bugs, but at first glance it works great, with just some minor rendering issues. EDIT: As stated in the comments, the world is not actually spherical but toroidal. Jul 6, 2019 at 4:45

You can't represent a sphere by cubes in a nice way. There is always going to be a distortion.

The 'best'/easiest way would probably be a cubemap approach. Check out this page for an interesting discussion about it. The image about halfway down of a cube and sphere shows the distortion of the squares. It is quite large.

If you are not constrained to cubes, then this question recieved a lot of useful information regarding spherical representatons. Triangles or hexagons are a slightly better fit than cubes.

• Does anyone tried to "fold" minecraft-like world on sphere and calculated smallest distortion to make it look like flat? Anyway I mustn't go all down to center - just a layer. Jul 17, 2013 at 8:59
• You could try somethign like this to fake it: gamedev.stackexchange.com/questions/17567/… Jul 17, 2013 at 9:04

After 9 years I found nicer solution.

Since the world do not need to be ideal we can a bit "cheat" by allowing some error from ideal cube. Jordan Peck has proposed solution like this:

If we take just a splice of this solution we can create spherical worlds without "space folding".

Demo and more videos can be found here: Jordan Peck home page

If the player won't be able to ever see it as a sphere (eg. by going to high altitude), you can fake it. Make 'normal' voxel world, but wrap it at the borders. Trying to load chunk [-1, 5]? Return [MAX_CHUNK, 5]. Want to visit [MAX_CHUNK+1, 5]? Oh, you mean [0, 5].

This way you won't get nice "hills rising from above the horizon as you get closer" effect, but it can be seen by the player as a normal draw distance limitation. You also will not be able to dig a tunnel through the core of the planet. On the other side, programming it is pretty straightforward and it should work as fast as normal voxel world.

You can add shader warping the models as if the world was a sphere, but observed curvature might not match world's size.

• Note that applying this wrapping on one axis gives you a cylindrical world, and applying it on both axes gives you a torus-shaped world. You can still display it bent like a sphere locally like a Sonic 3 special stage but if the player maps out the connections between distant locations, the map they get won't correspond to a sphere. Aug 5, 2019 at 11:55
• Tetrisphere used this, made it look like a sphere, and casual players didn't realize it wasn't a sphere :) Dec 5, 2022 at 23:12