I am writing an iOS game (using UIView) that has a randomly created 2D city. I need to attack AI, it will take a reasonable way to find a player (without colliding with buildings). Can someone point me in the right direction as to which algorithms I will use to achieve this?
Edit: I decided to use A *. I will create a grid on the map, check every intersection point of the grid, if this point is inside the building, I will invalidate the point. Attacking A.I. the player will move from his current location to a valid grid point that is closer to the target (within a certain radius of its location).
source
share