October 27, 2015

Antisocial behavior

Enemy AI Design

Hello again!  We wanted to talk a little about some of the enemies in Legends of the Brawl, how
they were created, and how the AI is set up to function. So come check it out!

Better With Buddies

In Legends of the Brawl, enemy AI is set up to complement our co-op/pvp multiplayer. Sets of enemies and different objectives are spawned into the levels, so a variety of enemies and attack types were created to mix things up.

Co-op play is encouraged for puzzle solving and combat, especially when mobs are spawned in while objectives are open.  Fighting some of these enemies by yourself is not wise.

So, over the next couple of weeks we're going to talk about a few of the enemies from the Castle Graveyard environment to give you a better idea of what you will be fighting and how the dynamics fit.  First up, the wolves!

It's a Canine Conundrum!

Wolf behavior has been designed around melee combat, as well as player movement speeds.

Standard Wolf

  • Mob type enemy
  • Low HP
  • Fast movement & pursuit
  • Weak attacks, but dangerous in numbers
The wolf is always on offense and trying to get inside your melee range.  They will chase you relentlessly (rather panic inducing!), and when close enough, do a jumping lunge attack.  This will get you either running or defending.  If you stop to fight or block, the wolf will do a standing bite combo, and keep you busy while its friends show up to chew your behind.

Not a high damage dealer, but watch out when surrounded by a group of them!

For now, the wolves' target detection is based on distance and they detect in 360 degrees. Some of this behavior and detection will be changed when ranged combat is more functional and players can kite enemies.

Alpha Wolf

  • Mob boss type enemy
  • Mid HP
  • Fast movement & pursuit
  • Low power attacks
  • Howls to call more wolves to join the pack
Alpha Wolves are bigger, deal more damage, and are slightly tankier.  They have the ability to howl & spawn a fresh group of wolves, so you'll want to take these guys out as soon as you can.

You can identify them by their darker coat and glowing eyes.

Getting Technical

We’ve been using an awesome Unity plugin called Behavior Designer, developed by Opsive, to piece together our game’s NPC AI for a "vertical slice" (essentially a fully realized portion of the game, like a demo) and wanted to show a little about our process for that, which might help out some other indie devs.

Here's the Behavior Designer AI flow for the Standard Wolf:

The notated descriptions should be fairly self explanatory, and the flow was created to satisfy our desired gameplay design for these guys, which we covered above.

Thanks, and Stay Tuned!

Next week we'll be talking about our Dark Bride vampires and covering a bit about how the AI works together.  Stay tuned, and follow us on Facebook and Twitter for all the updates!