1) I think about a game where we can build building who take many tiles, for example 3x3.
So before start the build, I need to move character to adjacent tile. So there is an algorithm to find shortest path to the building area?
Are we obligated to use A * on each tile of area's building and select shortest?
EDIT, exemple :
for this exemple, (0;0) coordinates is at up-left of the image with this landmark :
imagine your character is at (0;0)
I looking for algorithm to move character cloest to the left bulding on image. [ coordinates: (1;2), (8,2), (1,10), (8, 10) ]
the target is not a single coordinate like "normal" case, but an aera (with 4 points).
So what is the best way to find closest position (excluding diagonal) from a single start coordinate [here, (0,0)] to an area [here : (1;2), (8,2), (1,10), (8, 10) ] ?
I want the algo return arrays of solutions, so in case of multiple way like in this exemple: [ (0,2), (1,1) ] , not chose a solution, juste give me all equivalant solutions.
2) Same question with a system of map without tile, but just coordinates?