Monday, October 29, 2012

AI Mechanics

I was assigned to help work out the basic AI for our enemies. I assisted in this in two ways.

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.  

Ninja Theme

I've taken some free time to compose a theme for our game.  I arranged it to be Japanese in the instrumentation (Koto, Shamisen, Shakuhachi). However, it has a driving beat as well to keep it interesting (I see this as a good first level piece).  Have a listen if you want.  Enjoy!

*Update*
The latest version has been loaded up now, and hopefully should have, at least, an increased awesomeness of 150%!  I added a little to the background to fill out the theme a little, and added a little electric guitar to spice it up a bit!  This was to blend a little Western flavor into the game since this game is about the player's avatar becoming a ninja; thus blending styles a bit seemed appropriate.