I am working on a game that's basically minecraft on a sphere. You can traval in one direction and end up at your starting location, and the ground curves away under you, so for example you would be able to see the top of a mountain before the bottom. The end goal is to have a game that's a mix of minecraft and kerbal space program.

Ofcourse, due to the fact that you can't perfectly project squares onto a circle, there are some interesting effects near certain areas of the map:
Wow, even just this is really cool!
Holy crap, that's amazing...

Now you need more screens!
This sounds like an incredibly fun concept. I'd be particularly intrigued if you could use one of the tessellation solutions for covering the surface of a sphere with regular shapes to distribute the edge problem (or perhaps uses non-cuboid blocks)? Can't wait to see what this is like with some terrain!
Looks awesome!

Yeah I guess using non-cuboid blocks would be a way to solve the issue, though at height this could get interesting...
I like this a lot.
You could use spherical shell segments instead of cubes, although that would certainly complicate the math a lot
Thanks guys! I have a very long way to go before the game is any ware near "playable". I still need to implement:
*Collision
*World Generation that actually looks nice
*Moving between planets and proper rendering of far-away planets.

Speaking of world generation though:
I have prototyped a new way of putting a grid of voxels on a sphereic-ish object. Here's a summery of the method I wrote:
Quote:

It is mathematically impossible to take a grid of squares an lay them flat onto a sphere. There are ways to lay grids of squares onto spheres, but they all create distortions. For example, Mercator projection, which maps the spherical earth to a cylinder, ends up distorting the size of land masses as you move away from the equator. Furthermore, it is impossible for Mercator projection to actually show the poles, as the pole will be infinitely far away from the center of the map

There are other projection methods I have explored (ei the method used for the original prototype):

This looks promising. Instead of using a single rectangular grid to map a cylinder to a sphere like Mercator, this uses 6 of them to map a square to a cylinder. This has an advantage over mercator: this projection, unlike mercator, can actually map the poles, Albeit with heavy distortion at 8 points on the sphere. On a side note, it is actually possible to map a rectangular grid of squares onto a torus instead of sphere, but i am not too fond of donut planets. Either way, for a minecraft clone, you want your blocks to be actual ... blocks, ei cubes, not some distorted notion of cubes.
This brings me to the "solution": Keep the blocks flat, like the surface of a rubix cube.

But how would you walk along the surface of such a cube? Say you are moving from the white plane to the red plane. If the 90 degree turn is "hidden" away, you won't actually notice the transition. However, as you are moving from the white plane to the red plane, you will notice that you will start with the blue plane to your left, and end up with the blue plane to your left, but turned 90 degrees. To further complicate matters, imagine you are standing on the red plane and looking at the corner:

the blue plane is to your right, the yellow plane is to your left, then what is in front? if you take and unfold the cube, you will see that that space is empty:

The "solution" here is to split the empty space along some line, and duplicate known faces into the space:

Ei:

Of course, the duplicated faces must also be rotated to "make sense". As you "pick" a face to go down, the magic separating line shifts, causing the "unknown" space to seamlessly morph into the "known space"

In the process, what was the "known" face has become the "unknown face". EI as you continue to move:

Now, how would you actually go about implementing this? Honestly, it wasn't hard. For a start, I already has code to handle a coordinate system on the surface of a cube. I just needed to expand it slightly to handle the "orientation" of a cube face. Rendering the duplicate region wasn't hard either.
Some simple shader code allows me to clip a model along a plane. Both of the regions (cube face) that should be in the duplicate region are rendered into the duplicate region (with correct rotation). The shader clips the first region to only be on one side of the plane, and the second region to only be on the second side. Of course the plane to clip along is simply determined by the camera position and corner of the face you are on.

TLDR: how to walk on a unfolded paper cube without falling into the empty space.
The minecraft on a sphere is a really awesome idea! Can't wait to see where you go with this. But honestly I can't even pretend to understand any of what you just said.
Incidentally, the cube-like projection is used by Google for geographic data and available publicly in the S2 geometry library. I don't know if it's appropriate for your needs, but it seems like it might be.

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» All times are UTC - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum