Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Boids, a way not to check flock every update?

$
0
0
So I am using Boids to create flocking behavior for large amount of zombies.The problem I have is in my Separation pass I check the distance of each zombie compared to each zombie. I think this is wrong. This causes a exponential cost. 10 Zombies need to check all of the zombies 10*10 = 100 loops. Not bad but 1 000 *1 000 = 1 000 000 loops. So I am getting a power of two amount of loops. I feel that there is some thing simple I am missing?

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>