Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Like others here, I had a run at this using lua love four years back.

https://github.com/iamwilhelm/frock

In my experience tweaking the variables, to make it look 'realistic', the settings need to change as the number of boids increase. So what might work for n boid, won't work for m boids, where m >> n.

In addition, you need to limit the turn angle for the boids. They don't look like they're flocking as much as they're orbiting. Just as birds can't turn on a dime (actually, they can. I've seen a sparrow change direction in mid-flight just as I was going to hit it with my car going 40 mph, but for the purpose of flocking it looks better when they can't.), you don't want your boids to, so you get a swooping effect and feel.



Sage advice. It took me longer than it should have to learn this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: