Thursday, March 11, 2010

Pathfinding System

This week, I've been working on the Canine Combat pathfinding system. After chewing on the idea for sometime, I felt it was time I finally added it. The problem is, without pathfinding, the AI would fly around in any-which direction, and would sometimes collide into the terrain. Thankfully, pathfinding fixes this problem.

I'm not sure how many of you are interested in the nitty gritty details, but the pathfinding is based on Dijkstra's algorithm. You can read more about Dijkstra's algorithm here.

Well, enough talk, the new pathfinding system will allow for more complex sequences and definitely takes the AI to a new level.

FOR REFERENCE: The square purple blocks are "waypoints." The AI will only follow connected waypoints, thus keeping them from wondering and crashing into obstacles.