Calculating Flow Fields for Rats in 'A Plague Tale' | AI and Games #73

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ย. 2024

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

  • @viviannavicious
    @viviannavicious ปีที่แล้ว +41

    It's obvious, the giant rat AI makes all of the rules to see what kind of trouble they can get into.

  • @LyingTube
    @LyingTube ปีที่แล้ว +13

    I confess flow fields hadn't entered my mind, I was fairly convinced the rats were handled as part of a fluid shader! 😄

  • @Ghost_Of_SAS
    @Ghost_Of_SAS ปีที่แล้ว +55

    I played Plague Tale on gamepass, having seen nothing about it beforehand, so I did not even know about the rats. Imagine my reaction when I saw a thousand of them swarming towards me. that final boss in the first one is still one of the most impressive things I have seen in gaming.

    • @AIandGames
      @AIandGames  ปีที่แล้ว +5

      The fact I played those final sequences on a Steam Deck at a solid 60fps is *very* impressive.

  • @AlanZucconi
    @AlanZucconi ปีที่แล้ว +9

    2:04 reminded me *so* much of the swarm of scarabs in "Tomb Raider IV The Last Revelation"!
    Also: "optimise the rats" is such a scary sentence to say! 🤣

    • @AIandGames
      @AIandGames  ปีที่แล้ว

      Oh yeah, I forgot about that game. I suspect it's probably using a similar concept? I dunno, it's been so long since I played old Tomb Raider... 😅

  • @dainchi.
    @dainchi. ปีที่แล้ว +9

    Man, I'd love to see an episode on how Supcom 2 and Planetary Annihilation do their pathfinding. I remember better Pathfinding being one of the standout features of Supcom 2, to the point where it was a main marketing bulletpoint.

  • @Bloodlinedev
    @Bloodlinedev ปีที่แล้ว +2

    I've just realized that the idea behind flow field pathfinding is a bit like deferred rendering. I've use this technique before for zombies, super quick and easy to implement.

  • @Battleguild
    @Battleguild 8 หลายเดือนก่อน

    I would love to see an example of Flow Fields being used to simulate Pitch Black environments that adventurers would come across when traversing dungeons or underground caverns.
    I wonder if it would be less or more taxing than a traditional light/shadow system.

  • @Random_Dragon_Furry
    @Random_Dragon_Furry 11 หลายเดือนก่อน +2

    Literally a hive mind for rats.

  • @marvel626
    @marvel626 ปีที่แล้ว +2

    This channel is so cool and underrated. Love your content!

  • @TennessseTimmy
    @TennessseTimmy ปีที่แล้ว +2

    Could someone clarify,
    Rat checks it's position on the grid(find grid it's on)?
    Grid has an direction assignment?
    Rat moves towards direction assignment?

  • @skeleton_craftGaming
    @skeleton_craftGaming 11 หลายเดือนก่อน

    This is a really clever way of doing that, GPUs are basically optimized for doing calculations like interpolating between two vectors....

  • @zejugames5045
    @zejugames5045 ปีที่แล้ว +2

    Amazing video, never knew about this AI approach!
    Have you been following the Road to Vostok devlogs? The dev looked into various enemy AI approaches (FSM, behavior trees, etc.) and decided on a separate approach... it sounded really interesting and thought it might be of interest to you!

    • @AIandGames
      @AIandGames  ปีที่แล้ว +1

      I did not know about that, but I'll be sure to check it out!

  • @matthewboyd8689
    @matthewboyd8689 ปีที่แล้ว

    Is that flow field the same way days gone had a thousand zombies at once?

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

    I''ve been wondering how they achieve the rat self collision? there is no imformation about it on the internet

  • @pawebernaciak1581
    @pawebernaciak1581 ปีที่แล้ว +1

    So you can say that this is in a way particle system, rats are particles that get their velocity to move using grid as source of their velocity. Using fields it's pretty common in film FX and there are entire type of simulation doing that ie. flip simulation(water, fluid), generalized form MPM is generalization and was used for snow on frozen. It's pretty much the same process but name is different

    • @AIandGames
      @AIandGames  ปีที่แล้ว

      Well yes and no. Particle systems typically imply the modelling of force/velocity and possibly collision, which isn't being modelled by the flow field. There's no effort to handle the velocity or acceleration of the rats by this system. The rats all operate on their own fairly simple controller to handle speed and often ignore collisions entirely. Even then the particle system doesn't have explicit knowledge of the environment, which this is designed to do on a per-scenario basis.
      As mentioned earlier in the video, the smaller schools of fish in Sea of Thieves are handled by particle systems (ran as a shader no less).

    • @pawebernaciak1581
      @pawebernaciak1581 ปีที่แล้ว

      @@AIandGames depends on definition of particle system if we use point cloud of points that move from frame no velocity is needed. I did some detail on river for some commercial last year in pretty much exact way as you described. Difference might be you think about particle system as part of engine when I simplify it to simplest definition from papers/books as basis?
      Also fun fact in “Art of fluid animation” they describe how fluid sim works on bugs moving from cell to cell in apartment block.

  • @DrMarlboro_1
    @DrMarlboro_1 10 หลายเดือนก่อน

    You should make a video about the rain world ai

  • @timbus2
    @timbus2 ปีที่แล้ว

    Damnit… now I want to play these games. (Including Micro Machines! 😂)

  • @lauraschlieselhuber8487
    @lauraschlieselhuber8487 ปีที่แล้ว +1

    My theory was that it relied on a particule system, but if feels like it's different than that, somehow. Like a cloud of points with simplified path finding instead of manual inputs for velocity and areas of actions. That's the only way for me to imagine it, but it's probably because i'm a graphic designer and no programmer lol.

  • @benjarubio3251
    @benjarubio3251 ปีที่แล้ว

    great video

  • @anteshell
    @anteshell ปีที่แล้ว

    I'm nowhere near 40 (34 d'uh), but Micro Machines was basically an essential part of my childhood.
    But about the rats, when I played both games, I was certain that the rats are implemented using some kind of particle system in a flow simulation. If you manage to isolate a couple of individual rats to a unescapable corner, they behave very much like particles losing all their intelligence breaking the immersion. While this is extraordinary feat as a whole, it really only works with masses of rats and breaks down completely on individual level breaking the immersion. Although it is arguable that my curiousness already killed the immersion beforehand when I tabled the turn and started to harass the rats myself and not fault the game for it. ;D

  • @Salient-n7c
    @Salient-n7c 11 หลายเดือนก่อน

    HEY!! Im only 39!!

  • @Speed001
    @Speed001 ปีที่แล้ว +2

    Flow Feilds reminds me of the what i learned in fluid dynamics.
    Track a particle or a certain space-volume.

  • @Ixarus6713
    @Ixarus6713 ปีที่แล้ว +3

    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room.
    A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    And RATS make me crazy....
    Crazy? I was crazy once...
    They locked me in a room. A rubber room...
    A rubber room with RATS.
    *_A n d R A T S m a k e m e c r a z y . . . ._*

  • @Megasteakman
    @Megasteakman ปีที่แล้ว

    Thanks for this! I have been wondering about this one for a while, and its fascinating! Also, Micro Machines was such a good game, haha.

  • @smokeback
    @smokeback ปีที่แล้ว

    Amazing ai video as always to learn from

  • @brandyhandy4157
    @brandyhandy4157 ปีที่แล้ว

    Good job 🏆🙂🙏🏼