Hello Guys,
I have a grid-based game.
Its 10x10 tiles, 10x10 pixel each.
I have an enemy that on his turn, he should use pathfinding to the Player. If he has path, than simulate tile to the first tile on the path.
Like this:
Green: Player
Brown: Obstacles
Red: Enemies
Blue: Path
Orange: Tile to move
The basic grid:
The tile that enemy should move to:
The Pathfinding for this enemy:
Problem 1: It has path even when there is no possibility as it does not move diagonally.
Problem 2: How to know the tile to move when it has path?
Thanks!