Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Everything posted by feorang

  1. feorang

    Grouping NPCs

    I struggled with a same problem recently. I decided to create initial groups at spawn since that was when NPCs are guaranteed to be clustered. Specifically I make a group controller who then spawns the NPCs. If these controllers periodically update their location to the center of mass of their respective NPCs. If these controllers get too close, they merge. If after some merging, the group is too large for calculations (I set an arbitrary limit of 10 simply because of how I'm handling the more complex AI), it gets split evenly and the groups try to split apart physically. It keeps my calculations low, but as I said, the primary driver was so I could better coordinate small group tactics.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!