4D Doom
272 points by chronolitus 5 days ago | 78 comments

keyle 21 hours ago
It's cool and all and I typically enjoy lowres renditions... unless, it actually impacts gameplay.

Since the gameplay is so much about 4D, clarity in what you see becomes more important and the extremely low resolution actually impairs the player rather than serve a positive (typically 'leaves more to the imagination').

It wouldn't take much of an effort to double or triple the resolution which I think would help the gameplay.

reply
somat 19 hours ago
The reason it is so low res is actually more interesting than simple aesthetic choice. Think about the sensor(or eye) needed to view a 3d scene, it is 2d right. So this is a 3d sensor(voxels) for a simulated 4d camera. and then we are looking at the 3d sensor. (with our 2d sensor(eyes)), it's sensor inception.

So it is as low res as it is because it is a bunch of voxels simulating a 4d camera.

The dev put out an interesting video on the topic.

reply
ninju 6 hours ago
Here the video (from the bottom of the page)

https://www.youtube.com/watch?v=tKDMcLW9OnI

reply
__alexs 11 hours ago
There have been other 4D video games with actually good performance though.
reply
Citizen_Lame 11 hours ago
They should have used Gaussian Splats, surely this would reduce processing overhead.
reply
chronolitus 3 hours ago
I really appreciate your feedback!

I tried pretty hard to increase the rendering efficiency on consumer GPUs. The biggest issue is that the main view is actually a 96x96x96 grid of "pixels" (or voxels). This makes scaling brutal: going up to 128x128x128 we'd double the total amount of pixels, to around as much as 1920x1080 resolution. Doubling the grid res to 256 would get us 16M voxels, which is about the same as two 4K displays. On top of that simple 4D object meshes scale much worse in terms of tetras than 3D objects do.

A quick solution could be to give the user a few resolution options, so they can bravely test the limits of their hardware.

So I've just modified the engine to allow you to specify a custom resolution in the URL:

https://dugas.ch/hyperhell/levels/the_bargain.html?vox_resol...

(Higher resolutions might break rendering entirely if the accel structure doesn't fit in allowed memory anymore. I was able to push it to 160x160x160 on my machines)

I'll also try to think of other ways to make the rendering more efficient, maybe a BVH instead of my simpler grid-based acceleration structure? My background is not in computer graphics, so others here might have better ideas.

reply
isomorphic- 12 hours ago
The low resolution didn't bother me too much, but the controls made this completely unplayable for me.
reply
fxtentacle 14 hours ago
Fully agree. The low-res makes this unnecessarily hard to navigate. Which is a downside if your core gameplay is to teach players to navigate in a challenging environment.
reply
adzm 20 hours ago
Agreed this is not even 4d Wolfenstein but still a really neat concept
reply
somat 22 hours ago
I just watched the associated dev video And if I understand it, what the author is doing is kind of interesting.

The sensor to see a 3d scene is 2d(eye or camera). What is being done here is simulating a 3d sensor(for a 4d world) then we are looking at this 3d sensor using our 2d sensors (eyes). I don't know if this is the common way of rendering these 4d physics simulations. But it is the first I have heard it described this way. It is also why the narrative of the game focuses on eyes, because that is what it is doing.

https://www.youtube.com/watch?v=tKDMcLW9OnI

reply
AndrewDucker 11 hours ago
Nitpick - your eyes are, in combination, a 3d sensor. Individually they're 2d sensors, but together they can detect three dimensional information.
reply
dtj1123 10 hours ago
Strictly speaking this doesn't make them a true 3d sensor, but rather a 2d sensor with an accompanying depth-map. In order for them to be true 3d sensors they'd be have to transmit information about both the near and far sides of an object simultaneously, for example.
reply
_main 6 hours ago
Very true, a 4 dimensional being with 3 dimensional eyes would be able to look inside closed boxes, and see every side of every object at once. (just like we can see every part of a 2d scene all at once)

Not merely 2d + depth perspective.

reply
strogonoff 3 hours ago
Arguably, humans are 4-dimensional beings living in a 4-dimensional world—it’s just that one of the dimensions is accessible with much fewer degrees of freedom.

(Not unlike how a seemingly 2-dimensional world of a top-down FPS is actually 3-dimensional, you just have to follow way more rules when it comes to moving in the third one.)

reply
dickiedyce 9 hours ago
Hmmm... Agreed that they're mostly 2D sensors, but apart from near-field the post-processing brain can use depth-cues to for us 'see' in 3D. Also, you don't see in 3D unless your head/eyes/target is moving, right?
reply
AndrewDucker 9 hours ago
You definitely get 3D from just having twin perspectives on an object. You get even more when moving your head.
reply
UltraSane 18 hours ago
Reminds me a bit of a guy who created a functional virtual camera in Blender with lenses and film layers.

https://www.youtube.com/watch?v=YE9rEQAGpLw

reply
gentleman11 21 hours ago
I don't want to be the guy who has to use this level editor (although, in a similar way, doom was 2.5d, and so the level editor could essentially be 2d, so maybe it's not so bad?)

If this is 4d doom, i wonder what 4d quake could be

reply
jitl 21 hours ago
I read a novel when I was 14 or so who's premise is all about creatures inhabiting higher-dimensional space called "The Boy Who Reversed Himself" by William Sleator. I loved Sleator's books, they introduced me to really interesting concepts from theoretical physics as a youngun. If you find 4D Doom intriguing, I encourage you to borrow the book from your favorite ebook library, it's a quick fun read (at least, I remember it that way).
reply
Darmani 21 hours ago
Fun fact: William Sleator's brother is the famous computer scientist Danny Sleator, inventor of the splay tree.
reply
UltraSane 18 hours ago
Part of Greg Egan novel Diaspora takes place in a universe with 5 spatial dimensions.
reply
chronolitus 3 hours ago
Loved this book! Part of this project started from wanting to make 4D creatures and train them to walk with RL. One interesting fact I learned is that ants would probably have 8 legs in 4D.

Why? Well, apparently ants have 6 legs because this allows tripod-gait, a simple leg movement that always keeps 3 stable points on the ground[1]

In 4D, you'd need 4 points on the ground, hence tetra-pod gait (4+4 legs).

You could of course do with less, I'd guess even as low as 1-2 if you have lots of muscles and good balance.

[1] https://dugas.ch/4d_creatures/tripod_gait.html

reply
ConceptJunkie 5 hours ago
I'm still trying to wrap my head around the statement in the book (IIRC) that it takes 8 legs to be stable in 5 dimensions. I'd assumed it would be 6, but this is a layman's intuition. Maybe I'm remembering it wrong.

Awesome book regardless.

reply
Narishma 17 hours ago
Why does it require WebGPU when it looks like something that would run fine in software on a 386?
reply
gipp 22 hours ago
The problem with these attempts always seems to be that you can see in dimensions 1-3, but never in dimension 4, so any movement or exploration along that axis is always just blind fumbling. The extra dimension is not equivalent to the others

The only answer would seem to be an extra axis of rotation, but (a) doesnt work well with existing input methods, and (b) would be even more of a brain-breaker

reply
chronolitus 3 hours ago
You may need more than 1 extra axis of rotations, unfortunately. https://youtu.be/tKDMcLW9OnI?t=309
reply
pasquinelli 6 hours ago
no, you do see along the fourth dimension when you're pointing that way. i think you have a deep confusion here actually, but i can't really help because i don't actually understand your confusion. but, for whatever help it will be:

- all the dimensions are treated the same

- you only actually see two dimensions.

(it goes without saying that it's actually me who's confused.)

reply
jitl 20 hours ago
I think you could approximate a 4d projection onto a 3d display, much like we approximate a 3d projection onto a 2d display. So perhaps one could enjoy a fun and intuitive game of 4d doom if you have an appropriately fancy volumetric display. Pity they're so rare/expensive.
reply
tenthirtyam 6 hours ago
I've commented elsewhere about an 4D maze (https://urticator.net/maze/ - I am not the author) which mimics this by creating two 3D retinas in red/blue stereoscopic mode - when you cross your eyes just right you see a single volumetric 3D retina.
reply
Nevermark 16 hours ago
Exactly. I prefer my 4D games projected into my Vision Pro’s surrounding 3D space. Please.
reply
heyethan 18 hours ago
Feels like in 3D you can move continuously and build intuition.

But in 4D there isn’t really an equivalent control, so it ends up feeling more like toggling something you don’t fully understand.

reply
martin-t 13 hours ago
Could transparency help?

Ordinarily, a 3D scene rendered in 2D only allows you to see a cone from your eye up to the first surface the ray encounters, thus defining the 2D projection which you see.

But you can make the surfaces transparent so the ray continues, and each additional surface adds a bit to the final pixel. This can look like a mess if you stand still but if you wiggle your movement left and right (or any other direction), your brain suddenly manages to process it into the full 3D structure.

Can something like this be done in 4D?

reply
yetihehe 5 hours ago
Something like "wiggle stereoscopy"[1], but for 3d scenes instead of 2d images. Wiggle tesseroscopy?

[1] https://en.wikipedia.org/wiki/Wiggle_stereoscopy

reply
komodo99 2 hours ago
interesting, very cool demo, but its not the 4d that hurts my brain and/or soul, its an FPS with an inverted X mouse axis... its like the backwards bike, sure it can be done, but my wiring isn't rigged for that!
reply
tenthirtyam 9 hours ago
I can't play this online (no webgpu) but from the description and comments here it sounds like the 4D Maze from 2002!

https://urticator.net/maze/

The advantage of this one is that it offers a stereoscopic (red/blue) view of the 3D retina. Not sure if this one does too.

reply
chronolitus 2 hours ago
Thanks for the link, 4D Maze is amazing and I had somehow never seen it.

Also, here's a CPU-based prototype that led to the Hyperhell engine:

https://dugas.ch/4d_creatures/4d_camera.html

reply
knolan 23 hours ago
I found 4D Golf a great game to explore higher dimensional space.
reply
noman-land 22 hours ago
Got a link?
reply
AStrangeMorrow 22 hours ago
I imagine they are taking about 4D golf by CodeParade, as seen here: https://youtu.be/y53UNskR-zU?si=iUfCkxYqkACx955t

Steam link: https://store.steampowered.com/app/2147950/4D_Golf

The person goes over quite a few technical details on their Youtube, though they talk about a bunch of other coding experiments too.

reply
extraduder_ire 4 hours ago
The additional code he wrote to make a 4d game work in the Unity game engine is available on github and MIT licensed: https://github.com/HackerPoet/Engine4D

When I first saw the title, I assumed this game was implemented in the same engine. I believe there are a few already.

reply
danbruc 22 hours ago
Some of the scenes from the video remind me of Manifold Garden [1] - only 3D but a 3-torus [2] and you can change the direction of gravity, i.e. what is up and down. And also visually beautiful.

[1] https://store.steampowered.com/app/473950/Manifold_Garden/

[2] https://en.wikipedia.org/wiki/3-torus

reply
amlib 16 hours ago
I find it fascinating that it turns into a "descent like" (6dof fps) when using the ability to "peek" the 4th dimension.
reply
heftig 10 hours ago
The perspective shifts so that the up-down direction becomes the hidden dimension. So the ceiling and floor disappear (and you have trouble avoiding lava) and you only see the walls of the space.
reply
gray_wolf_99 4 hours ago
Its really a cool project, i loved playing doom game in my childhood hood, and i loved this fast paced Action FPP game…. plus the retro looks great,

Hey , did any one played “Total over dose”?

reply
forthac 19 hours ago
If you're on firefox, go to about:config and set dom.webgpu.enabled to "true".
reply
npodbielski 8 hours ago
Enabling webGPU on Firefox still does not allow it to run. It worked on Chrome but I feels kinda like it was not worth it. Maybe if you could change resolution to something better. And starting every time from the same room, through some conversation with NPC? Feels like I have better things to do.
reply
gloflo 15 hours ago
It's not actually Doom, but a Doom-like.
reply
backspace_ 9 hours ago
with those low res graphics, I'd say Wolfenstein like
reply
MisterTea 6 hours ago
Perhaps Ive been missing out on the 4D gaming revolution but I do not understand what the 4th dimension is here. Feels like I am missing out on a lot of context.
reply
pasquinelli 6 hours ago
it's a fourth spatial dimension. if you imagine a cube, it has width, height, and depth. a 4d cube would have width, height, depth, and zhlerp, which is its size along a fourth spatial dimension. in three dimensions you can go forward and backward, left and right, up and down. in four dimensions you can go forward and backward, left and right, up and down, and zlep and wizz, moving along the fourth spatial dimension.
reply
dluan 15 hours ago
I feel like now that I'm older, my brain just can't fully understand it say as quickly if I were younger. Makes me wonder if younger more plastic brains can adjust to having to juggle more dimensions than crochety old ones like mine with very rigid 3D grooves baked in. Or brains from other animals.

I guess taken to the logical extreme, what does the brain of someone/thing that's good at playing this (or any game of N dimensions) look like?

reply
ConceptJunkie 5 hours ago
I feel the opposite. I'm 61 and I feel like I understand ideas more quickly than I ever did before, so much so that I'm surprised at how shallowly I thought about some things in the past.

While there is definitely something to the plasticity of young brains, for example in language acquisition, or the fact that the Fields Medal eligibility ages out at 40, I believe it's not a linear thing and not a one-way thing.

reply
fredrikholm 14 hours ago
If you don't mind me asking, how old are you, and how did this progress? I'm in my mid thirties and am noticing some minor deterioration, but I'm writing it off to loss of sleep due to having small kids.

My curiosity is if this is like you suggest, ingrained patterns, or if there is actual slow down with age. I hear different opinions and am finding it difficult to navigate as I deal with my own, albeit mild, aging.

reply
dluan 13 hours ago
Mid 30s, also have kid and sleep loss but not as bad as before.

I actually noticed serious mental decline when I was burned out in my late 20s. There were real physical symptoms like not being able to look at a text editor for more than 2 minutes. Post recovery of that, I actually feel like my brain recovered a lot once I started learning languages very seriously (mandarin and japanese), starting a few years ago. Brain feels healthy now but I'm acutely aware of where it's not as sharp as before. Playing around with this felt a little like when my brain is trying to build a new grammar dictionary.

reply
omershapira 19 hours ago
Shameless plug: Horizon (Before the name got saturated), a 4D third-person game https://youtu.be/R6qTi3TCM2U
reply
Brendinooo 19 hours ago
His dev log linked from GitHub is really neat. Mind-bending stuff.
reply
dalmo3 11 hours ago
Reminds me of this 4D minecraft clone:

https://youtu.be/u8LMyWcKL_c?si=XZrCdSSSk9PtpNIP

reply
bstsb 23 hours ago
this is visually interesting, but crucially it's also actually fun to play.

i managed to kill three enemies before succumbing to my fate

reply
DoctorMacArthur 5 hours ago
Cant wait to see ZeroMaster speedrun this
reply
xnx 22 hours ago
Better title: HYPERHELL, 4-Dimensional DOOM-Like
reply
gerdesj 21 hours ago
Is that the geordie version?
reply
scordata 24 hours ago
This is an awesome experience. Very useful tool to get exposure to thinking in "higher" dimensions!
reply
danbruc 23 hours ago
Now waiting since 16 years for the release of Miegakure [1][2][3].

[1] https://en.wikipedia.org/wiki/Miegakure

[2] https://www.youtube.com/watch?v=9yW--eQaA2I

[3] https://xkcd.com/721/

reply
mrmckizzle 22 hours ago
reply
danbruc 22 hours ago
On mine, too, forgot that link.
reply
hiccuphippo 22 hours ago
Oh yeah. I remember it every couple of years just to go to wikipedia and see it's not been released yet.
reply
moralestapia 7 hours ago
The guy is just a troll. I doubt there's an actual game beyond a cool tech demo.

They haven't showed anything for like a decade.

reply
UltraSane 18 hours ago
I wish I could stay focused on a project that long.
reply
amelius 14 hours ago
At least project it onto a 3D screen.
reply
chronolitus 3 hours ago
Can't wait for the hardware. Only a matter of time until someone makes the first 4D game projected to a 3D hologram.
reply
razorbeamz 14 hours ago
The AI generated logo image is a very big put-off.
reply
chronolitus 3 hours ago
I'd definitely prefer a human made one. If you know any artists willing to make a proper version of the cover art, I'd be happy to commission one (paid, of course).
reply
superxpro12 24 hours ago
Ok... he was right. It broke my brain.
reply
braelyn 23 hours ago
that was incredibly cool
reply
saberience 23 hours ago
That's not 4D
reply
integralid 22 hours ago
That's exactly 4D. Just like "non euclidean"[1], this term is often abused in entertainment to mean something else, but the post here is about the real 4d world rendering.

[1] For this check out zenorogue work btw

reply
bsza 23 hours ago
Then what is it? I'm seeing 4x5 transform matrices in the code, looks 4D enough to me.
reply
lanternfish 23 hours ago
Why not?
reply