Jump to content

Flocking behavior


Konlii

Recommended Posts

I was recently watching the videos someone had posted testing the new zombie AI (which I of course can't find now or I would post a link). Unsurprisingly, since this is only the first version of the new AI there are some flaws, some of which are clearly unintentional and will definitely get patched out (such as the player moving a single block corner-to-corner causing all zombies to repath to what is actually a longer route) and some of which seem more fundamental (such as instant, perfect knowledge of all blocks in range regardless of whether those blocks are in their line of sight).

 

But what I want to talk about in this thread is how it really made me stop and consider how unnatural and frankly robotic the famous "conga line" is. As soon as the zombies aggro'd, every single one of them moved immediately at X speed to wall A, paused for Y seconds, turned 90 degrees left, moved at X speed to block B, turned 90 degrees right, etc.

 

So to make a long story short, what am I actually proposing here?

 

Flocking behavior.

https://en.wikipedia.org/wiki/Flocking_(behavior)

https://www.oreilly.com/library/view/ai-for-game/0596005555/ch04.html

https://wiki.unity3d.com/index.php/Flocking

 

This is not only how birds, fish, and herding animals move in groups, it is also how human crowds move and is an example of complex behavior that emerges from three "simple" rules:

 

  1. Separation: steer to avoid crowding local flockmates
  2. Alignment: steer towards the average heading of local flockmates
  3. Cohesion: steer to move toward the average position of local flockmates

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...