How Do You Build 4D Worlds? - 4D Golf Devlog #3

Modeling 4D objects and drawing them to the screen is obviously one of the hardest problems with making a 4D game. In this Devlog, I go into the implementation detail of how I achieved this in my project and some of the amazing algorithms that got me there.
Wishlist 4D Golf on Steam: store.steampowered.com/app/21...
#4dgolf
Great video about 4D shapes: • I visualized 4D shapes...
Miratope (GitHub): github.com/galoomba1/miratope-rs
Devlog #1: • So I Guess I'm Making ...
Trailer: • 4D Golf | Release Date...
Support me and innovative projects like these!
Patreon: / codeparade
Ko-fi: ko-fi.com/codeparade
Merch: crowdmade.com/collections/cod...
Music (CC0 1.0)
Koi-discovery - Chromatismus
koi-discovery.lescigales.org/

Пікірлер: 536

  • @muno
    @muno Жыл бұрын

    So many problems in life can be solved by using a lookup texture instead of real-time calculations

  • @FuzzyJeffTheory

    @FuzzyJeffTheory

    Жыл бұрын

    Wife left you and took the kids? Lookup texture.

  • @CYXNIGHT

    @CYXNIGHT

    Жыл бұрын

    Anyone have one for your Dad getting milk but never coming back? I could really use it right now

  • @zyansheep

    @zyansheep

    Жыл бұрын

    Technically, any algorithm that you can prove terminates can be a lookup table...

  • @plopsmcgee9672

    @plopsmcgee9672

    Жыл бұрын

    @@zyansheep Only so long as there is a finite number of allowable input combinations.

  • @ZeroPlayerGame

    @ZeroPlayerGame

    Жыл бұрын

    @@plopsmcgee9672 haven't seen an infinite chunk of data yet :D

  • @vihdzp
    @vihdzp Жыл бұрын

    I'm really glad Miratope was of some use. When I started coding it almost 3 years ago I honestly had very little idea of what I was even doing. I haven't been actively working on it for a while now, but I believe it's currently in good hands.

  • @atomictraveller

    @atomictraveller

    Жыл бұрын

    turn it all into audio oscillators and transduce EVP

  • @nem7296
    @nem7296 Жыл бұрын

    I think the property you migh be refering to at 2:56 is called star-convexity.

  • @CodeParade

    @CodeParade

    Жыл бұрын

    It is! Thanks a bunch, I couldn't find it in any search I did.

  • @henryseg

    @henryseg

    Жыл бұрын

    I learned it as “star-shaped”, but yes, that’s it.

  • @quantumanon

    @quantumanon

    Жыл бұрын

    The kernel (set of points which can see the entire boundary) of a star-shaped domain is convex. Is there any benefit to triangulating the kernel, then using the points on the boundary of the kernel to generate a triangulation of the domain? Intuitively this splits the domain into a simple(ish) centre and some boundary polytopes which feels like a nice decomposition if nothing else.

  • @peperoni_pepino

    @peperoni_pepino

    Жыл бұрын

    @@henryseg I learned it as 'star-like domain', basically the same lol.

  • @dkosmari
    @dkosmari Жыл бұрын

    At 2:47, the "vertex that can reach every other vertex," that's a property of star-shaped polygons/regions. Every star-shaped polygon has an internal region that can see the entire boundary of the polygon; this region is called the kernel of the polygon. In 2D, it's the intersection of all half-planes defined by the edges; it generalizes to any dimension.

  • @michaelearnest1983

    @michaelearnest1983

    Жыл бұрын

    en.wikipedia.org/wiki/Star_domain

  • @maxbooth6247

    @maxbooth6247

    Жыл бұрын

    Yeah I know it as a star-like region

  • @FLMKane

    @FLMKane

    Жыл бұрын

    Ahhhh that's so cool. Is kernel the same as nullspace?

  • @lucbloom

    @lucbloom

    Жыл бұрын

    @@michaelearnest1983 ah yes, the only kind of link you can follow without the comment having extra text.

  • @DavidRoberts

    @DavidRoberts

    Жыл бұрын

    @@FLMKane probably not. It's a coincidence that the word kernel is also used in linear algebra for something else

  • @NStripleseven
    @NStripleseven Жыл бұрын

    Precomputed data in textures. Gotta love it.

  • @hamondorf9355

    @hamondorf9355

    Жыл бұрын

    It's a common trick. Everytime I see it I love just how silly but ingenious it feels. Yeah all this position data? Just colors in a texture. It's cracks me up

  • @matj12

    @matj12

    Жыл бұрын

    @@hamondorf9355 Why is it a texture and not a generic array? Can't GPUs work with generic arrays?

  • @hamondorf9355

    @hamondorf9355

    Жыл бұрын

    @matj1 it's texture because the data works better stored in GPU memory (VRAM) Generic arrays, if I understand what you're asking, are stored in CPU memory (RAM). This means the data would have to keep being sent to the GPU from the CPU, instead of just being always ready for use on the GPU. It's like keeping the tools you use most closer to you.

  • @matj12

    @matj12

    Жыл бұрын

    @@hamondorf9355 If I understand it correctly, a texture is an array in the GPU memory representing a raster image. Then, is every array in the GPU memory a texture? I expect that textures are special arrays, and every array in the GPU memory is a sequence of numbers, but not necessarily a texture.

  • @hamondorf9355

    @hamondorf9355

    Жыл бұрын

    @matj1 @matj1 Iirc VRAM has specialized memory that works best for certain usage patterns. I can't say for sure why. I'd assume it has to do with more hardware level stuff. It's like asking if every thing stored in ram is an array cause the memory is contiguous. Sure, in a way, yes. But, how the memory is interpreted is up to the program. It's all just a bunch of 1s and 0s the programmer gives them meaning

  • @sporkwizard4131
    @sporkwizard4131 Жыл бұрын

    The fact that you’ve wrapped your head around this stuff to not only think, but also code and optimize, in four dimensions is seriously so impressive. That optimization with the lookup texture was sick as hell

  • @b4ttlemast0r

    @b4ttlemast0r

    9 ай бұрын

    The optimization doesn't really have anything to do with the fact that it's 4D. It's just realising that there's a small number of possible inputs to this function so you can just precalculate it.

  • @amphitheres
    @amphitheres Жыл бұрын

    2:55 in my analysis class, we called a subset of a vector space with that property "star shaped".

  • @lostinnowhere6688

    @lostinnowhere6688

    Жыл бұрын

    That's the name I've heard for it too

  • @ikebirchum6591
    @ikebirchum65919 ай бұрын

    "Hmmm yes, fascinating," I say as I stroke my chin thoughtfully, completely and utterly failing to comprehend anything that's being shown or said

  • @pyro-millie5533
    @pyro-millie5533 Жыл бұрын

    Holy shit that optimization into a 64 bit table encoded to RGB values is FUCKING BRILLIANT!!! I adore your projects so much!!

  • @SunnyKimDev
    @SunnyKimDev Жыл бұрын

    3:01 it is called a Star Domain! In geometry, a set S in the Euclidean space R^n is called a star domain (or star-convex set, star-shaped set or radially convex set) if there exists an s0 in S such that for all p in S, the line segments from s0 to p lies in S. This definition is immediately generalizable to any real, or complex, vector space. (wikipedia)

  • @DefineMeAsOne
    @DefineMeAsOne Жыл бұрын

    I came in here thinking, "He's going to explain it!!! I can't wait to finally understand 4D world", I came out still confused but motivated. Idk how he casually just talks about 4d like it's nothing, but it made me motivated and happy to know that it is achievable to get to that level.

  • @FLMKane

    @FLMKane

    Жыл бұрын

    It's not 4d. Thats all 3d. The 4th dimension in this case isn't independent.

  • @aprilschauer2545

    @aprilschauer2545

    Жыл бұрын

    @@FLMKane You’re painfully wrong and have no idea how the game works.

  • @FLMKane

    @FLMKane

    Жыл бұрын

    @@aprilschauer2545 prove it

  • @evilotis01

    @evilotis01

    Жыл бұрын

    the video he links to about envisaging 4d shapes is really good

  • @farrankhawaja9856

    @farrankhawaja9856

    Жыл бұрын

    @FLMKane what do you mean? There are four degrees of freedom for position.

  • @amyshaw893
    @amyshaw893 Жыл бұрын

    When i was doing 4d rendering, i did consider building meshes to render, but eventually i just thought back on your videos and the work of inigo quilez and raymarched it instead. super simple and ran decently well, mostly. though sending the primitives to the GPU was an interesting experience

  • @durnsidh6483

    @durnsidh6483

    Жыл бұрын

    Do you have the code posted somewhere?

  • @amyshaw893

    @amyshaw893

    Жыл бұрын

    @@durnsidh6483 I don't think so. And it was awful anyway. If you look up inigo quilez on KZread, he explains rasrching really well, and has a website with lots of code examples. I recommend starting with the one about the sdf of a box, it will explain how I came to the realisation that you can use raymarching for 4d. If you're not sure what raymarching is, there's some videos on this channel too

  • @durnsidh6483

    @durnsidh6483

    Жыл бұрын

    @@amyshaw893 Well, thanks anyways!

  • @KeksosDerGrosse
    @KeksosDerGrosse Жыл бұрын

    Nice optimization with the lookup table! Getting more and more pumped to experience all this in its final form.

  • @CalebRuiz
    @CalebRuiz Жыл бұрын

    I don’t understand most of this but it makes me feel good that someone does 😂 keep up the good work!

  • @jumpander

    @jumpander

    Жыл бұрын

    Even if someone "understands" the 4th dimension, he or she still just understands the simulation and projection of it into the 3rd or onto the 2nd dimension. Actually being in a/the 4th dimension and perceiving it for yourself would probably be like staring into an infinity; which would let our brains implode.

  • @madcio

    @madcio

    Жыл бұрын

    @@jumpander You are staring into infinity every time you look at sky.

  • @jumpander

    @jumpander

    Жыл бұрын

    @@madcio But that's an understandable infinity. I can also only see so far. A forth dimension is an infinity of infinities.

  • @biqbicle4982

    @biqbicle4982

    Жыл бұрын

    @@jumpander my brain hurts stop 😆

  • @Shrek_es_mi_pastor

    @Shrek_es_mi_pastor

    Жыл бұрын

    @@jumpander El aleph??

  • @pendragon7600
    @pendragon7600 Жыл бұрын

    love 4d stuff bruh

  • @TheLonelyKirby
    @TheLonelyKirby Жыл бұрын

    Watching these videos is a crashcourse to visualising a 4D world which i’ve wanted for some time now, sick coding on top of that and this is a nerds dream walkthrough, great work!

  • @VagabondTE
    @VagabondTE Жыл бұрын

    Man, I can't even remotely follow this anymore. You have a truly impressive sense of visualization. I'm not giving up or anything, I'll get it one day. But you're trying to toss the ball as gently as you can and It's still flying miles over my head. LOL

  • @imstillwater8039
    @imstillwater8039 Жыл бұрын

    That lookup table should be the games icon/logo

  • @nicholascunningham6936
    @nicholascunningham69367 ай бұрын

    Considering sending this to my computer graphics professor. It's really cool taking his class and then coming back to this video and actually _understanding_ what you're talking about. Feel like this is something he might find interesting. I didn't understand the brilliance of the lookup texture when I first saw this video, but that's actually really clever.

  • @minerharry
    @minerharry4 ай бұрын

    Oh, by the way: the property you’re looking for, beyond convex, is called **stellar convex**. Just learned about it in my topology class!

  • @skeletonboxers7336
    @skeletonboxers7336 Жыл бұрын

    The moment I heard “we could get the cpu to slice it and then send it to the gpu” a very loud ‘blaring wrong buzzer’ sound went off in my head. Your solution for it was incredible though! Love ur stuff

  • @mattmadson5187
    @mattmadson5187 Жыл бұрын

    That truly is such a beautiful optimization, and i feel second hand pride for it, cause I'm so excited about all things 4d gaming

  • @adenzu
    @adenzu Жыл бұрын

    I'm deeply fascinated by your projects! They always fiddle with mathematics in depth.

  • @ReasonMakes
    @ReasonMakes Жыл бұрын

    This is endlessly cool. Well done. Been watching your videos for years and always look forward to the next one - but I always appreciate why they take time. Never compromise your quality for clout.

  • @Miju001
    @Miju0017 ай бұрын

    2:58 It's called star convexity! (A set with that property is a star-convex set or just a star domain)

  • @katieg2277
    @katieg2277 Жыл бұрын

    That was an amazing way to take Super Nintendo programming theory into the modern era. Tip of the hat to you sir.

  • @aprilschauer2545

    @aprilschauer2545

    Жыл бұрын

    Can you elaborate on what that is? I’m kinda curious

  • @dewhi100
    @dewhi100 Жыл бұрын

    You are a huge inspiration! Loved Hyperbolica, especially the farm level. The art gallery platforming was insane as well. Hyped for this!

  • @unflexian
    @unflexian Жыл бұрын

    I don't know if you read sci-fi but the chapter detailing how being in four dimensional space looks and behaves in Cixin Liu's "Death's End", the third novel in the Three Body Problem trilogy, it's just so coherent and believeable and I think you'd love it. Absolutely blew my mind. For instance, it explains via analogy how us looking at a two dimensional world with 2d creatures from above would see their bones organs and muscles, how when you're observing from above there is not concept of "inside" in 2d. The application one dim higher is that there is no "inside" of objects in 3d, looking at someone's hand you could see the bones and muscles as easily as the skin. looking at a rock means seeing every cross section at once, it is described as "one hundred million times the visual information you see in normal space". It explains how you had to move your body carefully, because it is impossible for 3d beings to locate their hands with four coordinates, there is always one dimension you can't quite figure out how to move in, and as such you can easily touch someone's bones instead of their hand, or poke their organs by mistake. It goes into so much detail and it's all so believable, with analogies and explanations letting you actually understand the foundations of this fabricated reality and letting you play around and figure out narratives that work with them. That trilogy is the best sci-fi I had ever read watched or experienced, possibly that I will ever experience. I highly recommend you go read that chapter, around the middle of the book. It doesn't spoil much of the plot. After that, just read the books. So good. Love your channel, cheers!

  • @primitivedev
    @primitivedev Жыл бұрын

    Your explination is great but my 3 dimensional brain can't comprehend the complexities of the 4th dimension. I admire your courage to pursue the 4th Dimension!

  • @user-hz4tc2pf3x
    @user-hz4tc2pf3x Жыл бұрын

    They say the creator of Roller Coaster Tycoon is the goat. Huge game by 1 developer, written completly in assembly, runs even on the lowest end pcs beautifully. CodeParade: Yeah rendering millions of tetraheadrons (I don't even know how to write this) in 4D should do the trick.

  • @jblen
    @jblen7 ай бұрын

    This is so insane. This man is pushing new territory for rendering, it's like if you made 3d meshes by writing the coordinates out in a list, except you can't even reference real life to think about the positions of those coordinates. And then he even optimised it for modern gpus.

  • @KevinHorecka
    @KevinHorecka Жыл бұрын

    I freakin love this channel. Please consider making longer and more detailed videos. 8min leaves me craving more!

  • @luckyjinxer
    @luckyjinxer Жыл бұрын

    That music is really good!!! Thanks for leaving the source!

  • @craz2580
    @craz2580 Жыл бұрын

    Ngl, i know nothing about coding, and what i know about 4d space is thanks to you, and my brain is melting, but you have a relaxing voice and good pace with explaining, so even if i understand less than a fish understanding trigonometry, i enjoy your videos

  • @Jellylamps
    @Jellylamps Жыл бұрын

    The lookup table idea is so good it has me even more excited than most of the rest of the video

  • @joda7697
    @joda7697 Жыл бұрын

    3:01 it's called a star shaped region! I had this in my analysis course.

  • @waitandhope

    @waitandhope

    Жыл бұрын

    Bravo

  • @WilliamMelton617
    @WilliamMelton617 Жыл бұрын

    You clever dog, you! Love listening about your dev adventures man! Thanks

  • @ace_2576
    @ace_2576 Жыл бұрын

    How smart a mans gotta be to come up with his own 4d render optimizations

  • @epsilonthedragon1249
    @epsilonthedragon1249 Жыл бұрын

    I love clever optimizations like textures. Love how this is turning out so far!

  • @ari90i
    @ari90i Жыл бұрын

    2:57 That's called the "star-convexity" of a polyhedron. If a polyhedron is star-convex, "there exists a point within the polyhedron (called the "star center") that can be connected to every point on the surface of the polyhedron by a line segment that is entirely contained within the polyhedron"

  • @primonomeultimonome
    @primonomeultimonome Жыл бұрын

    2:55 it should be a "star domain", see related description on Wikipedia.

  • @WingSun
    @WingSun Жыл бұрын

    Nice use of Rhino !🎉 for the visuals

  • @Private_Duck
    @Private_Duck Жыл бұрын

    If you encounter a problem in life that appears to have no solution, try throwing a lookup table at it. -Sun Tzu-

  • @MV-vv7sg
    @MV-vv7sg Жыл бұрын

    Singlehandedly making amazing mathematical fantasticals accessible like this and marble marcher AND giving great insight into their creation. Would love to see what would happen if you had the budget etc of a massive game dev company. Excluding all complications of multiple minds etc.

  • @dylansgoogleaccount9043
    @dylansgoogleaccount9043 Жыл бұрын

    Code parade making his 5048498484937th video on 4d games/worlds

  • @Skeffles
    @Skeffles Жыл бұрын

    Fascinating to see how you've made the lookup table for this!

  • @oliverlong345
    @oliverlong345 Жыл бұрын

    Really appreciate the technical details. It's rare to learn about both math and coding from one video!

  • @cupofdirtfordinner
    @cupofdirtfordinner Жыл бұрын

    first code parade video to officially lose me. great work man

  • @lucasa8710
    @lucasa8710 Жыл бұрын

    Dude your solution to build the look up table is so fucking smart

  • @deoxyplasmic
    @deoxyplasmic Жыл бұрын

    Yay! I'm always glad to see you posting.

  • @DreadEnder
    @DreadEnder Жыл бұрын

    True 4d is all of the different views combined and more that we can’t comprehend

  • @drdca8263

    @drdca8263

    Жыл бұрын

    No?

  • @Izzythemaker127

    @Izzythemaker127

    Жыл бұрын

    @@drdca8263 No their right, a 4d creature would see a 3d image out of their eyes, just like how us 3d creatures see a 2d image out of our eyes. However we are not 4 dimensional creatures, and we can only see a max of 2(for our 2 eyes) 2d images at a time, and to comprehend 4d, you would need just as many "depth pixels" or separate images as you would pixels wide and tall. So it would be impossible to get a true 4d view.

  • @drdca8263

    @drdca8263

    Жыл бұрын

    @@Izzythemaker127 I’m not sure that makes it “all the views combined”

  • @Izzythemaker127

    @Izzythemaker127

    Жыл бұрын

    @@drdca8263 fair enough, but Its just the 3d -> 4d equivalent of 2d -> 3d combining many 2d planes to make a 3d space. So, you're right, the wording is a bit confusing, but also the original commenter isn't wrong.

  • @drdca8263

    @drdca8263

    Жыл бұрын

    @@Izzythemaker127 4D spaces are perhaps things we can’t *properly* visualize, on account of our brains being hard-coded for 3D spaces, but I still think it isn’t right to say that true 4D is “all the views combined” nor really that 4D spaces are “incomprehensible”.

  • @stl-xx5rq
    @stl-xx5rq Жыл бұрын

    What would happen if you combine 4D and hyperbolic geometry?

  • @CodeParade

    @CodeParade

    Жыл бұрын

    They're each hard enough to understand on their own 😅 but you could.

  • @packediceisthebestminecraf9007

    @packediceisthebestminecraf9007

    Жыл бұрын

    that would probably be completely incomprehensible for anyone playing it

  • @youtubeuniversity3638

    @youtubeuniversity3638

    Жыл бұрын

    @@packediceisthebestminecraf9007 So the next Big Indie Title.

  • @juliewinchester1488

    @juliewinchester1488

    Жыл бұрын

    Perhaps for a Hyperbolica sequel 👀

  • @AndrewBrownK

    @AndrewBrownK

    Жыл бұрын

    I believe after we have games like this we'll have people acquiring a yet unseen intuition for Einstein's Relativity

  • @ZeDlinG67
    @ZeDlinG67 Жыл бұрын

    Dude! You are on the frontier of 4D rendering and pushing it further! Amazing

  • @avialexander
    @avialexander Жыл бұрын

    Not sure if anyone else has mentioned it, but tetrahedral meshing is something done very commonly in fluid simulation codes, you may be able to use one of those software packages to make your tet meshes more robust and less skewed.

  • @CodeParade

    @CodeParade

    Жыл бұрын

    That's interesting to know! But I think the problems are different. You generally try to minimize the tet count in 4D rather than have them distributed in a specific way. But maybe it could be useful for subdivision.

  • @HypernovaBolts11
    @HypernovaBolts11 Жыл бұрын

    Alright. That's brilliant. I can't wait to play!

  • @Wulfstrex

    @Wulfstrex

    4 ай бұрын

    Then just you wait until the 22nd of March to play

  • @gchtrivs7897
    @gchtrivs7897 Жыл бұрын

    Excited to play this game.

  • @Wulfstrex

    @Wulfstrex

    4 ай бұрын

    Then be excited for the 22nd of March

  • @AVervyCoolDude
    @AVervyCoolDude8 ай бұрын

    This video has so much math and/or coding knowledge it hurts my brain to try to think about it.

  • @bobbysanchez6308
    @bobbysanchez6308 Жыл бұрын

    Hopefully this will be a warmup for a 4D fractal marble marcher

  • @puspamadak
    @puspamadak Жыл бұрын

    Genius ideas you have got. Even though I didn't understand the last part about slicing, I hope at some point in the future I will understand it well.

  • @tim8778
    @tim8778 Жыл бұрын

    Ain't afraid to admit that I need the assistance of Google to get through these videos. But you keep putting out great stuff so I'll keep at it

  • @msmith2961
    @msmith2961 Жыл бұрын

    That lookup grid is a fantastic idea to save on processing power!

  • @VHenrik007
    @VHenrik007 Жыл бұрын

    Incredible work, these ideas are great, can't wait for the game.

  • @sdsdfdu4437
    @sdsdfdu4437 Жыл бұрын

    This is inspiring! I'd love to hear your thought process when it comes to designing a 4d level, like, conceptually, because I can't imagine how you'd even begin doing that.

  • @Wulfstrex

    @Wulfstrex

    4 ай бұрын

    There is even going to be a level editor too

  • @celadon2048
    @celadon2048 Жыл бұрын

    Replacing logic with a data structure is one of my favorite things. When I made a Rubik's cube simulator/solver in Javascript with three.js, I had trouble knowing exactly which way to rotate a face to move a piece; like, which way should I rotate the right (R) face to move a piece from the top (U) to the front (F). Ended up manually typing a nested dictionary so that I could look up Move[R][U][F] to get R'. That was the most productive 10 minutes of typing in the whole project.

  • @idirkhial9422
    @idirkhial9422 Жыл бұрын

    Superb video as always!

  • @paavorotsten508
    @paavorotsten508 Жыл бұрын

    0:30 me when i see a honkin pair

  • @empireempire3545
    @empireempire3545 Жыл бұрын

    Okay, i consider myself relatively acquainted with multidimensional spaces but you blew my brains out xD This is worthy of at least a few scientific papers!

  • @gold4963
    @gold4963 Жыл бұрын

    I think this game concept is very, very unique! I've got the game wishlisted on Steam, and I can't wait to play it when it comes out!

  • @Wulfstrex

    @Wulfstrex

    4 ай бұрын

    Well, wait only some longer for the 22nd of March

  • @person1082
    @person1082 Жыл бұрын

    2:36 my first thought was parametric equation spam with the third parameter going perpendicular to the other 2

  • @Veptis
    @Veptis9 ай бұрын

    I have been to a conferece recently, on cognitive linguistics and one of the talks had your game in the title. There are researchers that are interested in how players of impossible geometry games come up with words to describe locations and directions. They have a "VR gaming lab" in Berlin and play your games.

  • @AndrewDavidJ
    @AndrewDavidJ Жыл бұрын

    This is wild.

  • @wsshambaugh
    @wsshambaugh Жыл бұрын

    There are some really interesting symmetries in that texture you generated. Some combination of shift, rotational, and reflective symmetries, that it took me a few moments to realize are only apparent if you wrap both the edges.

  • @tniglennede_oibftronnede_x36
    @tniglennede_oibftronnede_x3611 ай бұрын

    Very impressing work ! 🙂

  • @playbyan1453
    @playbyan1453 Жыл бұрын

    On 6:59 I remember making a lookup table for a ray tracing on shadertoy, also it calculated the bounding boxes too.

  • @fifi8284
    @fifi8284 Жыл бұрын

    I saw 3d golf at game stop and thought of your game. I thought wow 3d golf that so last generation we have 4d golf now

  • @bagelnine9
    @bagelnine9 Жыл бұрын

    (6:59) That actually looks like some very good pixel art of a plant.

  • @free4one2three
    @free4one2three Жыл бұрын

    I honestly can't wrap my head around the 4d concept of tetrahedras. But I'm stoked that someone else can, and that he's willing to try and explain it to us.

  • @ddaaxx2
    @ddaaxx2 Жыл бұрын

    3:47 i need to fight my arch nemesis THE ROCK

  • @DashieDasher
    @DashieDasher Жыл бұрын

    A good lookup table solves so many problems.

  • @namelessxdread
    @namelessxdread Жыл бұрын

    How is someone this smart? This is like the top .000000001% of geniuses.

  • @ollllj
    @ollllj Жыл бұрын

    my favorite basic 4d shape so far is the semi-unholy union between a 3d cone and a 3d ellipsoid, because its tracing/marching math is VERY efficient (it is still only quadratic complexity) and it smoothly (parabola-tweening) unifies cone+ellipsoid(+sphere as special case ellipsoid); See [cone+Ellipsoid=Unicorn 4d - Shadertoy]

  • @randomPerson88399
    @randomPerson883999 ай бұрын

    I understand the whole extrusion thing when making 3d objects 4d, but extrusion can only go son far. Like if you extrude a circle, you will get a cylinder, but not a sphere. I don't know if I just missied something or what, regardless, this remains an extremely impressive project.

  • @Bolpat
    @Bolpat Жыл бұрын

    2:55 The property is called star-shape (or I'm horribly mistaken). If I remember correctly, a shape is star-shape if there is a point (called the center point) such that every point in the shape is connected to the center point by a straight line (or a geodesic, for a non-Euclidean topology).

  • @eChuckNorris
    @eChuckNorris Жыл бұрын

    If you are a new developer looking at this and thinking "I'll never be able to code like that!" don't despair... I've been a software engineer for a few years now and this magic still baffles me and likely always will.

  • @AllenKnutson

    @AllenKnutson

    Жыл бұрын

    This sounds like "DO despair" to me.

  • @user-dh8oi2mk4f

    @user-dh8oi2mk4f

    Жыл бұрын

    @@AllenKnutson LOL

  • @pranavp.a1200
    @pranavp.a1200 Жыл бұрын

    You are a true inspiration my guy

  • @kendakgifbancuher2047
    @kendakgifbancuher2047 Жыл бұрын

    Absolutely beautiful

  • @maxofcourse
    @maxofcourse Жыл бұрын

    I think I would die working on this game. But I'm glad you're doing it.

  • @mihirpatel3010
    @mihirpatel3010 Жыл бұрын

    Wow dude. That's amazing!

  • @Splarkszter
    @Splarkszter Жыл бұрын

    you are more than a magician. sir.

  • @jem5636
    @jem5636 Жыл бұрын

    This was definitely an update where I didn't understand the maths. But glad to see it's going well!

  • @rysea9855
    @rysea9855 Жыл бұрын

    The rendering is by far the most interesting thing so far

  • @voxling
    @voxling Жыл бұрын

    Imagine a shooter in this Engine WASD for the normal movement along the x and y axis Normal limited movement in the z axis Custom mouse binds for movement in the W axis (like q,e,scroll up,scroll down) what a absolute monster of a game to play

  • @Norsilca
    @Norsilca Жыл бұрын

    Only one person is actually playing 4D chess, and it's this man.

  • @crest916
    @crest916 Жыл бұрын

    I love hearing about the crazy rending techniques. Can't wait for 4d windmill obstacles.

  • @itisALWAYSR.A.
    @itisALWAYSR.A. Жыл бұрын

    You probably already know this but 5:47 if you have deeply nested if-else functions, you can often abstract away a lot of that by logical inversion- this makes code much more readable (and sometimes faster since once a statement is deemed false what follows gets ignored through obligation). Plenty of articles out there about inverting if-else statements, should it be something you (or anyone else) want to explore. :)

  • @necauqua

    @necauqua

    Жыл бұрын

    bruh this is only(!) for code style and to reduce nesting. While I personally love this, your statement about it being faster has no point since on the bytecode/machine code level ifs are conditional jumps and inverted or not they look the same (and the compiler reduces the boolean negations to absolute minimum as the simplest optimisation)

  • @theonlymrcat638

    @theonlymrcat638

    Жыл бұрын

    And the real problem with using if-statements on the GPU is that the execution path always goes through *both* sides of it; the cores that failed/passed the conditional check are just "turned off" and don't execute the wrong path's statements. Each core goes through every line of code in the shader, and having lots of conditionals means lots of time where cores aren't executing anything.

  • @Dilithium1
    @Dilithium1 Жыл бұрын

    “This 100% made sense”

  • @Ch0rr1s
    @Ch0rr1s Жыл бұрын

    My brain hurts. but i love it. Not a huge fan of golf, but i'm gonna get a copy just to indulge myself in the 4D aspect of that game.

  • @helmiplayerone2670
    @helmiplayerone26707 ай бұрын

    I totally understand what you said

  • @oriandon22
    @oriandon22 Жыл бұрын

    I do work with 3- and 4-manifolds, and love these videos. There's so much good concrete stuff to know beyond academic research programs!! Do you have any thoughts as to why your lookup table looked like that? I was surprised it wasn't symmetric in any way.

  • @tiffany352

    @tiffany352

    Жыл бұрын

    I think it's partially because the lookup table is really a 2x2x2x2x4 image that has been squashed to fit into 2D. Although it's possible it's not symmetric even in that higher dimensional space as well. It might have had more visible patterns if he'd used a different indexing scheme. The video shows bits 0-2 used for the X and 3-5 used for Y. It's hard to work backwards and figure out which configurations each pixel corresponds to. I think if the image was organized with X = (ID&1)

  • @CodeParade

    @CodeParade

    Жыл бұрын

    It's not symmetric because of the way I brute forced it. One of the slice triangles gets priority over the other for the 1-triangle solution, and I sometimes have to flip the winding order of the triangles to match the 4D normal orientation. So it all gets kind of messy.

  • @luelou8464

    @luelou8464

    Жыл бұрын

    Suspect it would show more of a pattern if you used a k map.

  • @matcarpes
    @matcarpes Жыл бұрын

    this is super impressive!