(Page 1 of 3)
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.