Rush, Boom, Turtle: "For the love of God, Montresor!"
I've never been a big fan of walls in real-time strategy games, at least in practice. In theory, however, I love them. Who doesn't? There's nothing like a siege! Helm's Deep, Troy, Masada, Fort William Henry. Sieges are epic and dramatic, and it's always the good guys who build the walls. Of course, you can't have a siege without walls, because there's a whole other word for a siege without walls. That's called a "battle." You need gates for the barbarians to be at.

This is a siege without walls.
But walls are a problem in RTSes because they're complicated. It's hard enough to plop down a barracks and then a blacksmith, at which point you're already diverting too much attention from your army. With walls, you have to do the whole rigmarole where you place the starting point, then the middle points -- wait, were you supposed to be holding down the Shift key? -- and then the end point of the wall -- let up on the Shift now? -- and then your villagers go to work, and five minutes later they've finished except for a gap you didn't notice, through which the other guy rushes you. Oops. There's a reason Stronghold, a game about walls, was a city-builder and not an RTS.
Or maybe your villagers are cutting wood. Eventually, the forest where your wall once began turns into an inviting tree-stumped gap where your wall ends, and through which an enemy army marches. Oops. Or maybe you build walls and then realize that you would have won the game if you'd just spent that amount of money on units. Oops. No one ever finishes a real-time strategy game and then thinks to himself, "I should have built a wall!"
Rules of the wall
Walls have to be cheap enough to build, without being so weak that you don't bother building them. Walls have to be easy enough to set up without requiring a bunch of micro over time, but they can't be so simple that everyone makes them. Walls can't take too long to finish because they're specifically for turtling -- the counter to rushes, which happen early on. But walls can't happen so quickly that every rush will always encounter a wall.
And even when all that stuff comes together, it's important to remember what walls do. They will not keep out an enemy forever (just ask anyone who was at Helm's Deep, Troy, Masada, or Fort William Henry). That's not their purpose. Instead, they're supposed to funnel the fighting to where it's more advantageous to you. An ideal wall is one the other player runs into and then decides, "Screw it, I'm going around this thing," at which point you direct him to some sort of killing zone. In the average RTS, a wall isn't an obstacle; it's a detour.
Wall pitfalls
Some RTSes never solved various wall-related complications, but that didn't stop them from having walls. For instance, how does an army given an attack-move deal with walls? In Age of Mythology, an army will gleefully whack on a breached gate rather than attack-move past it. "Hey, little dudes, the wall itself isn't the enemy! It was just an obstacle, and now that you're on the other side of it, you can leave it alone! The enemy is the thing killing you while you hack away at an insensate wooden gate!" This artificial intelligence burble actually made walls extra-powerful in Age of Mythology.

Age of Mythology's armies have an unhealthy fixation on walls.
In some games, walls are great for cheap perma-scouting. Just build little wall bits around the map and you'll get a notice when enemies attack them. Even if they know enough not to attack bits of wall, you can still enjoy a little advance warning on the mini-map when enemies pass the wall bit's line-of-sight.
But the biggest pitfall is that I've never met an AI player that could deal with walls. Especially building them. Until walls are something that computer players can respond to effectively and use themselves, walls won't be a fully supported feature. Here's where I shake my head sadly and say, "We can send a man to the moon, but we can't make an AI that builds walls?"
Wall hall of fame
Electronic Arts Los Angeles deserves credit for trying to do some clever stuff with walls, even if it never quite worked. The original The Lord of the Rings: The Battle for Middle-earth gave the good guys walled cities, while the bad guys were stuck out in the open, naked and unwalled. In the sequel, good factions (and Isengard, natch) could manually build walls, but they had to begin from a player's main fortress. As EA fumbled around trying to balance The Battle for Middle-earth II, walls were variously crucial and superfluous. This sort of see-sawing game balance usually marks a failure at the design level. Although I still play it and love it, I'm not sure The Battle for Middle-earth II ever achieved any sort of equilibrium for competitive players. In its current state, walls are pretty effective as mid- to late-game flies in the ointment. When you look down and see that your army is full and you have 15,000 Middle-earth bucks, you might as well throw up some walls, which can upgrade into quick and easy defensive positions.
My favorite use of walls was in Age of Empires III, but not for anything inherent in the design. Age III is a very fussy economic RTS, with lots of options for base-building. These include walls that can be upgraded as part of the interplay among units, buildings and artillery. But they're still typical walls, more often neglected than not.
When Age III first came out, I was playing an online game with one of the guys from Ensemble. He obviously knew the game well -- he helped make it, duh! -- so he was going easy on me while I fumbled around trying to get an economy going. I had lost my Explorer to, I dunno, monkeys or something. Explorers are units everyone gets to explore the map and gather treasures, and they often die in ignoble circumstances. But a dead Explorer can be revived by sending an army to do a corpse run. To help remind you where your deceased Explorer lies, a despairing thought bubble loiters over his dead body.

Rest in peace, Explorer, until my army comes to get you.
When I eventually went to get my Explorer back, my opponent had built a tiny prison around his body from wall segments. Of course, you can just ransom your Explorer's body, but it didn't matter. This was the most awesome thing I've ever seen done with walls in an RTS. It was a way of saying, without malice or mockery, "I'm better at this game than you, so I'm just going to take a little time out to construct an impromptu prison around your Explorer as a way of saying 'Hello.'" In fact, the only thing better would have been if he'd built walls to spell out the word "Hello."
Unit of the Week

The Unit of the Week: The Battle for Middle-earth II's wall-crawling Goblins
In The Battle for Middle-earth II, Goblins can scale walls, which is a cool idea. But then they get to the other side, separated from the rest of their non-wall-scaling army, and they realize there's not much they can do. They're weak and cheap. I mean, come on, they're Goblins. Maybe not if there had been some villagers over there to kill, but that's not how that game's economy works. So the Goblins climb the wall, realize they were better off on the other side, and they come back. Eventually, you stop sending them over the walls in the first place.
Still, it's a cool approach to walls. Let some units simply scurry over them. Plus, it looks great. So this week's Unit of the Week are the wall-crawling Goblins from The Battle for Middle-earth II. Congratulations, guys. Try not to fight over the trophy.


