Directors

libPathFinder / Docs / Directors

Directors

A short example to see how the different directors finds a path in a similar map:

The map is as simple walk/can't walk map, can't walkable areas are marked with a # - the pathfinder starts at O and moves towards X.

Using the grid_8_directions director, this gives the following path:

  O....
#######.
        .
         .
         .
         .
         X

Using grid_4_directions:

  O.....
#######.
       .
       .
       .
       .
       ..X

Using chess_piece_horse:

   . . 

  O . . 
#######
       .
 
        .
 
         X

This may be a bit difficult to understand, but try a different view, where each coordinate in the path is described by order.

   1 3 

  O 2 4
#######
       5
 
        6
 
         X