Hi all,
Inspired by your efforts I've been playing around with this over the last few days:
dropbox.com/s/kz9k3aqa9a723q4/flock.c3p
The group and align events seem to work pretty well, but I've got a problem with the avoid routine; at any avoidStrength above zero the birbs all head to the left of the screen and hug the wall.
Try with just the avoidStrength and avoidRange on.
The issue lies somewhere within events 24-29.
Rather than try and calculate a group-based avoidance angle, I've gone for a simpler approach by just reacting to the nearest neighbour. My thinking is: for each birb, pick the next nearest birb; if the neighbour is within avoidRange and in front then try to turn turn 0-45 degrees in the opposite direction from the neighbour.
Given that they all fall into a pattern it suggests there is some constant biasing their movement, but I can't pin it down. Any ideas?