Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Flocking behavior

Sign in to follow this  
Staffan E


Flocking behavior

Weekend again. I pushed on and finished the basic implementation of alignment behavior, and with that flocking (separation, cohesion and alignment) is up and running. I'm not perfectly happy with it but it's a tweaking issue and I want to draw a line here and push on to more critical things, like implementing intercollisions and then the rest of the former enemy functionality.


Check out the video clip. Here the enemies have flocking behavior plus seek behavior aimed at the player. You can see how they stick together and try to move as a flock. They overlap quite a lot so the separation part probably needs to be magnified, especially since their speeds should be higher too. The jittery motion could be solved by increasing the mass of the subjects by a factor ten. Still there is some spinning and I consider adding an inertia moment to the physical model. As I said I could tweak this forever if I wouldn't hold myself back.

This need for tweaking however has pushed the need for a scripting system so that item has jumped up a few more priority notches. I've begun marking up sections of code that is ready to migrate to a script file.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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!