I'm currently planning a game, but I have a hard time figuring the path finding algorithm and I was wondering if a generous soul would be able to help me with that.
Here's the scenario, I need an algorithm that calculate if it would be better to walk around obstacle or destroy them. I gave a "difficulty" to each tile of my game. For exemple a basic tile is 1 and obstacle can be between 5-100.
Here is some exemples. I must move from Red Square to Blue square. If I put an obstacle on the way I should get something like this :
Explanation : Left or Right path is only 3 difficulty and the obstacle is 5. So it's better to walk around.
Second example :
Explanation : The algorithm as 3 choice, break the obstacle or walk around by left or right because it's the same difficulty level.
Last example :
Explanation : The algorithm must be able to find a "weak spot" and be able to walk to it and destroy it.
I'll continue to work on it. Hope you can give me some guidance.