Thoughts on 4D Rendering
Related Articles: Non-Euclidean RenderingSay you want to make a four-dimensional game. Surprisingly, there's really nothing difficult about implementing the actual mechanics of the game. By and large, the math is the same no matter how many dimensions you add. The only real issue there is that the cross product turns out to be a low-dimensional hack, so you need to figure out what's really happening in formulas that use it.
The big problem with any 4D game, though, is both simple and obvious. The computer may understand what's going on, but can the player? How does the computer communicate what the world looks like, in an understandable way?
The answer may depend on the type of game you're making. For instance, if the world is discrete, as in 5D Chess, you have a lot of options. But if space is continuous, I know of just two methods, which I call projection and slicing.
Projection is when you take the ideas behind ordinary, 3D rendering, and add a dimension. You think about what a four-dimensional being would actually perceive, and display that.
The issue is that the eye a four-dimensional being has a three-dimensional retina. So this method tells you to display the shape on a three-dimensional screen. Since our screens aren't typically three-dimensional, we need a second step to display that three-dimensional screen on your two dimensional screen.
This approach is commonly used when displaying mathematical objects>. It can also be seen in this maze game.
Slicing is when you display only a 3D subset, or "slice", of the world to the user at any one time. If you want to see something outside the slice, you need to explicitly turn and look. This is the approach taken by 4D Golf, and the eternally-in-development Miegakure.
Both approaches have pros and cons. Slicing is more intuitive, easier to implement, and leaves the screen less cluttered. But projection allows you to see the whole four-dimensional world at once. When playing the maze game linked above, it was a real revelation when I first saw four mutually-perpendicular passageways at the same time.
More information: