Enemy AI Working

Enemy AI behavior plug ins–small code blocks that guide NPC behavior and can be ‘swapped’, effectively serving as behavior chips–have been implemented and are working successfully! Here is a picture of a group of pirates beaten into submission, their former aggression replaced with fear of the PC’s melee prowess.

roguelike npc ai fleeing

The pirates run from your character once you've dealt them enough damage.

It took a bit of time and quite a bit of consternation, but I finally worked through problems I was having where the “hunt the PC” behavior would work, but the “run from the PC” behavior would send them smashing into walls or stuck bouncing between two points. Now the fleeing monsters will choose the best path to flee from you, but are willing to make a break for it if they are ever cornered.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: