4D Doom (github.com)

by chronolitus 80 comments 286 points
Read article View on HN

80 comments

[−] keyle 45d 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.

[−] somat 45d 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.

[−] ninju 44d ago
Here the video (from the bottom of the page)

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

[−] __alexs 45d ago
There have been other 4D video games with actually good performance though.
[−] Citizen_Lame 45d ago
They should have used Gaussian Splats, surely this would reduce processing overhead.
[−] chronolitus 44d 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.

[−] isomorphic- 45d ago
The low resolution didn't bother me too much, but the controls made this completely unplayable for me.
[−] fxtentacle 45d 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.
[−] adzm 45d ago
Agreed this is not even 4d Wolfenstein but still a really neat concept
[−] somat 45d 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

[−] jitl 45d 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).
[−] gipp 45d 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

[−] Narishma 45d ago
Why does it require WebGPU when it looks like something that would run fine in software on a 386?
[−] knolan 45d ago
I found 4D Golf a great game to explore higher dimensional space.
[−] amlib 45d ago
I find it fascinating that it turns into a "descent like" (6dof fps) when using the ability to "peek" the 4th dimension.
[−] forthac 45d ago
If you're on firefox, go to about:config and set dom.webgpu.enabled to "true".
[−] tenthirtyam 44d 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.

[−] burnt-resistor 43d ago
Neat.

Some random unsolicited feedback: Doesn't work on iPadOS/iOS without an external keyboard, and the arrow keys don't work probably because there's no apparent ability to go full screen or capture focus of scrolling keys. The wasd etc. controls sort of work but are confusing and don't work as expected. Probably needs a full screen toggle and a virtual keypad for touchscreen UX at a minimum. Toasts should probably appear in the window rather than below because it messes with the viewport/layout and it starts scrolling unexpectedly.

Btw, it runs on iPadOS/iOS 18.x by turning on WebGPU under Settings > Apps > Safari > Advanced > Feature Flags

[−] gloflo 45d ago
It's not actually Doom, but a Doom-like.
[−] omershapira 45d ago
Shameless plug: Horizon (Before the name got saturated), a 4D third-person game https://youtu.be/R6qTi3TCM2U
[−] Brendinooo 45d ago
His dev log linked from GitHub is really neat. Mind-bending stuff.
[−] dluan 45d 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?

[−] bstsb 45d 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

[−] npodbielski 44d 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.
[−] gray_wolf_99 44d 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”?

[−] dalmo3 45d ago
Reminds me of this 4D minecraft clone:

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

[−] MisterTea 44d 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.
[−] xnx 45d ago
Better title: HYPERHELL, 4-Dimensional DOOM-Like
[−] scordata 45d ago
This is an awesome experience. Very useful tool to get exposure to thinking in "higher" dimensions!
[−] komodo99 44d 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!
[−] danbruc 45d 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/

[−] DoctorMacArthur 44d ago
Cant wait to see ZeroMaster speedrun this
[−] amelius 45d ago
At least project it onto a 3D screen.
[−] braelyn 45d ago
that was incredibly cool