cs383-final / cs383-finalproject

Final Project for Allegheny College CS383
MIT License
1 stars 1 forks source link

Alignment-based behaviors are screwed #10

Closed yarbroughw closed 9 years ago

yarbroughw commented 9 years ago

Swarmstep works, but the other behaviors (those that use alignment weights that are >0) cause the boids to speed up ad nauseum until the program crashes (likely due to overflow of the vector components).

I think there's a bug with the alignment code... I can look at it tonight.

hawkw commented 9 years ago

I'll check it out, too. Be nice to have this fixed by tomorrow.

hawkw commented 9 years ago

Well, I checked our code against the formula from "Autonomous Boids", and it seems right to me...

hawkw commented 9 years ago

I'm really not sure why the alignment function uses so much CPU and makes it hang when the centre function works almost exactly the same way...

hawkw commented 9 years ago

Do you suppose this is just an inherent problem caused by all the boids having the same starting velocity (because they appear never to encounter a boid who's moving slower than they are and therefore never slow down)? Do you suppose introducing jitter to the starting velocities might fix it?

hawkw commented 9 years ago

Closed by Will in 1092490