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

  Рет қаралды 14,422

AI and Games

AI and Games

Күн бұрын

The Plague Tale games are known for the swathes of rats that infest the lands, and do their best to kill the player and everyone else. In this episode, we dig into detail on how the rats actually work, and how it ties back to the Micro Machines games of the early 1990s.
References for this episode:
How A Plague Tale: Innocence's rat hordes were made
www.rockpapershotgun.com/how-...
How ‘A Plague Tale: Innocence’ Makes Diseased Rats So Terrifying
variety.com/2018/gaming/featu...
Making the rat-tastic sequel A Plague Tale: Requiem, Game Developer, 2022
www.gamedeveloper.com/design/...
Video Chapters
[00:00] Introduction
[01:17] We Have a Rat Problem
[03:19] How the Rat AI Works
[08:12] How You Balance AI Rats
[11:02] Wait, Micro Machines???
[13:21] Closing
[14:29] Credits
--
AI and Games is a KZfaq series on research and applications of Artificial Intelligence in video games.
Follow 'AI and Games' for educational videos and essays:
/ @aiandgames
My second channel 'AI and Games Plus' is dedicated to bonus content, deep-dive analysis, revisiting old topics and more:
/ @aiandgamesplus
Listen to my podcast 'Branching Factor', as I discuss game development and research with my co-hosts and guests:
shows.acast.com/branchingfactor
Watch Livestreams: / aiandgames
Join our Community: discord.aiandgames.com
Buy our Merch: store.aiandgames.com
--
You can support AI and Games via Patreon and KZfaq memberships, and in return, you get bonus rewards!
/ aiandgames
www.youtube.com/@AIandGames/join
--
Follow 'AI and Games' on social media.
Twitter: / aiandgames
Mastodon: mastodon.gamedev.place/@AIand...
TikTok: / aiandgames
Instagram: / aiandgames
Threads: www.threads.net/@aiandgames
--
If you're interested in working with us, check out the following:
Business Enquiries: contact@aiandgames.com
Arrange Meeting: calendly.com/aiandgames

Пікірлер: 35
@viviannavicious
@viviannavicious 10 ай бұрын
It's obvious, the giant rat AI makes all of the rules to see what kind of trouble they can get into.
@Ghost_Of_SAS
@Ghost_Of_SAS 10 ай бұрын
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 10 ай бұрын
The fact I played those final sequences on a Steam Deck at a solid 60fps is *very* impressive.
@LyingTube
@LyingTube 10 ай бұрын
I confess flow fields hadn't entered my mind, I was fairly convinced the rats were handled as part of a fluid shader! 😄
@AlanZucconi
@AlanZucconi 10 ай бұрын
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 10 ай бұрын
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. 10 ай бұрын
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.
@Speed001
@Speed001 10 ай бұрын
Flow Feilds reminds me of the what i learned in fluid dynamics. Track a particle or a certain space-volume.
@Bloodlinedev
@Bloodlinedev 10 ай бұрын
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.
@Random_Dragon_Furry
@Random_Dragon_Furry 8 ай бұрын
Literally a hive mind for rats.
@marvel626
@marvel626 9 ай бұрын
This channel is so cool and underrated. Love your content!
@Megasteakman
@Megasteakman 10 ай бұрын
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.
@Battleguild
@Battleguild 6 ай бұрын
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.
@TennessseTimmy
@TennessseTimmy 10 ай бұрын
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?
@stupidmonkey089
@stupidmonkey089 10 ай бұрын
yes
@Random_Dragon_Furry
@Random_Dragon_Furry 8 ай бұрын
​@@stupidmonkey089The monkey is correct.
@smokeback
@smokeback 10 ай бұрын
Amazing ai video as always to learn from
@zejugames5045
@zejugames5045 10 ай бұрын
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 10 ай бұрын
I did not know about that, but I'll be sure to check it out!
@skeleton_craftGaming
@skeleton_craftGaming 8 ай бұрын
This is a really clever way of doing that, GPUs are basically optimized for doing calculations like interpolating between two vectors....
@matthewboyd8689
@matthewboyd8689 9 ай бұрын
Is that flow field the same way days gone had a thousand zombies at once?
@benjarubio3251
@benjarubio3251 10 ай бұрын
great video
@brandyhandy4157
@brandyhandy4157 10 ай бұрын
Good job 🏆🙂🙏🏼
@retrodad9390
@retrodad9390 10 ай бұрын
Clever....... thanks for the video
@brookslee2227
@brookslee2227 2 ай бұрын
I''ve been wondering how they achieve the rat self collision? there is no imformation about it on the internet
@timbus2
@timbus2 10 ай бұрын
Damnit… now I want to play these games. (Including Micro Machines! 😂)
@DrMarlboro_1
@DrMarlboro_1 8 ай бұрын
You should make a video about the rain world ai
@lauraschlieselhuber8487
@lauraschlieselhuber8487 10 ай бұрын
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.
@pawebernaciak1581
@pawebernaciak1581 10 ай бұрын
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 10 ай бұрын
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 10 ай бұрын
@@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.
@user-sv9eq8ex8f
@user-sv9eq8ex8f 9 ай бұрын
HEY!! Im only 39!!
@Ixarus6713
@Ixarus6713 10 ай бұрын
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 . . . ._*
@TheSmurfboard
@TheSmurfboard 10 ай бұрын
i smell a rat
@anteshell
@anteshell 10 ай бұрын
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
How Barks Make Videogame NPCs Look Smarter | AI 101
19:33
AI and Games
Рет қаралды 23 М.
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 49 МЛН
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 6 МЛН
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 23 МЛН
Analysing the AI of The Last of Us Part II | AI and Games #70
28:05
How A Navigation Mesh Works in 3D Games | AI 101
16:14
AI and Games
Рет қаралды 62 М.
Games That are Special In a Way That's Impossible to Describe
17:30
Marcus Baretta
Рет қаралды 1,6 М.
A Plague Tale: Innocence - Story Explained
10:05
Gaming Harry
Рет қаралды 217 М.
The AI of Empire: Total War | AI and Games #22
14:25
AI and Games
Рет қаралды 30 М.
Valve's "Secret Weapon"
17:32
Game Maker's Toolkit
Рет қаралды 1,4 МЛН