While developing a reasonably simple RTS-like game, I noticed my distance calculations were causing an impact in performance.
At all times, there are distance checks to know if a unit is in range to its target, if the projectile has reached its target, if the player has run over a pickup, general collision, etc. The list goes on, and checking for distance between two points is used a lot.
My question is exactly about that. I want to know what alternatives game developers have for checking distances, other than the usual sqrt(xx + yy) approach, which is fairly time consuming if we are performing it thousands of times per frame.
I'd like to point out I am aware of the manhattan distances and squared distance comparisons (by skipping the sqrt bottleneck). Anything else?
Thanks