Designing a 4D World: The Technology behind Miegakure [Hide&Reveal]

The world we are building in Miegakure is
a world in which there are four spatial dimensions instead of three. In this game, the fourth
dimension is not time but a fourth dimension of space that works just like the first three
dimensions we are familiar with. If you count time, this game is 5D! In this video we will
talk a little bit about the unique technology we developed for the game. So, at first games were only 2D and took place
solely along two directions. Then computers became powerful enough to render 3D graphics
and this allowed for full 3D movement. Of course, the graphics we see, while they
are computed in 3D, are actually displayed on a 2D screen. They are projected down from
3D to 2D, in a way that mimics how our eyes perceive the third dimension. But it doesn’t stop there. If in a 2D game
every object’s position is represented in the computer using two numbers, and if in
a 3D game every object’s position is represented using three numbers, what if each position
was represented using four numbers? In other words, what if there was another direction
you could move along, in addition to the first three? Trying to answer this question is what
that led us to develop this game. As far as we know, our universe has exactly
three spatial dimensions — so it’s difficult for us to picture what a four-dimensional
world would look like. But a computer, on the other hand, does not care; it’s just
working with numbers as usual. So we had to come up with a way to display this calculated
4D world so that our three-dimensional brains could comprehend it. The way we chose is a method that has been
popularized in the novella Flatland. This novella talks about a 2D square that can only
see a 2D cross section of a 3D world. For the square, the third dimension is invisible
and mysterious; the square has no concept of it because it is stuck seeing a 2D world.
If a 3D object visits the 2D plane it appears to be deforming. In Miegakure, a similar process happens, but
in one higher dimension: instead of taking a 2D slice of 3D objects, we are taking a
3D slice of 4D objects. It’s hard to imagine, but luckily we don’t have to – a computer
can just display it for us! But how to build a 4D world and the objects
that populate it, especially without being able to fully see them? In a 3D game, objects are usually made out
of triangles. The surface of a 3D object is 2D, and triangles are the simplest 2D shape.
To generalize this concept we add a dimension: the surface of a 4D object is 3D. So what
is the simplest 3D shape? It’s a pyramid-like shape called the tetrahedron. So to build
the surface of any 4D object we want we can use the tetrahedron as a building block, and
that’s what this game does. What happens is that, instead of projecting
the tetrahedra on the screen like we are doing now, we slice them using the 3D plane that
represents what the player can see. That gives us a bunch of triangles, which we then draw
the same way we would for a regular 3D game. What you see is the 2D projection of a 3D
slice of a 4D object. But how do we even create 4D objects? We can’t
easily visually manipulate them using a 4D equivalent of Maya, but what we can do is
generate them procedurally. So let’s take a simple example. To build 4D crystals, we use a method similar
to how we would build a 3D crystal procedurally, but instead of starting with a 2D hexagon
and extruding it up, we start with a 3D dodecahedron and extrude it into the fourth dimension.
I picked the dodecahedron because it often gives hexagons when you slice it. Surprisingly in this scene, every crystal
is the exact same shape, only facing different directions and slightly longer or shorter.
And yet they all look so different because you only see a slice of each of them. This
is particularly interesting because of the known connections between high dimensional
space and certain crystal structures. I can move a little bit in the fourth dimension
and the scene will look slightly different, and again slightly different. There are technically
an infinite number of unique slices one could take. Here is another, more complex example. The
surface of this 4D shape called the 120-cell is made out of 120 dodecahedra. In this case
I cut a hole inside each dodecahedron to make them hollow. While you could ignore all of this when playing
the game, to me it feels even more beautiful when you know more about what is happening.
So I wanted to share some of the things you may not realize when you finally get to play


Add a Comment

Your email address will not be published. Required fields are marked *