This voxel game runs fully on the GPU ?!

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ธ.ค. 2024

ความคิดเห็น • 24

  • @Nufshi
    @Nufshi 6 หลายเดือนก่อน +15

    Sick video. Now remake your engine in assembly(points gun)

  • @assemblyrtsdev
    @assemblyrtsdev 6 หลายเดือนก่อน +3

    Really impressive that you managed to code all of this for the GPU 👍

  • @oglothenerd
    @oglothenerd 6 หลายเดือนก่อน +1

    I love watching game developers suffer. :)

  • @FrankGennari
    @FrankGennari 6 หลายเดือนก่อน

    Amusing as always! I love all the humor you put into these videos to make it more interesting than some of the other voxel terrain videos that are 90% technical details.
    You're taking a different approach than the one I used back when I was working on voxel terrain. I initially did it with multiple threads using OpenMP on the CPU. I did eventually move the voxel noise/weights generation into a GPU compute shader, but I had to keep the voxel grid on the CPU for collision detection, physics, AI, etc. I didn't find editing the terrain to be a big problem because it didn't require generating any new noise values. The voxel chunks were updated on independent threads, and a single modification didn't affect more than 8 chunks at a time.
    One idea I had was to store the voxels both on the CPU and the GPU. The GPU does most of the generation and update logic. The CPU has a lower resolution copy of the voxels around the player and any active enemies that it uses for physics, collision, etc. It can be a lower resolution and bugs/errors are less likely to be noticed. I actually do use this system for heightmap terrain, but I never used it for voxels. Of course it will make the code even more complex.

    • @MaxMakesGames
      @MaxMakesGames  6 หลายเดือนก่อน

      Thanks!
      Yeah your approach seems similar to what I had before and to be honest it's probably better in the end haha

  • @capslpop
    @capslpop 6 หลายเดือนก่อน +4

    I think I am on engine rewite like 9 now for my voxel engine? I wouldn't worry about how many times you rewrite your code base. It just gets better each time.

    • @MaxMakesGames
      @MaxMakesGames  6 หลายเดือนก่อน

      100% rewriting is good but its kinda depressing remaking the same thing

    • @HazelRoseWebs
      @HazelRoseWebs 5 หลายเดือนก่อน

      @@MaxMakesGames it definitely can be. currently working on a Source Engine like system for Godot and am on my third rewrite; it can be both fun and aggravating lol

  • @Skeffles
    @Skeffles 6 หลายเดือนก่อน

    Brilliant job! It's amazing to see how well it performs on the GPU. Good luck with those bugs

  • @jakubzakowski7422
    @jakubzakowski7422 6 หลายเดือนก่อน +1

    When I slept through the night on one arm and woke up: 2:35

  • @Kooczsi
    @Kooczsi 6 หลายเดือนก่อน +2

    I just want to say that we really appreciate these videos. They are very entertaining, informative and well made. I hope that you will find more success with the algorithm soon

    • @MaxMakesGames
      @MaxMakesGames  6 หลายเดือนก่อน

      Thanks a lot !
      I hope so too haha

  • @Melechtna
    @Melechtna 6 หลายเดือนก่อน

    The main problem with doing things in parallel, which you KIND OF touched on, is that "avoid working on the same thing twice" issue. Generally the best approach I've found is to use some kind of "I'm working on this" method where, if one of the cores of the gpu, cpu, whatever, is working on one, declare this somewhere (it's that part I still struggle with, as creating a file every time and checking it isn't super efficient) probably with a variable would be more ideal, but that quickly gets messy. This is PROBABLY what the atomic code tries to do, but frankly, anything that tries to do this automatically, usually doesn't give good results in my experience, and if you do it yourself, you KNOW what it's doing.
    The reason trying to do this via variables is usually, you kind of need a variable for every possible potential core that a GPU has, so that way each core can declare what part it's working on, and this gets stupid pretty quick if you try to do it by hand, and trying to do this in code is quite messy, and will likely cause a memory leak if done even slightly wrong.

    • @MaxMakesGames
      @MaxMakesGames  6 หลายเดือนก่อน

      On the cpu you have locks and mutex to help you but on the GPU I think there are only atomic variables and barriers... It's hard :(

    • @Melechtna
      @Melechtna 6 หลายเดือนก่อน

      @@MaxMakesGamesThat and just about every compiler just...HANDLES that these days for the CPU, I sometimes forget about that. But yes, I was exclusively thinking about when I tried to handle this in python for a kind of "video scrubber", though it was closer to an image scrubber, basically it was used to scrub through images generated in frame interpolation to make cleaning up "funny frames" as I call them, easier. I tried to get this working on the GPU to speed up the process....this RAPIDLY got thrown out the window, because it was a logistical nightmare. I got it KIND OF working, but it was not only slower than if the CPU did it, it frequently got confused as to where we were because I then needed to handle collisions, because two cores would randomly try to do the same job at the same time, and I just said fuck it.

  • @TCGamers
    @TCGamers 6 หลายเดือนก่อน

    1:55 Laughed so hard at this 🤣

  • @Vilebreken
    @Vilebreken 6 หลายเดือนก่อน

    i'll really love to test it myself

  • @Littleclone
    @Littleclone 6 หลายเดือนก่อน

    Great Video, and no, it will don't give a video who you don't break things xd (but i hope it for you)

  • @brawldude2656
    @brawldude2656 6 หลายเดือนก่อน

    Me who doesn't have gpu: 😃(I can't take this anymore)

    • @MaxMakesGames
      @MaxMakesGames  6 หลายเดือนก่อน

      Skill issue 😎
      Well without a GPU you probably can't run very well or at all most games

    • @brawldude2656
      @brawldude2656 6 หลายเดือนก่อน

      @@MaxMakesGames I can barely watch youtube at 1080p 💀

  • @blacknwhite1313
    @blacknwhite1313 6 หลายเดือนก่อน

    Nice 💚

  • @MaxPewpew
    @MaxPewpew 6 หลายเดือนก่อน

    still want to play game and can but also cant because iperating system

  • @gigantopithecus8254
    @gigantopithecus8254 4 หลายเดือนก่อน

    nice video