I just finished to implement a better version of path finding for my cthulhu game.

The basis is still based on A* but i add some additional steps to make the path used by hostile smoother and clever: I describe my enhancements in drawings below:

  1. The first drawing explain the real situation: you have one hostile located at point A. This hostile is modelized as a rectange (the collision area); The hostile need to reach point B behind a wall.
  2. The second drawing explains a path finding result using A*. A* is based on tiled so you will have a tiled vision of the path to used to reach point B. But remember, our hostile is a rectangle on a map with x,y coordinates and not integer tile indices.
  3. My first enhancement take A* tile path result and remove unecessary tiles (see third drawing) to keep only turn points.
  4. Then i do some additional process to compute real points (x,y coordinates) which takes care of hostile collision area and mnimizes the path regarding turn points.

The result in action:

Few weeks ago, “followers” feature was implemented in my next game project “Cthulhu”. The code is still under development to be perfect but this video give an idea of the result.