Hacker News new | ask | show | jobs
by chris_p 5011 days ago
Yes, they do. They're not meant to completely avoid each other, theoretically there's a Z-axis that's not visible.

Try increasing the collision avoidance importance in the options and decreasing everything else. Generally, playing with the sliders can result in completely different behaviors.

2 comments

The attraction to the center seems to produce very erratic pathing - cutting that to zero immediately makes the flocking effect more 'natural'. Then increasing the acceleration factor helps produce those instantaneous changes of direction that are characteristic of animal flocks. With the current defaults the behavior is more 'cloud of flies' than 'flock of starlings' - which is fine, but doesn't show off the large scale co-ordinated movement the boids algorithm can produce. The collision avoidance threshold seems a little high - a slider to reduce that would help make flocks more compact which would produce better behavior when the number of boids is high...
Ah OK - yes some better behaviour can be adjusted, maybe tweak the default values a bit?
Truth is I didn't spend much time choosing the default values. And there are still a few configuration variable in the code that are not accessible through the GUI.