Calculating Flow Fields for Rats in 'A Plague Tale' | AI and Games #73
Вставка
- Опубліковано 9 чер 2024
- 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 UA-cam 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 UA-cam 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 - Ігри
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.
The fact I played those final sequences on a Steam Deck at a solid 60fps is *very* impressive.
It's obvious, the giant rat AI makes all of the rules to see what kind of trouble they can get into.
I confess flow fields hadn't entered my mind, I was fairly convinced the rats were handled as part of a fluid shader! 😄
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! 🤣
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... 😅
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.
Flow Feilds reminds me of the what i learned in fluid dynamics.
Track a particle or a certain space-volume.
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.
This channel is so cool and underrated. Love your content!
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.
This is a really clever way of doing that, GPUs are basically optimized for doing calculations like interpolating between two vectors....
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.
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!
I did not know about that, but I'll be sure to check it out!
Amazing ai video as always to learn from
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?
yes
@@stupidmonkey089The monkey is correct.
Literally a hive mind for rats.
Is that flow field the same way days gone had a thousand zombies at once?
great video
I''ve been wondering how they achieve the rat self collision? there is no imformation about it on the internet
Good job 🏆🙂🙏🏼
Damnit… now I want to play these games. (Including Micro Machines! 😂)
Clever....... thanks for the video
You should make a video about the rain world ai
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.
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
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).
@@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.
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 . . . ._*
i smell a rat
HEY!! Im only 39!!
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