IA Logo


IA Information
Communication

Dave Mark's books

Post-Play'em - Observations on Game AI


Interview with AIGameDev re Left 4 Dead

April 15th, 2009

Back on April 5th, Alex Champandard of AIGameDev interviewed me for about 90 minutes for the Members portion of his site. Our topic was how to use behavioral mathematics (such as I cover in my book) to improve the bots in Left 4 Dead. We cover a lot of interesting information in the interview. Some of the examples refer to things I covered in my columns here on the AI in the game.

He has it posted in audio and video formats (although with me rocking back and forth in my office chair, I look like I’m autistic!). I seriously advise that you check it out. (You will need to have access to the members area to view it.) If you are already a member of AIGameDev, you can find the interview here:


Fable 2: First Look

March 8th, 2009

Continuing with my pre-GDC blitz of “must at least look at” games, I have just putzed around with Fable 2 for about 90 minutes. I had a look at some of this material back at the 2008 GDC when Peter Molyneux was going through his pre-release hype. (Isn’t he always?) Therefore, I knew some of the things to look for.

Most importantly, on the AI front, is the inclusion of the almost legendary “dog” AI. To hear Peter talk, you would have thought this game was a bigger and better “Nintendogs” game… that the entire purpose of buying it was to play with your doggie and bond with him. While that isn’t exactly the case, I have to admit that the dog is a good point of interest. The dog certainly is convincing in many ways.

My Dog Runs Rings around Me!

I think one of the things that was startling to me was how it moves in a general area around you. Most companion AI tends to lag behind you. For example, my recent mucking about with the companion AI of Left 4 Dead has me convinced that I am the only person in the entire world with any initiative. This is obviously a logistic issue because very rarely can the AI know where you want to go or when. This is sometimes mitigated in linear games where there is only one place to go. In my short experience with Gears of War 2 today, I saw that exact phenomenon. My companions were able to move ahead of me and take up positions specifically because there was no other way to go.

In Fable 2 this is done via the “breadcrumbs” trail. Despite being far more “open world” than other games, if you have selected (or the game has selected) a destination, by extension, the dog knows where you are headed. Of course, if you turn around and backtrack or go off to one side for some reason, the dog has to react and come back to you… but this is what happens in real life anyway.

The result of all this is that the dog will playfully romp or explore ahead, behind, of off to one side or the other in a general “halo” around you. If you stop traveling for a period of time, he will come back and see what’s up. If you stand still for very long, he may even lie down for a bit… all the while keeping an expectant eye on you as if to say “now what?” It’s all very convincing.

I really noticed one particular aspect of the dog’s animation after I put the controller down and switched off the 360. I went to go feed our own dogs and, as I was walking from the food bin to the bowl, one of our dogs was walking a few feet ahead of me. However, he had his head turned slightly back toward me, keeping an excited eye on me and the cup of food that I was carrying. He did that very dog-like routine of glancing forward and then back at me over and over all the way to his bowl. It struck me that this is exactly what the dog in Fable 2 was doing as I walked. As he would criss-cross in front of me, he would keep glancing back as if to make sure that I was coming along with him. It was this sort of attention to detail both on the behavior and the animation AI that really sold me on this dog. I’m looking forward to experimenting more with it soon.

Look at Me When I’m Talking to Ya!

Interestingly, there were times with the villager AI that I felt that the eye-contact issue was the problem rather than a feature. I’m not talking about how, while in conversation, people will glance away or past you. This was a problem with where they were facing in general. If they started their spiel while I was in one place, and then I moved to one side or the other, they would continue to face the spot where I was. Only after a moment (usually after finishing a line of dialog), would they turn to face me again. It was all rather disconcerting. Compare this to how well games like Half Life 2 continued to address you throughout a conversation… even to the point of turning and walking backwards if necessary.

Dialog Pauses

Another problem I had with the villager AI was how many of the scripted dialogs had very unnatural pauses between lines. There was an awkward silence between many of their sentences that left me wondering for a moment if they were finished or not. It was one thing when it was in response to something I had selected. However, when they paused in conversation with each other, it was odd. When they paused between their own lines, it was horrific and very distracting. I have to imagine that this is because each line of dialog needed to be loaded and accessed separately, but I can’t see why this would be a problem.

Both the facing issue and the dialog pause issue may be related to the same root cause, however. It may be a result of waiting for an associated animation to finish and report back that it is done. If a line of dialog (and the code to “face the player”) are associated with a particular animation, they would each have to wait for the other to finish before they both advanced to the next segment. If the animation finishes first, it isn’t as tragic because the animation can sit in idle for that extra second. However, if the voice finishes first, the next line must wait until the animation is done — causing the unnatural pause. This is just speculation on my part for the moment. I figure that if I analyze it a little further I can make the determination down the road.

Individual Individuals

One thing that jumped out at me during the initial city quests was how the group of kids all reacted slightly different to my various gestures, poses, and flatulation. I would get more “love points” (or whatever) from some than I would from others in the group. Upon a little examination, I found that each person had their own likes and dislikes — that is, things that they were more impressed by or didn’t like. It’s one thing to have different “respect ratings” from different people. It’s quite another to have different models of what causes respect on an individual basis.

I found this rather amusing since I am doing a co-lecture on this very subject at GDC in a few weeks. (“Breaking the Cookie Cutter: Modeling Individual Personality, Mood, and Emotion in Characters“) It’s something I would like to see more of in games in the future — although maybe not in quite as transparent a fashion as what appeared on-screen in Fable 2.

Will You Treat Me Different When I’m Famous?

I think it will remain to be seen what happens when I’m more renowned than I am so early in the game. In the original Fable, it got rather annoying that everyone, everywhere wouldn’t shut up about you. The comments that they heaped upon you were not as many in number as there needed to be. (You can only hear “chicken chaser” so many times before you want to crack someone’s head.) With a nod to my friend and colleague, Adam Russell, who did the villager AI for Fable, that isn’t an AI problem as much as it is a content problem. (This is another bit that I will bring up at the AI Summit panel, “Characters Welcome: Next Steps Towards Human AI“… it doesn’t matter how many decisions our AI can generate if we don’t have enough art and sound assets to express it.)

Anyway, this is a bit long for a first look. I will tag on some more as I experience more of the game. On the other hand, I will be shipping this back to GameFly in the next day or so. I need to check out a couple more titles before GDC in a couple of weeks.

If you are just jumping into this one article, make sure you click the tag(s) below to see if I have written anything else about Fable 2.


Gears of War 2: First Look

March 8th, 2009

In preparation for the AI Summit that I am helping put on at the 2009 Game Developers Conference, I am rapidly cranking through some of the key games of the year. So, I signed up for GameFly just so I could putz with some games in the short term. I will likely buy some of these games down the road, but the research budget for IA doesn’t cover spending $300 on games in only a few weeks!

Well, the first thing in my queue (along with Fable 2… check back later for that) was Gears of War 2. I had seen a number of the reviews in various places and I was impressed by not only what I saw but by what people were saying about it. Despite having Gears 1 sitting here, I had never really played it. (My son had.) So really, I had no idea what I was getting into.

Ok, wow.

Obviously, it is a very good looking game… but that’s not what this column is about. After watching Yahtzee’s take on the game, I was also fully prepared for plenty of “chest high walls”. Of course, there’s good reason for that given that the cover fire system is an integral part of the game. On the other hand, I have not seen the poor AI quirks that Yahtzee cracks on the same review. (Although I suppose referring to the generally satirical and sarcastic Zero Punctuation blurbs as “reviews” is a bit of a stretch now, isn’t it?)

So far the AI seems pretty solid. Now note that I have only played the opening level up to just past the epic speech (<- unintentional pun for those of you who actually pay attention to the names of the game studios who crank out your entertainment products) so I haven't experienced too much of it. However, what I have seen has been pretty decent for a shooter. The enemies are frustratingly adept at using cover. I have often found myself flanking them just so I can get a shot around whatever “chest high wall”-like object they are behind. What’s more, I have noticed that they will shoot from around different sides of the object. If the baddie is behind a desk, he may pop over it or around the side. This is a nice touch of realism that steps away from the typical method of 1-1 relationships of designer-tagged points. That is, there is no “and at this point, the AI can shoot over the object.” There seems to be simply “here’s a hiding spot… let him do what he needs to do.”

My allies seem to be pretty proficient at using the cover as well. Of course, I haven’t been paying too much attention to what they are doing since I have been concentrating more on saving my own ass. (Nota bene, I’m playing on the hard difficulty level.) However, as we move from battle to battle, I do notice that they are very conscientious of taking cover as we go… even when they are simply waiting for me to catch up.

All of this cover-taking is very refreshing in a shooter. I have (for 15 years?) been so tired of enemies (and allies) that simply stand out in the open and either wait to get shot or are so invincible that cover is unnecessary. (Yahtzee suggests this is possible in GoW2, but maybe he was on a different difficulty level than I am.)

For the most part, the animation seems clean. The transitions are pretty decent and any quirks seem to be more a result of the control system than the animation. That’s a hard problem to solve, so I don’t bitch about it too much. A better example is watching the animation of the AI characters rather than of myself. Everything seems smooth as they move, duck, fire, etc. I will pay more attention to that as I go.

I have yet to play enough to see how much of the enemy combat events are scripted and how many are dynamic. For example, early on the Locusts in the hospital are retreating… but that is obviously scripted as I have played through it three times (twice by myself and once in co-op with my son). I understand that. However, as I play on, I would like to see if there are places where the enemy retreats simply because I’m kicking his ass. I saw a lot of this in Halo 3, for example, which was controlled by Damian Isla and Max Dyckhoff’s battle management system. Given the impressive use of cover in Gears, the inclusion of a good fall back or retreat system would be cool. We’ll see.

That about covers it for the moment. More later. If you are jumping into this article, remember to check the Gears tag below to see if I have written anything else about this game.


Left 4 Dead: Companion State Changes

February 25th, 2009

Another interesting observation in Left 4 Dead. In this case, it is about the state machine that the companion AIs are using. First, the observations:

The first clip in the video below shows me getting ready to leave the safe house at the beginning of the level. My companions did their usual “grab some stuff” behaviors and then lapsed into “random wander” idle behaviors (I couldn’t hit the screen shot key fast enough to show Louis standing with his nose in the corner like a punished boy.) When I went down the stairs to the door, I was mildly perturbed that they didn’t follow.

I then opened the door and shot the zombie standing outside. They still had not moved to join me. A zombie rushed me, I leveled him, and my sidekicks were still admiring the walls upstairs. Only when I stepped across the threshold did they move to join me (with Francis doing a completely unnecessary walk on the railing… but that’s a future post). Something not shown in the video is something I have experienced before. Usually, when I step across the threshold of the safe house, they are in quite a hurry to leave the room, even to the point of pushing through me to do so. It probably would have happened in this case if we had not been under attack at the time.

In the second clip, we were at one of the intermediate buildings on a map. We had run inside, closed the door, stocked up on ammo and health packs, healed ourselves and whatnot. I opened the door and left the building. The video picks up as I look back inside realizing that my pals didn’t seem to want to leave. This was different than the first clip in that the trigger was not leaving the room.

There was a Boomer behind the building that I could hear. Even when the Boomer came around the corner and started waddling toward me, they didn’t move. Only when I fired my weapon did they decide it was time to rush out.

Now, for the explanation. It seems that Valve is using an HFSM (Hierarchical Finite State Machine) or another such tiered approach (a behavior tree can cause this as well). There is likely a high-level state that we will call “In Safe House”. When in this state, other lower-level states are things like “random wander,” and “random comment.” The only thing that seems to override it is if they see a zombie outside a door (many of the safe house doors have those barred windows). They will actually engage and kill zombies outside the safe house from inside the door. Therefore, there is an “engage/kill” state that is contained under “In Safe House”.

On the other hand, another high-level state is “In the World”. It is in this state that the AI spends most of its time. Apparently, “stick with the player” and “defend the player” are only included in this high-level state. That is why they would not follow me down the stairs while I was still in the safe house or defend me when I got attacked. However, once I crossed the threshold, a message was sent to them to change states to “In the World” at which point, they were free to analyze their usual parameters such as distance (move to the player) and threats (defend the player).

Note that this would not have been a big deal if I had simply stepped out the door. Alternately, in other safe house situations, the random wander location is in sight of the door. Therefore, when I got attacked, they would have likely seen the zombies and fought back. This particular arrangement did not allow for that.

Now, I don’t know what happened with the building in the second half of the clip. Because that isn’t an “beginning/end of level” safe house, I would suspect the above rules don’t apply. Why did they not leave, then? I have seen other behaviors where they don’t seem to follow me like I would expect, but I have usually found other explanations for that (another post on that later). In this case, it would have made sense for them to leave along with me just like they tend to stick close in other circumstances. That leads me to believe that there was an artificial state in play that led them to believe that they were supposed to be there (or rather had yet to convince them it was time to leave).

Regardless, in this case, the obvious trigger was me firing my weapon. This was not the case in the safe house example.

Neither of these issues is dreadfully wrong in a gameplay sense. They are only noticeable in certain circumstances. And certainly the companion AI in L4D is better than some we have seen. However, when issues like these happen, they do make us pause and ask “what are you guys thinking?” Therefore, while the logistics of the game may not be affected too much, the perception of the game is. It breaks that coveted suspension of disbelief by making us ask (in typical gamer parlance) “WTF?!?”

A simple solution would have been to pay more attention to what was under the HFSM state of “In Safe House”. Alternately, have more than one trigger to transition from “In Safe House” to “In the World” would have been better. For example, opening the door is an obvious trigger that it is time to go. Getting attacked certainly is urgent enough to warrant attention as well.

Additionally, abandoning the rigidity of a HFSM could be the answer as well. Much of the problem would be solved by using a system of free-floating priorities such as what I describe in my book, “Behavioral Mathematics for Game AI”. In that arrangement, you can generally dispense with the state/transition model in favor of one that always has all possible actions in play through a system of calculated utilities and priorities. Something similar to this is probably already in effect in L4D for things like target selection, action selection (fight, heal, reload, etc.) and other actions. Therefore, extending it to cover the situations covered above would not be terribly difficult, in my opinion.

Anyway, all in all the companion AI seems to be fairly decent. As we AI programmers know, companion AI is a beast simply because of how involved the companion is with the player. There’s more scrutiny, more options of what to do, and far more potential for the “WTF?” moment and the ensuing frustration. I think that companion AI is the next frontier of game AI that we are already in the middle of. L4D is in the vanguard of this movement and doing an admirable job of it.

Remember to click the tags below for more Post-Play’em observations on Left 4 Dead and other related subjects!

Also, if you liked this article, please take a moment to submit this link to StumbleUpon, Digg, or Reddit. I would appreciate it, as would many other game AI enthusiasts!


Left 4 Dead: Forget Something?

February 24th, 2009

I saw an interesting error of logic (which is different than an error of execution) in Left 4 Dead earlier today. As I was holed up in a safe house, about to head out on the next stage of the map, Zoey neglected to grab a health kit. She was slightly injured at the time. The rest of us had health kits already so it wasn’t that she was saving it for us or a semaphore was set saying “leave it for the player”. Also, because we were in the safe house, there were no distractions requiring her attention. She simply was oblivious to the fact that there was a health kit there.

I thought that this was very odd. It would seem that the one thing that the AI sidekicks should do is stock up on stuff whenever they can. This is very much like how they take a moment between battles to do things like reload, pop some aspirin, or heal up. Those are the times that you are supposed to do things. Additionally, during those lulls between the frenetic nightmares, you should also make sure you are stocked up on “stuff”. You never know when you are going to need it. However, while everyone else seemed to do so, she did not.

Because she was almost healed, I have to wonder if there was a fuzzy threshold that was not quite crossed at the time. I had half a mind to shoot her and see if she would change her mind. If I see it happen again, I will do so. Still, it doesn’t make sense to ignore the purpose of what is an obvious pit-stop in the game.


Left 4 Dead: First Look

February 23rd, 2009

Ok… half price weekend on Steam finally got me into Left 4 Dead. After watching all my TF2 buddies drifting away to this mysterious “other game”, I needed to jump in and take a look. Also, since it will likely be the buzz of GDC next month, I figured I had better have an idea of what it looked and felt like.

I have to admit that it’s a pretty groovy game. All the stuff we have heard so far is correct. The online, team play is cool. It’s so much better than most team shooters in that it seriously punishes you for separating from your cohorts too much. Also, because there is such a significantly different array of tactics that are necessary for playing as the infected, the versus mode is almost like having a second game. But that’s not what this column is about…

The big AI pull on Left 4 Dead is the “AI Director” that we have all heard so much about. In an interview with Edge Online, Valve’s Gabe Newell talks about all the nifty stuff they tried to take into account. Wikipedia even touches on the AI Director. It’s no secret that this tech was a big deal.

When I finally got to playing it, I was very impressed with it myself. Having played through some of the levels more than once (like No Mercy, for example), I am well aware that I don’t know where anything is going to be next. Compare that to other games where the 2nd time through you already have an idea of what is coming next… by the 3rd or 4th time, you have it down. I don’t like that amount of rigid predictability. With L4D, I have been on my toes at all times.

It does seem like it does a decent job of balancing the flow of the game. There are plenty of times when I’m “on the edge”. Compare this to the rubber banding I suspected in Doom 3 where it just seemed that the lower I got on health, the less damage the enemy did. The result was an (almost) asymptotic approach to 0 health. Exciting? A little. Contrived? Definitely. With L4D, this feeling is much more natural in that it is adjust the pacing of the enemies themselves rather than adjusting the abilities they present. Rather than the confusion of “why is this horrible monster doing very little damage now that I’m almost dead?”, I find myself saying “thank God they aren’t coming after us just now… I need to heal up a little!” It’s a subtle difference, but it is there.

That’s not to say that the game is always winnable in true rubber band fashion. On my first day of play, three friends and I played that last rooftop level of “No Mercy” about 8 times and kept coming up just short. It was exciting each time. Finally, we beat it by only barely dragging our asses into the chopper. Quite the getaway! As we reflected on what had happened (the game was new for all of us), I noted that every single time was different. Different monster placement, different ammo placement, different items, different pacing. We couldn’t do the same thing each time because the computer wasn’t doing the same thing. One time we used gas cans to light fires. The next time, I went looking for the gas cans… only to find that they weren’t there (they were across the level). The next time, there were no gas cans at all… just more propane tanks — which meant a different strategy entirely.

What I have found interesting is, while playing the infected (which I am having trouble getting the hang of), I can watch the other zombies “pop in” as they spawn. It’s kinda fun to see them do that. Oddly, I feel a strange kinship with them at that point. (“Yeah, right here buddy! We’re gonna get ‘em from this closet, right dude? Right? Hey… pay attention to me!”)

The other thing I get to watch as the infected is how their “idle” behaviors work. There are quite a few of them and they blend well. Admittedly, by their nature, zombies don’t have to be terribly engaging, but it is a nice touch to come around a corner or see a group far off actually doing stuff. Sometimes, I feel that the sensory distance is a little short, however. If a little beepy grenade gets every zombie in the same zip code to freak out, why doesn’t my shotgun wake them all out of their staggering stupor as well? Again, people just don’t model the sense of hearing well in games. *sigh*

The AI of your counterparts is pretty decent, for the most part. I’ve seen a couple of odd glitches, however. Therefore, I think I’m going to make that a separate post so I can possibly post some FRAPS-caps of them in action.

(As always, make sure you check the tags below to see what else I may have written about this game.)


Half Life 2: Paying Attention to Me

February 10th, 2009

When I posted my first observation on Half Life 2, “Movement on Rails” the other day my colleague, William van der Sterren commented that one of the cool things that they did in HL2 was making the NPCs acknowledge the player’s position during conversations. While I certainly agreed at the time, I thought this was limited to eye contact and head position. That was just the beginning. I had not experienced the full depth of what they had done in the game.

Last night as I was playing some more, I had some of the extended conversations at Black Mesa East. As Dr. Mossman was walking me through the lab, I was surprised to not only see her turning her head, but even walking backwards (convincingly well) at times so that she could continue to face me. I’m tempted to go through that section again just to mess with her. If I keep moving, does she keep changing?


Anyone who has coached kids playing baseball has probably taught the drill of how to watch the ball as you are running backwards. Part of that drill is to change sides without turning your head. That is, looking over your left shoulder, then turning your lower body to run with the other shoulder leading so that you are now looking over your right shoulder. I think it would be interesting to watch the NPCs in HL2 react to that sort of situation.

All in all, I agree with William that it was a new point of immersion for a game NPC. More specifically, it worked to not break the suspension of disbelief simply because it looked natural.

Monlogue Breaks

On the other hand, there were awkward pauses in the monologues of the various characters. Sometimes, I figured that they were waiting for me to cross an invisible trigger threshold. That is, as they entered a room, they waited for me to cross through the doorway that they were then going to close behind me. However, the next line of monologue was put into the same queue as the actions such as closing the door. Therefore, they could not proceed with their spiel until such time as I allowed them to close the door. If I had not moved, they would never have continued.

A solution for this would be to have a separate queue for the speaking and the actions. However, the speaking could be superseded by ad hoc lines such as, “Come on through the door so I can close it behind us.” and then continuing on with the monologue. This shouldn’t be too difficult to do with a priority-based system. The insertion of the vocal line “Come on through…” would be a higher priority than the other lines. As each normal line finishes, it triggers the insertion of the subsequent line into the queue with the appropriate priority. If there is nothing else more pressing, it would chain right on the end as per usual.

One of the effects you can pull off with this method is reaction-based stuff. For example, I was dying to fire my pistol into the ceiling during some of the speeches and conversations. Would they have reacted? I don’t know about HL2, but in other games, probably not. However, a priority-based system would override whatever sequence is being dictated with “What the hell are you doing?”, a few follow-ups about shooting weapons in the house (“You’ll put your eye out, kid!”), and the revert back to the regularly scheduled monologue.

Another effect would be acknowledging random people walking by. For example, during the hallway monologue, Dr. Judy could have received an event that a colleague was approaching coming the opposite direction. She could have inserted a slightly higher priority event to say “Hi” to the person in between lines of her monologue. She would say “Hi” at a break between lines and then go back to what she was talking about. Sure, there are caveats that you have to look for, but the inclusion of simple mechanisms like this work in a similar fashion to the head-turning one. They look natural and therefore feel natural to us.

(Remember to check the other Post-Play’em observations on Half Life 2.)


Half Life 2: Oblivious to Death

February 10th, 2009

One thing was kind of startling to me just now (I actually quit playing so I could write this). When I got killed, there were 2 bad guys right in front of me. I had only just hit the floor when they both immediately turned and began their “random patrol” state. I laid there and watched through my red-tinted death goggles as they paced back and forth in front of me. Despite being bombarded with radio traffic about my existence, and just enduring a firefight with me, neither of them was at all affected by my demise. Even a non-AI-savvy person would be jolted by this obvious lack of attention to my body. It just screams “state change”. Kind of a reverse aggro, I suppose.

In Halo 3, on the other hand, it was a very effective touch that, when I died, I could hear the Brutes and Grunts celebrating and taunting me. It was a reminder to me that I had let down my people. Also, it was a touch of “humanity” (loosely used) for the enemy AI. The one simple inclusion of an “enemy down” state would made a lot of difference.

Think about all the ends of firefights you see in the movies. There’s the “is he dead?” phase, there’s caution, relief, reporting in, etc. When I died in Half Life 2, I was wanting them to come over and prod my body or something. Really an extra couple of voice lines and a couple extra states to transition into and the extra immersion would have been very welcome. After all, dying (in a game) is an emotional moment for the player. Make him remember it.

(Remember to click on the tags below to see more about my observations of Half Life 2.)


Half Life 2: Movement on Rails

February 9th, 2009

OK, I admit that I had not gotten around to playing Half Life 2 until now. (It’s part of my post-book writing, pre-GDC ramp up.) I am not terribly far into it. I am alternating between riding my airboat (kinda fun!) and having to stop and do the various side-tasks.

So far the enemy AI is decent, although bland. (I’m playing on Normal, if that matters.) I’ve noticed a little ADD in the soldiers, however. They can sometimes forget where I am (or just was). If they are supposed to be looking for me, it isn’t working.

Another annoyance was the rails that the background people are walking on. During some of the opening scenes, when I was in the middle of a large room, people would walk straight through me. At one point, I didn’t notice what had happened right away other than that I was jostled out of the way. However, only about 15 seconds later, while I was standing in the same spot in the middle of the room, another person walked down that exact same line. I looked around a little to see if there was an obvious path that I was on but I didn’t see one. It looked like they were simply going from one point of interest to another and didn’t care that I was in the way.

Possible solutions involve the addition of a steering behavior on top of the standard pathfind. Even just the addition of a vocal cue of “excuse me” or “look out” would have softened the blow somewhat. Instead, the citizens came off as completely mindless.

On a positive note. The manhacks are convincing in their movements, though. They remind me of how difficult it is to control those little remote-control helicopters… which I suspect is the effect they were after.

(Remember to click on the tags below to see more about my observations of Half Life 2.)


Company of Heroes: Invisible Script Points

February 8th, 2009

I just made another interesting observation on Company of Heroes. In the campaign scenario that comes with free download (the town of Carentan), two enemy tanks came barrelling over the bridges, busted through my defenses, and took up positions on the intersections just SE and SW (screen-relative) of my Town Hall. They then turned toward the building and started whacking on me. I dispatched those tanks right where they had turned. So far so good–great tactic.

However, a minute or so later, another tank came down the left side through about the same path as the first. He stopped exactly on the place where I had destroyed the first tank (never mind parking directly ON the smoking hulk of steel) and turned in the same manner to face the Town Hall. Wow. Serious Deja Vu, folks. It immediately jumped out at me that this tactic was exactly scripted–right down to the exact location to stop and turn.

An easy solution to this would have been to randomize the point somewhat. Use the original point as an anchor, but throw in a random displacement within a radius. Check to see if it is valid to not only sit, but to have the desired sightline, and then move to it. Rather than a single, repeated waypoint, you now have something that resembles “over there someplace.”

The unfortunately side-effect of this is that I now know that I can defend specifically against that particular point (mines? an AT weapon?) and be in business. Moreover, I know that I may have to defend against it more than once. That’s not what I play RTS games for. I want to react dynamically to the AI and have it react dynamically to me. Now this may simply be a part of the campaign mentality (which I have not always been fond of in RTS games). Just like how the Town Hall gets leveled every time at about the same time forcing me to fall back to the church. OK fine, I get it… I get it. Still, it was alarming to see them use the exact same point twice in succession.

Otherwise, it’s still a good game so far (I may have to ditch the free demo and pick this one up for real!)


Add to Google Reader or Homepage




Content 2002-2018 by Intrinsic Algorithm L.L.C.

OGDA