Jump to content
  • Advertisement
Sign in to follow this  
GroZZleR

Preventing enemies from bunching up?

This topic is 3562 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I'm working on a 2d dogfighting game (flash game playable here) and am having an issue with the enemies just bunching up on top of each other. The end result looks pretty ridiculous. Implementing some sort of flocking behaviour seems like a little bit of overkill but is it the best / only solution? Anyone have any ideas on a better way to more realistically have enemies attacking you from all angles? Thanks guys!

Share this post


Link to post
Share on other sites
Advertisement
Yeah, some sort of flocking behaviour.

To put it simply, you can surround your enemies with a sphere (to be more accurate, an area around them giving them personal space), and when they get within a radius, push them apart (slowly) to make sure they aren't bunching up.

http://www.red3d.com/cwr/steer/

Share this post


Link to post
Share on other sites
In my current project we solved that exact problem just as Oliii desribes above. Using those algorithms from red3d.com as well.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!