≡ Menu

Combat Chatter as AI Enhancer

Here’s one of my favorite little pieces of game AI wisdom from Jeff Orkin:

There is no point in spending time and effort implementing squad behaviors if in the end the  coordination of the A.I. is not apparent to the player. The squad behavior layer gives us an opportunity to look at the current situation from a bird’s eye view, where we can see everyone at once, and find some corresponding dialogue sequence. Having A.I. speak to each other allows us to cue the player in to the fact that the coordination is intentional.

Vocalizing intentions can sometimes even be enough, without any actual implementation of the associated squad behavior. For example, in F.E.A.R. when an A.I. realizes that he is the last surviving member of a squad, he says some variation of “I need reinforcements.” We did not really implement any mechanism for the A.I. to bring in reinforcements, but as the player progresses through the level, he is sure to see more enemy A.I. soon enough. The player’s assumption is that the next A.I. encountered are the reinforcements called in by the previously speaking A.I., when in reality this is not the case.

Wherever possible, we try to make the vocalizations a dialogue between two or more characters, rather than an announcement by one character. For example, rather than having the A.I. cry out in pain when shot, we instead have someone else ask him his status, and have the injured A.I. reply that he’s hit or alright. When the A.I. are searching for the player, rather than having one A.I. say “Where did he go?”, we can have two A.I. in conversation where one asks the other if he sees anything. The other A.I. may respond with a negative, or call out a known or suspected position.

We also use dialogue to explain a lack of action. If an A.I. taking fire fails to reposition, he appears less intelligent. We can use dialogue to explain that he knows he needs to reposition, but is unaware of a better tactical position. The A.I. says “I’ve got nowhere to go!”

A gamer posting to an internet forum expressed that they he was impressed that the A.I. seem to actually understand each other’s verbal communication. “Not only do they give each other orders, but they actually DO what they’re told!” Of course the reality is that it’s all smoke and mirrors, and really all decisions about what to say are made after the fact, once the squad  behavior has decided what the A.I. are going to do.

— Jeff Orkin from Three States and a Plan: The AI of F.E.A.R

I always love to hear about little smoke and mirrors tricks that developers can use to make players believe that AIs are doing more advanced things than they actually are. The technique that Jeff describes here is one of my favorites – it adds so much depth without really adding any depth at all.

While playing games for fun, I’m often on the lookout for examples of this. Recently I was playing RAGE and listening to the AIs yell at each other during combat. At one point one of them yelled, “He’s flanking us!” Maybe technically I was flanking them, but at the time I was running around in a circle like an idiot trying to get a swarm of dudes off of me. I was firing constantly and throwing out grenades and stuff. I wasn’t doing anything resembling strategy or tactics, I was just in complete desperation survival mode.

This dialogue was really disruptive for me as a player, and totally took me out of the gritty wasteland combat and into ‘trying to figure out the smoke and mirrors land’. I think maybe it’s a good lesson to keep in mind moving forward: if you’re going to use dialogue to enhance your AI, be careful about having NPCs TELL the player what he/she is doing. Because the player KNOWS what they’re doing, and if the two don’t match up then it can seem very out of place. It’s a major breaker of the ol’ suspension of disbelief.

To be fair, if that dude had said – “Finish him off, he’s flailing around like a moron!” I would have been VERY impressed.

{ 1 comment… add one }

  • ScorpyX March 13, 2014, 1:44 am

    nice trick : ]

Leave a Comment