A set of tools to find your path in a grid based dungeon. Field of view, pathfinding...
Inspired by tcod-rs and bracket-pathfinding, it aims to be simpler to use than tcod, without requiring a sdl2 dependency, and faster than bracket-pathfinding.
The field of vision algorithm perform quite well, but the pathfinding one will need some serious optimizations to be competitive, as tcod is fast, really fast.
Get started
Implement the Map
trait, and call field of vision or pathfinding algorithm.
use ;
use field_of_view;
use astar_path;
let sample_map = new;
// (…) You probably want at this point to add some walls to your map.
let from = ;
let to = ;
let radius = 5;
for visible_position in field_of_view
if let Some = astar_path