No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md Update README.md Jun 8, 2016
main.cpp typo Jun 8, 2016
pathfinding.hpp better things Jun 8, 2016
tileadaptor.hpp Fixed typo Dec 2, 2016
utility.hpp better things Jun 8, 2016

README.md

Lazy Theta* with optimization pathfinding

Files:

  • pathfinding.hpp
    • The main file, the only one you need
    • Contain the algoritm
  • tileadaptor.hpp
    • To use the pathfinding class you'll need an adaptor, this is an exemple adaptor for tile grid
  • utility.hpp
    • Dummy vector class and distance function used by tileadaptor
  • main.cpp
    • Console based demo
######################################################################
#S   #              #                                                #
#    #              #                                                #
#    #              #                                                #
#    #              #                            2                  3#
#    #              #                             ################## #
#    #              #                                           #    #
#    #              #                                           #4   #
#    #              #                                           # ####
#    #              #                                           #    #
#    #              #                                           #    #
#    #              #                                           #    #
#    #              #                                           #    #
#    #              #                                           #    #
#   0               #                                           #    #
#                   #                                           #    #
#                                 1                             #5   #
#                                                               #    #
#                                                               #   E#
######################################################################
#  = walls
S  = start
E  = end
number = path nodes

Implementation of the algorithm described here: http://aigamedev.com/open/tutorial/lazy-theta-star/

At first I could find any code a part from this and honestly I had no idea of what line 37-38 means pseudo cat

After some amount of research I found this page http://idm-lab.org/project-o.html which provided me with some code. I rewrote most of it because the code style dind't suite me and to take advantage of C++14.

I also made it more modular so that it can be used for grid, hexagonTile, polygon map, anything where you need to find a path between to point.

Also added the possibility to use weighted h-value as described in the first link, it make the search faster but may give slitghly longer path.