r/GraphicsProgramming • u/yugu-233 • Jun 16 '26
Rendering 4D space in an intuitively understandable way
(By 4D space, I mean four-dimensional Euclidean space R4. Not spacetime or space of higher dimension in any physical sense.)
Let us first think about how we understand 3D space. Through vision, our retinas receive 2D information; after being processed by the brain, that information becomes our understanding of 3D space.
I imagine that if humans living in 4D space had vision, what their eyes received would be 3D information. In other words, if we could somehow see a "3D photograph," we would be able to simulate, to some extent, the vision of a 4D being. But this is very difficult. Imagine a 3D cuboid divided into billions of voxels, each carrying information about color and brightness. This comes close to how we might imagine vision in 4D, but to us it would be almost impossible to understand, because we can only see the outermost layer of voxels. Even with translucent voxels, it would still be difficult for our 3D vision to capture the information inside.
However, our perception of 3D space does not have to be based on pixel images. A geometric outline drawn with lines is often enough for us to reconstruct a great deal of spatial information. (Left in the GIF). Applying the same idea to 4D space, we can obtain a 3D line rendering of a 4D space (right). Since lines rarely occlude one another, we can capture the information in this 3D image with much greater precision, and in this way simulate the vision of a four-dimensional being.
If we add some basic "physics" in this 4D space and make it interactable like a game, as shown in the GIF, humans may gradually adapt to this kind of 3D image, find patterns within it, and begin to interpret the geometry of the 4D space behind it. With enough practice, this may even become part of your spatial intuition.
Based on this idea, I designed the game 4D Intuition. It now has a free demo on Steam. You are welcome to try it out and I would be glad to hear your thoughts on my attempt.
1
u/yugu-233 Jun 18 '26
Thanks for the very detailed feedback!
-----
Agreed. I will change it to 10 total in the next build.
The purpose of Level 3 and 4 is to help players to establish the concept of "front" in 4D space. Originally, the task in level 4 (move forward only) was the task in level 3 instead of the shooting task. But that didn't work well, for
It was too hard, players get stuck.
For players who completed it, a good portion did so by chance (random turns and move will still let you get through it, though inefficiently). And moving on to the next level, they would forget what was taught in level 3.
Therefore I split it into 2 levels (aim, and then move). The shooting task is designed specifically for one purpose: ensure that players understand "front" and can turn to any direction. (I may have overdone it.)
Shooting is not a theme of the game, and won't appear again after level 3. If it is a frequent operation, I will certainly assign a button for it. In designing interactions, there are 2 guidelines I follow: 1) minimize the number of operations, 2) minimize the cost of learning. In most cases the two are aligned, but there are exceptions.
Right-click toggle/drag:
in later levels, the intended use is to leave it unlocked almost all the time. But supporting drag is not in conflict with the current scheme. I'll consider it.
-----
Arrow keys:
E/Z are side directions like A/D in 4D space (up/down on screen). In 3D the controls are (W/S; A/D; Jump), while in 4D the controls are (W/S; A/D/E/Z; Jump). Both sets are complete, and we should need no more arrow keys.
If we consider key S as the center of the keys, E/Z are well aligned with the visual feedback (up/down on screen), which make it more intuitive. Another way to think about E/Z, is that if 4d beings use a keyboard with 3D layout, the 6 arrow keys are likely:
where o's are side directions. Mapping that onto the keyboard we use, I think E/Z is a very natural choice.
Binding A/D/E/Z to fixed directions is actually easier to explain and understand logically, but since it is not always aligned with visual feedback, it is a lot harder to apply in practice. In play testing, players always prefer the visually aligned controls when they understand how it works. So the two real options are:
start with fixed binding, and then switch to variable binding later. (+: easier to explain; -: hard to apply; still need to explain the variable binding, may cause confusion)
start with variable binding. (+: learn only once -: slightly harder to understand as a beginner)
In the end I chose 2.
-----
You can use Enter in the current version.
Slicing or projection:
My game uses projection only, which is different from most 4D visualization done so far. Projection is closer to how our visual system works. Slicing has been the more popular approach probably since Flatland. It is easier to understand as a concept, but it is very hard to construct a mental picture of a 4D object from slices. This hardness exists in 2D->3D as well: for a simple shape like a 3D cube, we can't reliably recognize it from a series of 2D slices (when not scanning along an axis).
Therefore, slicing and projection allow us to do very different things. I said earlier that shooting is not a theme of the game. Actually, as the game progresses, it will require a lot more geometric reasoning and start to feel like a puzzle even without the "4D" element.
-----
Thanks for the feedback, they're very helpful. I'm working on the next build. I'll come back and let you know when it's ready.