Advertisement

A 4 dimensional world?

Started by November 19, 2011 04:37 AM
9 comments, last by jwezorek 12 years, 9 months ago
I've seen 3d projections of 4d objects, I was wondering if it would be possible to make a 4d "game". When I say game I really mean a navigable 4d world, it would be a really cool experiment and using it would be confusing as hell but the point is really just to show that it can be done. I know next to nothing about 4d math but I do know that the data for a 4d world could be easily stored in a computer.

any ideas how this could be done?


It's been done with Snake. Part of their approach was using multiple simultaneous views to track the movement.
Electronic Meteor - My experiences with XNA and game development
Advertisement
Rubik's Cube 4D.

Oh, and 5D.
There was a really... totally awesome RTS game involving time travel and time "waves" to deal with.
I know next to nothing about 4d math but I do know that the data for a 4d world could be easily stored in a computer.
If storage is your concern, I don't quite follow you. Vector math is "very well defined" for multiple dimensions. Here's a 11D point:
[source]float p[11];[/source]Here is your storage. How to manipulate it is a different matter however. If memory serves cross product only exists in 3D and perhaps 7D... I don't remember the details. Most manipulations will likely be not intuitive and I dare you in presenting those dimensions in a way they can be understood by Average Joe!
But sometimes it can be done... and it has been done for ages! Here's another 11D point (although the dimensionality is a bit of a trick).
[source]float opos[3];
float hdrCol[3];
float onorm[3];
float texCoord[2];[/source]Nonetheless, this point, as defined would be matematically different from from another v[sub]11[/sub] point. Presentation is the key.
Ok, I am jumping a bit through the hoops here. Point is, computers have no problems with high dimensionality in line of concept. We do.

Previously "Krohm"

I see your examples but what I'm really thinking about is a simulation of a 4d area where I can move my character in all 4 dimensions sort of like an fps but in 4d where I can see objects rotate in 4 dimensions being projected into my limited 3d viewpoint.
Not exactely a 4d first person game, but Miegakure would fit the description best from what I have seen so far.
Advertisement

Not exactely a 4d first person game, but Miegakure would fit the description best from what I have seen so far.


That was a pretty cool demo.

Beginner in Game Development?  Read here. And read here.

 


It's been done with Snake. Part of their approach was using multiple simultaneous views to track the movement.



Hi, I'm the guy who did the snake...
for storing the data is pretty easy instead of 3d vertex, you can use 4d vertex

V3{
private:
float coords[3];
};

V4{
private:
float coords[4];
};


for the texture, you can use 2d textures, or even with the power of computers increasing even a 3d texture (actually filling up the volume with some kind of particle like a fog)

for the math, well it's pretty much the same as the 3d one, only the 4d cross product which is an extension of the 3d one, is a bit complicated (which I copied from Steve Hollasch).
And the rotation are one hell of a thing, they are complicated in 3d and a bit more complicated in 4d.

One thing that I find really difficult to program however is a efficent 4d clipping algorithm.

If you have further question, I'l jump here now and then.

btw... The graphic engine could be adapted to see from the snake head, transforming it in what you mean by a navigable 4d world.
instead of having the camera pointing to a fixed point one could write something like this:

in the OpenGL function (Source):


lookat = cam4.prj(snake.get_head_pos()+snake.get_dir()); // get the projected position of the direction of the camera
camerapos = cam4.prj(snake.get_head_pos()); // get the projected position of the snake head

//put everything in the OpenGL function for the camera
gluLookAt(camerapos[0],camerapos[1],camerapos[2], // position of the camera
lookat[0],lookat[1],lookat[2], //look at
0,1,0 // up vector
)


the problem is that without having a 4d clipping algorithm, well it shows a lot of lines everywhere!
best regards
Pella

PS: 4d First personal shooter: Adanaxis
I always wanted to write (or for someone else to write) 4-D Tetris. The way I envision it you'd look at four Block Out wells simultaneously i.e. the well would be 4 units thick along the 4-D axis. I think it might even be playable if the pieces fell slow enough.

I always wanted to write (or for someone else to write) 4-D Tetris. The way I envision it you'd look at four Block Out wells simultaneously i.e. the well would be 4 units thick along the 4-D axis. I think it might even be playable if the pieces fell slow enough.
¨


Frac4D:


I think is pretty similar to what you want to do, instead of being viewed by above, they're viewed by side...

4D Tris:


A fancier representation

This topic is closed to new replies.

Advertisement