First, I helped research on the A* path finding algorithm. It was vital for our AI to find the player efficiently, so Ron and myself looked into whether this algorithm would work well. Fortunately, it did seem to fit inside our idea for the game, so I found an implementation of the A*, and sent it to Ron to tweak it to our game.
Second, I implemented an algorithm for the AI to use once it lost sight of a player. I went about this by thinking what it meant for the AI to be searching. I couldn't allow the AI to just automatically know where the player is. Thus, as a basic implementation, I simply let the AI choose a direction, and pursue in that direction for a given time. Then, after that time expired, I would have the AI choose another direction to check.
Our team hadn't finished the guard AI for the time, so I tested this using the player. Fortunately, the player moved in the way I predicted when I assigned this to a movement controller.
No comments:
Post a Comment