Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
September 18, 2014
arrowPress Releases
September 18, 2014
PR Newswire
View All





If you enjoy reading this site, you might also want to check out these UBM Tech sites:


 
Flanking and Cover and Flee! Oh my!
by Dave Mark on 06/13/11 08:07:00 pm   Expert Blogs   Featured Blogs

The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.

 

I was browsing through my Google alerts for “Game AI” and this jumped out at me. It was a review of the upcoming Ghost Recon: Future Soldier on Digital Trends (who, TBH, I hadn’t heard of until this). The only bit about the AI that I saw was the following paragraph:

"The cover system is similar to many other games, but you can’t use it for long. The environments are partly destructible, and hiding behind a concrete wall will only be a good idea for a few moments. The enemy AI will also do everything it can to flank you, and barring that, they will fall back to better cover."

There is a sort of meta-reason I find this exciting. First, from a gameplay standpoint, having enemies that use realistic tactics makes for a more immersive experience. Second, on the meta level is the fact that this breaks from a meme that has been plaguing the industry for a while now. Every time someone suggested that enemies could—and actually should—flank the player, there was a rousing chorus of “but our players don’t want to be flanked! It’s not fun!”

This mentality had developed a sort of institutional momentum that seemed unstoppable for a while. Individuals, when asked, thought it was a good idea. Players, when blogging, used it as an example of how the AI was stupid. However, there seemed to be a faceless, nebulous design authority that people cited… “it’s not how we are supposed to do it!”

What are we supposed to do?

One of the sillier arguments I heard against having the enemy flank the player and pop him in the head is that “it makes the player mad”. I’m not arguing against the notion that the player should be mad at this… I’m arguing against the premise that “making the player mad” is altogether unacceptable.

In my lecture at GDC Austin in 2009 (“Cover Me! Promoting MMO Player Interaction Through Advanced AI” (pdf 1.6MB), I pointed out that one of the reasons that people prefer to play online games against other people is because of the dynamic, fluid nature of the combat. There is a constant ebb and flow to the encounter with a relatively tight feedback loop. The enemy does something we don’t expect and we must react to it. We do something in response that they don’t expect and now they are reacting to us. There are choices in play at all times… not just yours, but the enemy’s as well. And yes, flanking is a part of it.

In online games, if I get flanked by an enemy (and popped in the head), I get mad as well… and then I go back for more. The next time through, I am a little warier of the situation. I have learned from my prior mistake and am now more careful. It builds tension in my body that, while having never been in combat, I have to assume is something that is somewhat characteristic of it. Not knowing where the next enemy is coming from is a part of the experience. Why not embrace it?

Something to fall back on…

The “fall-back” mechanic is something that is well-documented through Damián Isla’s lectures on Halo 3. It gives a more realistic measure of “we’re winning” than simply mowing through a field of endless enemies. Especially in human-on-human combat where one would assume some level of self-preservation in the mind of the enemy, having them fall back instead of dying mindlessly is a perfect balance between the two often contradictory goals of “survival” and “achieving the goal”. It is this balance that makes the enemy feel more “alive” and even “human”.

Often, if enemies simply fight to the death, the implication is that “they wanted to die”. Beating them, at that point, is like winning against your dad when you were a kid. You just knew that he was letting you win. The victory didn’t feel as good for it. In fact, many of us probably whined to our fathers, “Dad! Stop letting me win! I wanna win for real!” Believe it or not, on a subconscious level, this is making the player “mad” as well.

By given our enemies that small implication that they are trying to survive, the player is given the message that “you are powerful… they want to win but you are making them choose to live instead!”

Here’s hoping that we can actually move beyond this odd artificial limitation on our AI.

[This post originally appeared on IA on AI on June 13, 2011] 


Related Jobs

Pocket Gems
Pocket Gems — San Francisco, California, United States
[09.17.14]

Associate Product Manager
Yoh
Yoh — Vancouver, British Columbia, Canada
[09.17.14]

Rendering Engineer Job
Yoh
Yoh — Vancouver, British Columbia, Canada
[09.17.14]

Multiplayer Designer Job
Red Storm Entertainment, a Ubisoft Studio
Red Storm Entertainment, a Ubisoft Studio — Cary, North Carolina, United States
[09.17.14]

Sr. Level Designer






Comments


Jonathan Lawn
profile image
Amen.



Players want the tools to win, but not to be handed it on a plate. The more (apparently) intelligent and the more varied (but not necessarily random) the enemy behaviour the better.

Dave Mark
profile image
Aaahh! Yet another rebel breaking away from the tired old establishment method of game design! I welcome you, brother!

Rebecca Phoa
profile image
In this case, FPS games and their players do want better realized game AI enemies that can do smart things so they don't feel that the game is insulting their intelligence.



What if the player says something like 'I play for the story' and increasingly gets upset because the AI routes them every time and it decreases their enjoyment of getting through the game to see the juicy non combat stuff? I see this all the time especially for people who play semi-shooter games like Deus Ex where you know the enemy AI is as dumb as bricks. So what happens is, to improve the next few games--the developer makes the AI react better. These gamers so used to bad combat and AI can't cope. Of course, better AI makes a better gameplay experience--but this was not why people ended up enjoying the original version. What then?



Asking them to dial down the difficulty may be an adequate solution, but usually that means the enemy has less HP or less defense. They are still just as smart or as dumb.



Mass Effect 1 has pretty dumb enemy AI because there is no flanking and enemies don't do a lot anyway, and it also doesn't help that the squad AI is terrible as well. They are addressing AI in Mass Effect 3 because the AI in the second game was still pretty terrible. I would end up not reviving my squad members because they would just get killed in seconds again. They would charge the enemy as they get peppered with bullets, spontaneously leap out of cover, and well just make things more annoying if you play on higher difficulty settings. Enemies would just stay in cover the whole time. The only enemies that charged you were the husks because those enemies didn't have much a choice being the equivalent of zombies.



Edit: Also what do developers mean by 'fun AI'?

Craig Page
profile image
Lowering the difficulty doesn't have to mean just lowering the computer health, it could also mean taking away options the computer has; like taking cover, blocking attacks, throwing an infinite amount of grenades (CoD AI).



For me "fun AI" would get to use all of the computer's abilities, but tone it down a bit if they're killing the player too often, and avoid taking any cheap shots at the player. Dante's Inferno was the best at cheap kills, you'd be on a falling platform and die when it crumbles unless you were standing exactly in the top right corner. I want to die because I'm spamming the same moves over and over and not using the more powerful combos, but dying over and over until you know the safe place to stand is ridiculous.



Fun AI should see you're just spamming the same attack, and counter it until you decide to use a new one.

Luis Guimaraes
profile image
...or enemies having to take 3 full clips to die, instead of just one full clip (yeah, Gears of War, don't pretend you don't know I'm talking to you!).



The best AI I've seen so far in a single player campaign was in FEAR 2.

Dave Mark
profile image
(Note that "better AI" doesn't necessarily have to mean the player dies more. Think about it for a minute...)

Rebecca Phoa
profile image
I think that since you talked specifically about combat AI, I construed the article as being solely about that. Dying in games is common, and it's my lack of knowledge about AI that leads me to believe that the reason why I die in games is that I took too much damage through brute force. I rarely get the feeling that the AI legitimately 'won.' This is why a lot of people 'kite' when dealing with mobs because it works very well at exploiting enemies.



There is some interesting AI in Elder Scrolls Oblivion that controls NPC to NPC reactions. There was one time, I saw a guard cut down another NPC for stealing an apple. I think this is a good example of AI since the logic for the guard attacking a thief is straight forward. But I've seen videos of Oblivion NPCs raking the carpet in their houses, which is not so good since the logic makes no sense.

Janne Kohvakka
profile image
Human-like AI might use a lot of different options and "emotional states" of the NPCs than just flanking and falling back; using smoke for "danger zones" for covered movement (to flank enemies, maybe), wounded NPCs could panic or freeze in place, badly outnumbered units might try to sprint towards their allies instead of making the last blaze-of-glory... all of these things, when combined with easily recognizable animation/sounds by players will make the enemies look in deed more human-like. The balance between the depression of enemy NPC flanking ur sorry a** ;) and you doing the same, after asking cover fire by your (NPC-)teammates or executing a team of babbling enemies after well-placed stun grenade when they are practically collecting their weapons and helmets from the ground... well, I'd say please make the enemy as smart as me if you also make them as dumb (and humanly vulnerable) as me.



What I do want to see next is the NPC trying to open the same door than I just did a second ago (from the other side), and the expression on his face, when he realizes that he's half a second late in his reactions... ;)

Dave Mark
profile image
Don't get me started on reaction times... that's another post entirely!

Christoph Kaindel
profile image
That enemy AI should make some attempt at self-preservation is an interesting point, one that is not observed in many games ... In Far Cry 2 for instance your opponents are mercenaries, fighting for money and notoriously unreliable; once you kill some of them, they should be expected to retreat or flee. But still, they will always fight to the death...



My wife and I currently play Army of Two, which relies heavily on the players flanking the enemies. Which can be hard, as they try to flank you too, take cover efficiently, and will fall back as soon as they become aware of you flanking them. It only works well if one player succeeds in distracting them and drawing their fire (the so-called "Aggro" system). I got the impression that in Army of Two: The 40th day combat was dumbed down a bit to make flanking enemies easier.

Glenn Storm
profile image
If it weren't fall back cover or flanking behavior, it could well be something else some erroneously assume the player hates. The distinction isn't the tactic for the AI (and whether to implement it at all, or only on particular difficulty levels, whether to impede the NPC in other ways, like POV angle, etc.), it's actually all about the player experience, and specifically about how _we interpret_ the observations and reports from players about their experience to arrive at better combat designs. This is a great opportunity to stop and analyze the player situation before we draw conclusions.



It could well be like this:



Player enters an area that erupts into a firefight. Enemies pop up from behind their defensive cover and lay down their ambush, while the player ducks behind their own convenient cover. An unseen enemy, taking advantage of the fact that his comrades had the player not just pinned down behind cover, but distracted by the main ambush, simply peeks out from a hiding place flanking the player, takes a pot shot or two, and before the player knows it, they're dead.



Stop. Before we go forward, what's the player experience? Have we described everything the player went through? What came before in this game in terms of enemy behavior? In terms of combat situations?



The player who reports at this point, "It's not fun", is totally justified in their own experience. So does that mean we simply remove the part that wasn't fun? And more importantly, would we know what that is?



A very simplistic view would ask the player, "What wasn't fun?", and the response would likely be, "Where I got flanked and gunned down by an unseen enemy." And that could be the end of it: remove flanking behavior and hiding enemies because we heard directly from the player it wasn't fun. But, I assert this is selling the experience short.*



Okay, so let's dig deeper. Is there anything else that wasn't fun, or that contributed to this distinctly un-fun experience? Look at everything from what the player experienced before in terms of enemy AI, to how the hiding enemy was presented, to how the death was presented, to what the game does to restart the player, to the environment, to story, to NPC discussions, etc.



The un-fun moment described above is a confluence of multiple factors, and all of them together contribute to the player experience. Extracting the flanking and hiding behavior relieves the symptoms of this un-fun experience, but does not address the other contributing factors, which may turn out to haunt other combat situations in the game. More importantly, removing these behaviors may 'fix' this reported situation, but have we missed an opportunity?



What if we view this AI combat behavior as another challenge the player must overcome? Just like the double-jump they have to learn, the fast reload controller sequence, the puzzle interface mechanics, the combo attack moves, etc. Viewed in this way, let's take a critical look at the situation we put the player in above.



We dropped the player in a very clever ambush, with a main group drawing attention and fire, with a prominently placed cover spot that serves as bait for a flanking sniper. Have we ramped up this kind of challenge for the player in previous situations? Has the player been introduced to the AI's tactics appropriately? Has the player been encouraged to overcome a simpler, but similar, challenge previously with particular tactics of their own to counter the situation? Do we appropriately give feedback on their progression in learning these counter tactics, whether they succeed or not? Are we appropriately mapping what the player perceives with their agency, in terms of these combat situations and player tactics to counter these AI behaviors?



Now, we're designing combat.



In previous situations in the game, make sure the player has witnessed these AI combat behaviors distinctly, their results, how dangerous and effective they are, and begin to introduce the counter tactics necessary for the player to learn. In the combat situation described above, there can only be a limited number of new factors for the player, and these shouldn't have 'ha ha, you're dead' results. Instead these have to allude to the new threat they pose, while hopefully (or soon after) introducing some counter measures. In death, if not before, show the player what the _ happened, so they get the feedback they need to do better.



In the end, our FPS player community needs to take the training wheels off and embrace challenges brought about by evolving combat AI. Overall, it's past time when we forgive enemies for not recognizing the obvious, for not trying to outsmart the player. This is just another skill the player _gets to_ learn (fail, work at, talk about), making them better, making the experience better.



(passionate comment, apologies for the length)



* - totally aware of the twinkie denial conditions described here; just illustrating a point in course words for the sake of discussion.

Martin Juranek
profile image
In your example big problem could be (et least how I imagined it when reading), that we are used to crushing lots of dumb bots.

But once they are not dumb bots, its unfun to be sent against lot larger force at once, because they are actualy stronger.


none
 
Comment: