top of page
Search

On Pathfinding

  • Kazutoyo Yamamoto
  • May 9, 2019
  • 1 min read

For pathfinding in the turn-based strategy game, I used Dijkstra circle expansion to display the movable range of the selected unit. The path for each tile is stored in the tile so only one call to pathfinding is needed when the user selects a tile to move to.


Pathfinding Conditions:


2D Grid

Tiles occupied by enemy units needs to be disregarded as a non-reachable tile, while an allied unit needs to be considered but should not be marked as a valid tile to be moved to.


2.5D Grid

On a 2.5D grid there is a height value attached to each tile which needs to be checked during the pathfinding to see if the current unit has enough jumping power to reach the tile.


3D Grid

For a 3D Grid, that is an environment that has a ceiling and floor, there needs to be a check for the clearance between the bottom height of an above tile and the top height of a tile. Tiles that need to be checked are the current tile, the tile above the current tile, the next tile, and the tile above the next tile.


Other Notes

Upon actually looking more in depth of Final Fantasy Tactics, tiles actually contain 5 height values in that game, one for each edge and the center height. So when I get back around to updating my pathfinding code I will need to take that in consideration when I make the Tile Editor.

 
 
 

Comments


©2019 by Kazutoyo Yamamoto. Created with Wix.com

bottom of page