Hi guys, I'm trying to think up an algorithm that determines the nearest object to a player and was trying to come up with a simpler method than fully calculating the distance between the player and each object. It seems using a square and square root function to calculate each distance may not be the best way of doing it. But perhaps I'm missing a nice simple distance algorithm
So assuming we are using a byte for the PlayerX, PlayerY, Object1X, Object1Y, Object2X, Object2Y, Object3X, Object3Y, is there a simpler way of determining which of the 3 Objects is closest to the Player?
So assuming we are using a byte for the PlayerX, PlayerY, Object1X, Object1Y, Object2X, Object2Y, Object3X, Object3Y, is there a simpler way of determining which of the 3 Objects is closest to the Player?