I need to calculate the distance between two points on a coordinate system without the use of the Pythagorean theorem. This question has answers here, however they are not really what I need. I have the following problem:
I'm creating a game in which there are around twenty circles at the same time on the game screen. I need to calculate if two circles touched each other very frequently (60 times a second in most cases). I did this by using the Pythagorean theorem to calculate the distance between two circle center points. However, the battery consumption is too high, which is probably because the game calculates 400 times the square root of a number for twenty circles.
What I did to significantly decrease battery consumption was to first check whether a square on top of the circles touches another one of these square, and only in that case calculating square roots.
Now I keep thinking about whether there are perhaps other formulas to do the same job that might be impractical for every day use on paper because they perhaps are longer, yet use less battery consumption as they don't need for example a square root of a number.
Keep in mind, that I'm still in school and don't know much about "higher" mathematics, so please try to explain things as simple as possible :)