Monday, July 18, 2011

AI update

Here's another update about the AI system. I've had to throw out my entire system, in order to implement a more dynamic AI.

The new system is based on behaviors instead of specific actions. These behaviors will be hard coded in the engine(such as to improve debuggability[Like that word?]), and then the Lua function responsible for that enemy's specific AI will tell the program which behavior(s) to do.

Behaviors:
Idle - Enemy does nothing, plays an idle animation or something.
Reload - Enemy reloads his weapon
Move Target - Enemy moves to a target given by the Lua function
Look-At Player - Enemy looks at the player, utilizing the head limb of the enemy.
Follow Player - A complex behavior, has the enemy follow the player at a certain distance.
Shoot Player - Enemy shoots player with current weapon.
Cover - Enemy will find the nearest cover, usually to either regain health or reload weapon.

So far I've implemented the Idle and Look-At Player behaviors, now I've got to reimplement the pathfinding so I can create the Move Target, Follow Player, and Cover behaviors.

No comments:

Post a Comment