Post-Play'em - Observations on Game AI

Call of Duty 2: Omniscience and Invulnerability

I was playing Call of Duty 2 on XBox 360 last night. I’ve already gone through the full campaign on the normal difficulty and am now about halfway on “Veteran” (“…you will not survive”).

Enemy Invulnerability:
“I can’t be bothered right now.”

I was on the level where your convoy through the town in Tunisia gets ambushed. I had to start it over and over because I was getting pelted by the guys on top of the walls. I finally got down where I should hide and who I should tag first. One thing kept bugging me. There was a string of guys appearing on one wall in order. Most of them were gunners shooting at me – but there was one that had a Panzerschreck. I would try to shoot him over and over and he wouldn’t die until he had fired at one of the tanks/trucks in my convoy and blown it up. In the mean time, another one would pop up and take me down. I realized that it was pointless to try to kill this dude at all. He wasn’t going to kill me and that tank/truck was going to blow up anyway. It was part of the level.

What annoys me, however, is that it took me a number of times before I realized that, until that guy got his shot off, he was invulnerable. As soon as he was done with his job (that I was trying to prevent) he was now able to be shot. I wasted valuable time and got very frustrated by the fact that the level designers had decided that this was such a required series of actions on the level that they would break the rules.

I have found other instances where I have tried to peg some dude that was threatening me and was dead in my sights only to find that he had some sort of mission that couldn’t be stopped. That really exposes the scripting in the game. I understand why the scripting is there – and, in general, it is very well done in the game. I very much love some of the actions that happen despite the fact that I can tell you the exact line I crossed in order to trigger the action – but usually they are too fast for me to react to or something that is meant to be just watched anyway. Don’t let me point at a guy and unload an entire clip into his spleen while he doesn’t seem to care that I am there.

To me, it seems like this is a case of the “anti-sandbox” concept. Sure, a somewhat linear game like CoD isn’t meant to be a sandbox – and there are certain things that have to happen to advance the plot. That’s fine, but I always feel cheated when I can’t change the series of events even if I do the right thing to disrupt it.

Enemy Omniscience:
“Am I wearing an orange hunting vest?”

The other thing that I noticed the other day is that, while I can sneak up on some people from the side once in a while – which is very satisfying – there are other times when someone will spin 45 degrees to point right at me despite the fact that I am peeking between some crates or barrels or sandbags. It is almost as if I just barely moved into a place where the ray-trace succeeded and told the enemy that I was now visible. This is fine if I walk around the corner or pop up behind something, but it seems odd when only 2% of my body is visible. The result is that it seems like the AI is omniscient (i.e. cheating) as to my whereabouts. In some respects it creates excitement, in others frustration. I know that they aren’t trying to create Thief or Splinter Cell. Stealth isn’t the focus of CoD. Still, there are times when hiding is a requirement of the game. Don’t cheat me out of those brief moments of respite.

A possible solution to this is to measure how much of me is visible and then combine that with a coefficient based on how far “off center” I am from their current direction of vision. Perhaps another factor based on movement. I know that is a bit expensive to calculate for each AI (since their fields of view would all be different).

Another potential solution is to cast multiple rays to different parts of my body – perhaps shoulders, head and a couple of lower torso spots. If more than ONE is visible, then I can be seen. Not knowing exactly what mechanism they are using, it’s difficult to know how to improve upon it.

This is even more alarming when it is obvious that there is a bias towards firing at ME. I may have 10 squad members all hidden behind objects and taking pot shots at the enemy – or even running around in the open, but damn it if the AI doesn’t want to fire at me instead. It doesn’t happen all the time, but it is obviously biased more towards me than my squad-mates. This is an obvious design decision to make it more exciting. I understand that. However, when combined with the omniscience above, it’s kinda creepy.

[note: I've realized that waiting to write one complete writeup on a game is sometimes prohibitive - so I will write as I think of things... and tag them by game so you can find all relevant stuff]

Tags: , , , , , ,

5 Responses to “Call of Duty 2: Omniscience and Invulnerability”

  1. Anonymous says:

    There is a reason it is called AI, for it to succeed, it has to have a considerably advantage because you are much more intelligent. Deal with it.

  2. Dave Mark says:

    That is certainly true – but, as an AI programmer, I know that there are other ways of creating skill and intelligence in agents without cheating.

  3. Andrew says:

    You dislike the invulnerable enemies (fair enough, me to! some are very annoying) but what about invulnerable allies?

    CoD has a set of NPC’s who never die (and on the veteran difficulty, are great barriers).

    Good points on that and stealth. I notice similar things in CoD4 which is a shame.

  4. Dave Mark says:


    Good point about the allies. However, there is a similarity in that the specific allies (usually your commanding officer and a sidekick) are required for plot continuation. Again, because of the linear nature rather than a “sandbox” game, this is often a requirement.

  5. Anonymous says:

    I know how you feel.
    While playing StarWars Battlefron II on the PC, I noticed something very disturbing and somewhat frustrating.
    Any one familiar with the game would know that the Coruscant level is fairly small and also fairly open.
    Well, I sometimes am in a sniping mood, and I will play that level, crouching in safety on the stairs in front of the Jedi Council Room.
    Occasionaly, and most recently on this level, I get an enemy in my scope, and as soon as I see them, they turn around and look directly at me and start firing at me with whatever weapon they have–ALL THE WAY ACROSS THE LEVEL!!! This is very annoying and a bit creepy.

    Also, now that I think about it, the same thing happens to me with the grenades when I play SWBFII.

    And I have also noticed how enemies single you out, and shoot only at you.

    This goes along with the above, but twice I have gone into a room to see my allies and enemies just standing there, and then about one second later they start fighting again. I find this very… unsettling, as if they are gossiping about me behind my back, and as soon as I come over, they act like nothing happened.

Leave a Reply