Search Unity

Is flocking still a thing?

Discussion in 'Navigation' started by menof36go, Jan 5, 2016.

  1. menof36go

    menof36go

    Joined:
    Jul 24, 2015
    Posts:
    12
    Ok, first I must admit that the unity navigation system is quite handy, but I am curious if flocking is still a thing. If I have a lot of npcs (birds) for example and want them to act like a swarm, do I still need to mess with programming some sort of swarm navigation or can I just let unity handle the collision prevention? I mean, of course I could start writing scripts to make sure each of them keeps some distance to the other swarm members, but is it still neccessary? Should I do it for flexability? Should I not do it to keep it as simple as possible? Should I do it for performance reasons? Should I not do it for performance reasons :D? I am quite curious and I hope someone can help me to find an answer...

    Sincerely,
    Fabian
     
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
  3. menof36go

    menof36go

    Joined:
    Jul 24, 2015
    Posts:
    12
    Thanks for your reply, but its not about how, its more about why and if its still neccessary with the navigation system that already handles collision prevention and keeping distance between all the npcs in the swarm.
     
  4. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    I haven't seen any more, but its worth a thorough googling.

    Here is what I see on just the first page of "flocking unity" search:
    http://forum.unity3d.com/threads/boids-simple-flocking.36239/
    http://gamedevelopment.tutsplus.com...ignment-cohesion-and-separation--gamedev-3444

    http://devblog.xd-studios.com/2014/07/26/flocking-algorithm-in-unity-game-engine/
    http://forum.unity3d.com/threads/flocking-boids-collision.324796/


    Is there a specific use case you had in mind? We're you wanting to cook up your own solution?

    EDIT: I am not really trying to reply with info myself, I don't know much about flocking or the built in pathfinding stuff, just gathering some info that might help...
     
    menof36go likes this.
  5. menof36go

    menof36go

    Joined:
    Jul 24, 2015
    Posts:
    12
    I was thinking about zombie hordes wandering around, attacking a target, following noises etc..
    As you can imagine, there is a lot of scrambling and bumping into each other.. Thats why I am looking into flocking... To bring some order into the chaos :D
     
  6. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Ahh reminds me of that humble bundle game... ehhh what was it called... zombie atom smasher? It had like tiny little pixel zombies in large number scrambling to the player. I dunno if they used any flocking behavior at all but the idea just reminds me of it. I have nothing useful to add, haha.
     
    RAWilco and menof36go like this.
  7. CaoMengde777

    CaoMengde777

    Joined:
    Nov 5, 2013
    Posts:
    813