if you're optimizing you really should use a quadtree or octree. each collision-avoidance spider would only need to do a couple of distance checks each frame, and those in really cluttered areas (and hence really small quads/ocs) wouldn't even need to perform any distance checks.

shouldn't be hard to implement in lite-C.

julz


Formerly known as JulzMighty.
I made KarBOOM!