Post-Play'em - Observations on Game AI

Posts Tagged ‘RTS’

Brütal Legend’s RTS elements

Tuesday, February 16th, 2010

Ok… now I get what Tara Teich is going to be talking about in her AI Summit lecture on Brütal Legend. She is going to be focusing on the challenges that they faced when they introduced RTS elements into a brawler-style game. When I did my first look, I hadn’t really seen evidence of how the RTS/brawler cross-over was happening. I just now played the first major battle (after you set up the stage for the first time), and I really see the mechanism at work.

Trying to manage all the different types of “units” you can summon makes for an interesting gameplay element. What’s more, as a player, you have to switch between solo brawling and teaming up with the other units. For example, you can get together with a group of headbangers and form a moving moshpit. At times, however, you have to make the decision to disband the group and go back to mashing solo, or team up with another group. Oh yeah, and you can still just issue general orders to units you aren’t teamed up with — orders like “come to me”, “stay and defend” or “attack that”. This can be done in addition to the local control as a team.
If it is difficult for me to manage what is supposed to be happening in the grand melee of units, I can imagine that trying to organize it properly from an AI standpoint must have been challenging as well. Because the units need to be nearby in order to be ordered or paired up with, I wonder if the units try to stay close to the player?

But what happens if there are legitimate people to kill that I’m not near? I can see frustration developing if the units were to just go off and attack on their own. Sure, it’s the right thing to do from a tactical standpoint, but the whole point is to give the player the sense of command. In a way it combines the autonomy of RTS units with a little bit of companion AI from the likes of Left 4 Dead or Mass Effect.
The other question is if they are doing combined tactics when they are on their own. I don’t mean advanced stuff like flanking, etc. Rather, are they just picking the nearest enemy or are they spreading out for maximum coverage?
On both of these points, I will have to do some more observation of what’s going on — and that usually means watching one of my kids play instead of doing it myself. They usually don’t argue much when I tell them it’s their turn.

Company of Heroes: Invisible Script Points

Sunday, 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!)

Company of Heroes: My First Look

Saturday, February 7th, 2009

Well, now that I’m finished writing my book, I am grabbing a few demos of games that I really need to take a look at. I pulled down the free demo of Company of Heroes off of Steam the other day and have had a chance to putz with it a bit.

One of the reasons that I wanted to see CoH was the articles by Chris Jurney in AI Game Programming Wisdom 4. He wrote up a pair of articles on the pathfinding algorithms that they used–one for constructing realistic turns for vehicles and one for the ‘leapfrogging’ of squads. Both are good reading.

Anyway, I haven’t touched an RTS since Empire Earth (which chewed up way too much of my time in its day). It took me a bit to get back in the RTS groove. I was immediately impressed by the way the squads moved, but perhaps that is because I was looking for it. Also, they seem to react well to the unexpected. One concern that I had was how they didn’t seem to always go for cover when I would have expected them to. Despite having plenty available, sometimes they would hang out in the open. This is more alarming when 4 of the 6 squad members are in cover nearby but the other 2 don’t go. It makes me briefly wonder if the value being tracked is the amount of cover per squad rather than per soldier. I will have to investigate further on that (or just ask Chris when I see him next month).

The vehicles, as well, move admirably. Calculating vehicle movement on the fly (in a destructible environment!) is, indeed, a pain. Again, I will observe more, but they seem to do fairly well. The tanks have the advantage of being able to turn in place. However, the jeeps and trucks do not have this luxury and need to plan ahead lest they find themselves unable to make a turn.

On the 2nd campaign map (with the 3 bridges), I noticed some serious influence map work going on. As I got my bridge defenses shelled (and failed to rebuild quickly), the offensive seemed to shift to that bridge. As I reinforced it at the expense of another bridge, they seemed to shift to the one I had borrowed from. Now, with the fog of war in place, I don’t know for certain that is what happened. They may have been hanging out over there and just were able to push forward when I moved away. I will have to see if there is a replay mode that shows the enemy.

Sometimes I wish that the squads were a little more autonomous. There are times when I wish that they would take some more initiative with their orders. When I give them orders, everything is cool. I can tell a squad to attack/move all the way across the map and they will engage and move repeatedly until they get there. However, if I only give a unit partial orders, they will wait patiently until I get back to them… even if that means standing in the middle of the street.

One example of this is when I had an anti-tank artillery unit pointing one direction with no target and a tank started firing at them from behind, they didn’t turn around. While sticking to my orders is cool and all, some intelligent reactive behavior would have been warranted there. I’m not sure if this aspect is more of a design decision than a failing of the AI, however.

Again, I need to play with the game a bit more to get a feel for it. Right now I am spending more time noticing what I am doing rather than what the AI is doing.

(If you jumped into this article, you may want to click the “Company of Heroes” tag below to see if there are more observations on it.)