The description listed a mirror of this video on Vimeo, but I’m not sure if it’s still accessible as I have no access to Vimeo here: https://vimeo.com/649009599

Recently I discovered something called data-oriented design and I thought it was such a brilliant concept. Here are other references I recommend:

  • ZILtoid1991@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    2 days ago

    I do a lot of stuff like that in my game engine, alongside with Entity Component System. Not everything is ECS as I still use some OOP stuff there and there, just to make my life easier in non-performance critical applications.

    • hono4kami@piefed.socialOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 days ago

      in my game engine, alongside with Entity Component System

      You make your own game engine?

      Yeah, I came across the concept of ECS while I was trying out a game engine called Bevy. It was interesting but like many framework made using Rust, it has too many abstraction or macros. It’s not always a bad thing & I totally get why it’s like that, but I want something more lower level for learning purpose.

      So I searched around for more low-level stuff and found this talk by Andrew Kelley. Also I’m currently trying to create some city-sim game using Raylib and Zig, and I plan to try to apply to the game I’m making. It’s my first time trying to properly make a game so it’s gonna take a while lol

      • calcopiritus@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 day ago

        If what you want is low level, I recommend wgpu. And you can go even lower level of you go for wgpu-core instead.

        However, when you go this low level, making a game is not the objective, since it would be incredibly tedious compared to using an actual game engine. I had a lot of fun doing small things with wgpu though. Learned a lot too.

      • ZILtoid1991@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 days ago

        I also first encountered it through Bevy, but I did it in a less obtuse, less macro-heavy way in mine, as well as using D instead of Rust (D IMHO is better for gamedev stuff, due to not being as much functional programming-first as Rust). Please note that mine does not have much 3D capabilities as of yet, as my game engine is 2D first with some optional 3D later being added.

      • hono4kami@piefed.socialOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        not sure who lunduke is & why we’re talking about it under a post about data-oriented design :/

    • hono4kami@piefed.socialOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      3 days ago

      Huh, what interview?


      Yeah, it’s such an interesting concept, and I like how Andrew not only explains the concepts well in such a short time, he also explains how he applies to Zig’s compiler at the later part of the talk. Even more interesting, (CMIIW) data-oriented programming originated from game development, but as we can see it can also be applied everywhere else

      • onlinepersona@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        Yeah, the second he started talking about computer architecture, I thought “he’s going to align the data and keep it close to each in memory for better caching and faster access, isn’t he?”.

        At the moment, it looks like an interesting way to optimise an existing program. I’m not sure if thinking about it right from the beginning will speed up programming as, IMO, first something functional has to be written with somewhat good architecture, then the architecture improved to make sense and more features added, and once a v1 exists that’s satisfactory, then optimisation starts.

        Maybe I’m wrong though and this is something that can be considered from the getgo, but it feels more like a latestage kind of thing. Some if it can definitely be taken care of by the compiler and the developer made aware of with warnings.

        • calcopiritus@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 day ago

          It’s not one thing or the other.

          For example I often end up using event loops. Where an event is a tagged union. Some events take up 1 byte, some 400. It’s almost effortless to put the big variants in the heap, and just keep a pointer in the union. So why not do it from the start.

          Sure, optimizing every loop to make it vectorizable is probably not worth it, since that loop you wrote on the 10th commit might not even exist when the software is released. But there are many low hanging fruit.

          Also, some optimizations require a very specific software architecture. Turning all your arrays of structs into structs of arrays may be a pain if you didn’t plan for making that switch.