Settings

Theme

4D Doom

github.com

286 points by chronolitus a month ago · 85 comments

Reader

keyle a month 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 a month 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.

  • chronolitusOP a month 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- a month ago

    The low resolution didn't bother me too much, but the controls made this completely unplayable for me.

  • fxtentacle a month 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 a month ago

    Agreed this is not even 4d Wolfenstein but still a really neat concept

somat a month 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

  • UltraSane a month 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

  • AndrewDucker a month ago

    Nitpick - your eyes are, in combination, a 3d sensor. Individually they're 2d sensors, but together they can detect three dimensional information.

    • dtj1123 a month 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.

      • _main a month 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.

        • strogonoff a month 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.)

    • dickiedyce a month 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?

      • AndrewDucker a month ago

        You definitely get 3D from just having twin perspectives on an object. You get even more when moving your head.

  • gentleman11 a month 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

jitl a month 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).

  • Darmani a month ago

    Fun fact: William Sleator's brother is the famous computer scientist Danny Sleator, inventor of the splay tree.

  • UltraSane a month ago

    Part of Greg Egan novel Diaspora takes place in a universe with 5 spatial dimensions.

    • chronolitusOP a month 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

    • ConceptJunkie a month 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.

gipp a month 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

  • martin-t a month 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?

  • pasquinelli a month 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.)

  • jitl a month 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.

    • tenthirtyam a month 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.

    • Nevermark a month ago

      Exactly. I prefer my 4D games projected into my Vision Pro’s surrounding 3D space. Please.

  • chronolitusOP a month ago

    You may need more than 1 extra axis of rotations, unfortunately. https://youtu.be/tKDMcLW9OnI?t=309

Narishma a month ago

Why does it require WebGPU when it looks like something that would run fine in software on a 386?

knolan a month ago

I found 4D Golf a great game to explore higher dimensional space.

amlib a month ago

I find it fascinating that it turns into a "descent like" (6dof fps) when using the ability to "peek" the 4th dimension.

  • heftig a month 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.

forthac a month ago

If you're on firefox, go to about:config and set dom.webgpu.enabled to "true".

tenthirtyam a month 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 a month 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 a month ago

It's not actually Doom, but a Doom-like.

omershapira a month ago

Shameless plug: Horizon (Before the name got saturated), a 4D third-person game https://youtu.be/R6qTi3TCM2U

Brendinooo a month ago

His dev log linked from GitHub is really neat. Mind-bending stuff.

dluan a month 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?

  • ConceptJunkie a month 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.

  • fredrikholm a month 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.

    • dluan a month 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.

bstsb a month 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 a month 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 a month 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 a month ago

Reminds me of this 4D minecraft clone:

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

MisterTea a month 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.

  • pasquinelli a month 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.

xnx a month ago

Better title: HYPERHELL, 4-Dimensional DOOM-Like

scordata a month ago

This is an awesome experience. Very useful tool to get exposure to thinking in "higher" dimensions!

komodo99 a month 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 a month 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 a month ago

Cant wait to see ZeroMaster speedrun this

amelius a month ago

At least project it onto a 3D screen.

  • chronolitusOP a month ago

    Can't wait for the hardware. Only a matter of time until someone makes the first 4D game projected to a 3D hologram.

braelyn a month ago

that was incredibly cool

razorbeamz a month ago

The AI generated logo image is a very big put-off.

  • chronolitusOP a month 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).

superxpro12 a month ago

Ok... he was right. It broke my brain.

saberience a month ago

That's not 4D

  • integralid a month 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

  • bsza a month ago

    Then what is it? I'm seeing 4x5 transform matrices in the code, looks 4D enough to me.

  • lanternfish a month ago

    Why not?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection