Posted August 31, 2018 by LionArc
#chess #pathfinding #rouguelite #adventure #Rogue Pawn #Rogue-lite #Game Development
One mechanic Rogue Pawn will feature is "chessboard" style battles.
Unlike the free-roam movement that was featured in the Ludum Dare (LD) release, we want these "chessboard" interactions to feature grid-based movement, just like a real game of chess.
With Knight movement, simply moving to the nearest square isn't a very elegant solution, since the nearest square (by distance) isn't necessarily the nearest square (in number of moves)
So I set out to creating an "Breadth First Search algorithm" that could manage Knight movement.
The first step was to populate the grid with relevant data.
Shown here is:
This data will be useful in finding the grid locations that pieces can actually move to.
The next step is to do a "Breadth First Search" from the player location, using a technique similar to this article.
Rogue Pawn Facebook page: Dija Studios