In my 2D platformer (camera from side looking at the xy plane, with some jumping and gravity, shooting, etc) I'd like to add some complex enemies. Ideally, they would be able to patrol around some waypoints, shoot at the player when they see him, chase the player, flee from him, hide in a cover, throw grenades etc. I'd also like them to jump from one platform to another.
I've found [RAIN][1], which offers some impressive behavior trees, unfortunately the pathfinding part is suitable only for 3D games on a xz plane.
I've also found the [A* Pathfinding Project][2], which *can* be adjusted to 2D games on xy plane, however I haven't really managed to make it work yet, considering gravity, jumps etc.
This made me wonder, before I fully dig into the theory of A* - is there a better way to approach this? How would you go about pathfinding and behaviors in a 2D platformer? As I know very little about pathfinding or AI in general, I'd gladly accept any plugin (paid or free) that would save me some time; or a nudge in the right direction.
Many thanks!
[1]: http://rivaltheory.com/rain/
[2]: http://arongranberg.com/astar/
↧