News for hackers. Stuff that matters.
Re:How to walk through walls using the 4th dimension [video] by DougWebb on Wednesday August 27, 2014 @03:58PM (#8234418)
That would be really cool. The mathematics involved don't seem too difficult; you have to add another axis to your vectors, points, and transform matrices, and you can place and orient your models in 4D space, set up lights and a camera in 4D space, and project the camera's view into 3D space first then onto the 2D display. I think the hard part is creating the models and writing the rendering engine. Creating 4D models, rather than just putting 3D models into 4D space, would be hard to wrap your head around. And the tools, both for world creation and for rendering, are almost certainly limited to 3D so you'd have to write your own tools for everything. No more GPU acceleration, unless your 4D to 3D transformation creates models and textures on-the-fly to pass to the GPU.
Re:How to walk through walls using the 4th dimension [video] by gliese1337 on Wednesday August 27, 2014 @04:28PM (#8234562)
This is something I've been working on as a side-project on and off for a while. It's complicated by the fact that every existing engine is built around the assumption that you only want to use 3 dimensions, not four, and not arbitrarily many, so I've been pretty much writing everything from scratch (and very limited GPU acceleration, as you said, because GPUs also assume 2 or 3D). So far, I'm punting on model building by just auto-generating 4D mazes with hypercubical cells, because maze-generation algorithms work in arbitrary dimensions.

For simplicity, my rendering engine is a dead-simple raytracer which doesn't even bother with reflections- just cast rays and record the first surface they run into. Handling rotations and projections is really easy, but there are two problems I have found:

1. It's just really frickin' slow. Raytracing just ain't fast enough, though I may be able to find some additional optimizations to make it better.

2. In terms of gameplay, navigating the space is really, really hard. It is so easy to get completely lost regarding which direction you're facing and what hyperplane you're on when you can make arbitrary rotations in all four dimensions. It might be something I could get used to, but so far I feel like it's practically necessary to have some mechanism that will snap you back into alignment with some set of gridlines.

Re:How to walk through walls using the 4th dimension [video] by michael_fine on Wednesday August 27, 2014 @05:21PM (#8234764)
One possible way of getting around that, stolen from machine learning, is to use colors to represent the fourth dimension, ie, make things darker (or change the hue/saturation) that are bigger in the fourth axis, and vice versa for smaller.
Re:How to walk through walls using the 4th dimension [video] by Retric on Wednesday August 27, 2014 @08:46PM (#8235424)
I would just avoid the rotation issue. Time works as a 4th dimension so if you have a charter that can flow backward or forward in time you can 'solve' 4d mazes without major issues. From a game-play perspective plenty of games have you vary limited control over time but you could make some vary interesting puzzles with full control.

EX: walls in the way. <Set bomb off> Walls gone but cave collapses. <walk though wall> <go back in time> <keep walking>.

Or simply let you flip times direction. Going vary slow or backward prevents changing things, but you get to move. So, you might be able to for example walk on water when moving backward in time etc.

Re:How to walk through walls using the 4th dimension [video] by lt on Thursday August 28, 2014 @10:31AM (#8237351)
That's pretty much the idea of Braid, an awesome indie game. It uses time manipulation in different ways to create mechanics in that vein. Recommended.

It's a different concept than true 4D though.

Re:How to walk through walls using the 4th dimension [video] by Houshalter on Wednesday August 27, 2014 @07:20PM (#8235177)
There are some simple games like that. 4d mazes, 4d tetris, 4d pong, etc. The problem is it's pretty impossible for people to wrap their mind around it, and it doesn't project very well on 2d screens. Research has shown that people don't get better at it with practice either.
Re:How to walk through walls using the 4th dimension [video] by doorhammer on Wednesday August 27, 2014 @08:46PM (#8235422)
I'm going to google around for this, but do you have any links to the research off hand? I'd be interested in seeing it.

My favorite 2048 variation was the 4D version. It was trippy but I felt like I got my head around that. I think it was because the game rules were so simple that instead of trying to visualize what was going on, my brain just accepted the patterns.

Re:How to walk through walls using the 4th dimension [video] by tejon on Thursday August 28, 2014 @12:05AM (#8235850)
We already have 4-dimensional models; we just keep the 4th dimension separate and call it an animation path. In fact, Skyrim has 5-dimensional models: there are two versions of each walking animation, roughly "feminine" and "masculine," but each character actually uses a specific blend-point between the two. Similar analogies with facegen textures. All the pieces are there, they just need to be glued together right.
Re:How to walk through walls using the 4th dimension [video] by richmarr on Thursday August 28, 2014 @03:03AM (#8236194)
Can you clarify why having two animation paths makes 5 dimensions? Surely the dimension is time, you're just deforming the 3 spatial dimensions along two different paths as you progress uniformly along the 4th?
Re:How to walk through walls using the 4th dimension [video] by danbruc on Wednesday August 27, 2014 @04:25PM (#8234552)
You could probably make something like Minecraft but out of hypercubes and besides turning in three dimensions you can also reorient your three dimensional subspace in the four dimensional world. As you mentioned, the interesting question is how you model objects - are our usual three dimensional things thin sheets in the fourth dimensions or do they have some interesting structure.
Re:How to walk through walls using the 4th dimension [video] by anigbrowl on Wednesday August 27, 2014 @05:54PM (#8234880)
I believe there are some good libraries out there for handling quaternions. Can't remember the topic but there was a discussion here within the last 10 days about their application to a similar problem.
Re:How to walk through walls using the 4th dimension [video] by viewer5 on Wednesday August 27, 2014 @04:13PM (#8234493)
What would the 4th dimension coordinate of your models even represent, though? I'm having trouble wrapping my head around it.
Re:How to walk through walls using the 4th dimension [video] by dedward on Wednesday August 27, 2014 @06:58PM (#8235087)
It's naturally confusing, because a 4th spatial dimension isn't something we naturally experience. We can't really say what it represents because it's not real... it's not a model of reality.

We see in 2 dimensions and we infer the third from various cues. (The quote that we are "dimly aware of a fourth", which you may have heard, refers to time and is a different issue than a fourth spatial dimension.)

We have three dimensions, all orthogonal to each other. We can translate, rotate, and project things in between them.

So all we can do is apply those same principles and see what comes out - we shouldn't expect it to match anything recognizeable though.

Re:How to walk through walls using the 4th dimension [video] by sp332 on Wednesday August 27, 2014 @04:22PM (#8234533)
Mathematically, they're identical to any other dimension. You can move a little bit into a fourth dimension just like moving a little bit left-to-right. Or you can rotate things around the fourth axis just like turning something clockwise. In the case of this game, he only shows a 2D projection of a 3D cross-section of a 4D world, so that might be adding to the confusion. What you see in the video is only 3D "slices" of a 4D object rotating.
Re:How to walk through walls using the 4th dimension [video] by raimondious on Wednesday August 27, 2014 @08:19PM (#8235353)
One of the axes introduced by the fourth dimension. There are 3 in 3D, 6 in 4D. XYZ space has axes perpenicular to the planes xy, xz, yz. WXYZ space has axes perpendicular to the planes xy, xz, xw, yz, yw, zw.
Re:How to walk through walls using the 4th dimension [video] by NickPollard on Thursday August 28, 2014 @09:19AM (#8237041)
No. There are only 4 axes in 4-dimensional space - every point is described as a 4d vector, i.e scalar positions along each axis: (x,y,z,w).

xy, xz, etc. are not planes in 4d space - they are 3d-hyperplanes, and perpendicular to them are planes, not axes. Imagine this: you have a 4d vector and you hold x and y constant. You still have 2 degrees of freedom: a plane, not a line.

Re:How to walk through walls using the 4th dimension [video] by 0x0 on Wednesday August 27, 2014 @06:19PM (#8234949)
Would something like an Oculus Rift VR help reduce the number of projections from being "4D->2D" to be "4D->3D"?
Re:How to walk through walls using the 4th dimension [video] by cosarara97 on Wednesday August 27, 2014 @06:37PM (#8235019)
No, Oculus Rift's screens are still 2D surfaces.
Re:How to walk through walls using the 4th dimension [video] by 0x0 on Wednesday August 27, 2014 @06:48PM (#8235055)
Sure, but at least you get stereo vision and headtracking that makes it less obvious you're just looking at a flat screen showing a mono projection?
Re:How to walk through walls using the 4th dimension [video] by sp332 on Wednesday August 27, 2014 @08:55PM (#8235454)
It might help mentally, but it won't reduce the number of projections. You'd have to be able to see every point in the whole 3D volume, not just the surface.