Making a large Battle Simulator game with Bevy and Rust

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 21

  • @bipedpotato
    @bipedpotato  6 месяцев назад +5

    Subscribe for a "consistent" upload schedule, also I'm aware that this video doesn't have the most elegant explanations, and I guess youtube compression really dislikes this video as well I just wanted to get it out as soon as possible so we don't reach 4 months without uploading.

  • @vitasartemiev
    @vitasartemiev 4 месяца назад +9

    There is a crate called bevy-spatial. It provides kd-trees that track marked entities as a resource. It supports fast lookups within a radius, nearest neighbor lookups and axis-aligned rectangle lookups (see pull request). It may help you outright or inspire you for your own version.

  • @darknetworld
    @darknetworld 6 месяцев назад +4

    That so cool. I bet it not easy to run smooth for many units in game.

    • @bipedpotato
      @bipedpotato  6 месяцев назад +1

      yeah it was pretty complicated and I’ve only reached the surface of full potential battle simulators like UEBS that can simulate millions of units ON TERRAIN AND WITH ANIMATION without that much lag.

  • @Kram1032
    @Kram1032 10 дней назад

    I wonder if you could further improve on the quad tree idea using adaptive volumetric fluid simulation methods: Do you really need to calculate the precise movement of every single unit stuck in the center of a large crowd? Maybe it's possible to approximate via clusters.
    That way, the quad tree would have the opposite behavior: Large chunks of crowd would count as a single multiunit that can only move more or less in lockstep. No need to calculate every single collision there. The closer to "the surface" (the frontline, the backline, the flanks) you get, the finer the grid as motion is less restricted.
    One tricky bit there is how to calculate individual positions from the summarized one without generating more work than was saved in the first place, but I suspect it might be possible.
    You'd also have to be able to quickly recalculate based on selection but I think that's already a problem now so you probably already solved that

  • @andydataguy
    @andydataguy 13 дней назад +1

    Awesome video!

  • @itzhakeretzkdosha6875
    @itzhakeretzkdosha6875 6 месяцев назад +4

    Great video! It would be nice if you explained the last part where you add shooting with some code and drawings

    • @bipedpotato
      @bipedpotato  6 месяцев назад

      Yeah you are right but the video was getting a bit long, perhaps in another video further down the line?

  • @morkallearns781
    @morkallearns781 6 месяцев назад +2

    I've been making grass and am hitting a hard performance bottleneck, so I was thinking about trying a custom render pipeline to implement instancing as well. Fixed update might also be useful. Really cool stuff! Definitely relate to the "messy and inefficient" part, probably will have to rewrite it once I get all the pieces of my game working (gameplay tbd, but building a huge procedurally generated open world).

  • @peterhayman
    @peterhayman 4 месяца назад

    thanks for sharing! traversing quad trees sounds super interesting

  • @bonesai-dev
    @bonesai-dev 6 месяцев назад +2

    This is really awesome

  • @nihil75
    @nihil75 6 месяцев назад +2

    umm.. I think Bevy 0.12 already does batching & instancing for you without a custom shader?
    I can render 6.5 million blades of grass with:
    var model = mesh_functions::get_model_matrix(vertex.instance_index);
    (I did not define instance_index myself. it's built in to the vertex input)

    • @bipedpotato
      @bipedpotato  6 месяцев назад +3

      this way i have more control and can remove features that I deem to be useless to my project, also I did not know that instancing was already built into bevy and didn’t want to test it out.

  • @thedevblog5916
    @thedevblog5916 3 месяца назад

    Super cool! Sorry if I missed it, but are you using a custom physics engine? Or are you using a crate?

    • @bipedpotato
      @bipedpotato  3 месяца назад +1

      its just a simple separation check which is made more performant through a spatial partitioning system through a quadtree. I didn’t use any crates.

  • @JoMaFjErynMaLaZOr
    @JoMaFjErynMaLaZOr 6 месяцев назад +2

    I like

  • @GonziHere
    @GonziHere 6 месяцев назад +1

    Nice, btw is it fully deterministic?

    • @bipedpotato
      @bipedpotato  6 месяцев назад

      So i would like it to be but as you can probably tell from the last segment of the video, one side should not win by so much with equal units. The combat system is a really hacky system that I whipped up last minute so I didn’t really expect much either. Other than that the rest of the game should be completely deterministic as Its run on a fixed update.

  • @spindlywebs
    @spindlywebs 4 месяца назад

    always happy to see non ai gamedev vids :D

  • @LivanariLivanari
    @LivanariLivanari 3 месяца назад

    video is too hard to understand