A constant conundrum when adventure writing—writing dungeon crawls specifically—is what I call the surround syndrome.
Any detailed lair inhabited by intelligent beings may well fall into this trap. The writer has carefully and plausibly populated each room, adding creatures here and there, balancing ELs (in the case of D&D 3.5), and so forth. The challenges have been balanced and made so that an adventuring party will be tested but not overwhelmed. So far, so good.
One problem: most intelligent races will employ an alarm system—guards, whistles, spy holes, what-have-you. This means that unless the intruding PCs are very careful, the dungeon inhabitants will soon become aware of their presence and send up the alarm. The result? All nearby creatures are made aware of the PCs' prescence and a stampede of reinforcements heads toward the adventurers at top speed.
Soon the adventurers are surrounded by a large host bent on their destruction and all thought of EL balance has gone out the window. Also, the GM now faces the additional problem of having the PCs explore a largely depopulated dungeon ... assuming the party survives the initial battle.
There are several classic modules that fall into this trap. Key among them were two all-time favorites of mine: Hall of the Fire Giant King (G3) and Shrine of the Kuo-Toa (D2). The former was particularly egregious—PCs entering the fire giant lair head past a hidden guard (who will promptly blow a warning horn), and even if the guard is somehow bypassed the soon-to-be found grand hall promises an encounter with the King, four fire giants, and two ettins, and other fire giants and creatures lurk well within earshot. In the case of the Shrine the party is directed straight toward a ziggurat—the very shrine mentioned in the title—where they could well be completely overwhelmed by angry fish men if they aren’t respectful and subtle in their actions.
There aren’t any easy solutions to the surround syndrome.
Intelligent humanoids and similar foes will almost certainly take obvious precautions in defending their lairs—guard posts, warning devices, and the like. To have creatures simply sit in their rooms, waiting for the PCs to arrive, is silly, especially if the intruders have spent the last 10 rounds fighting a huge battle one room away!
Similarly, I feel the layout of a dungeon should always be “realistic” (or as realistic as you can get in game where humans throw fire or teleport, but that’s a subject for another time) and monsters should be well placed as fits the overall layout. This is not to say that the level of challenge for a particular room or area isn’t a factor, indeed this is a GM’s most important adventure design factor (or one of them), but the dungeon should flow in an organic fashion and not be stunted in favor of allowing intruders easy access for sake of keeping PCs alive.
I suppose a possible solution is a bit of extra work on the dungeon creator’s part, when it comes to creature motivations and lesser changes to overall dungeon design.
Creatures should always have their own motivations, intelligent or not. A dumb or unintelligent monster, such as an ooze, may simply sweep a limited territory for food and not respond to distant stimuli. Intelligent creatures may have their own reasons for not joining a big fray or “stampede to attack the intruders” such as pride, cowardice, laziness, etc. A commanding cleric may hear a ruckus but decide to let his underlings handle the “minor” problem. A self-interested thief or humanoid may purposefully avoid combat unless their own skin is on the line. There are possibilities to be found.
In the case of my own The Scaly God, I tried to prevent total surround syndrome in an area populated with troglodytes by such motivations. In one cave, a subchief wishing to prove himself is purposely slow to ask for help when confronted with puny humans or demi-human intruders. In another cave female trogs are inclined to stay out, guarding eggs in a maternal fashion. In yet another cave lair, the wily trog shaman, if given warning of intruders, remains in his cave and prepares a clever ambush.
Ultimately such motivation tailoring may do more to “justify” PC survival in the GM’s mind, producing little difference to simply having monsters “play dumb”—this is debatable. I have found, however, that giving monstrous opponents clear motivations is extremely helpful to the GM in setting the scene and predicting behavior in the face of both expected and unexpected actions. If, for instance, the PCs attempt to parley with a humanoid, it’s extremely helpful to know whether that humanoid is greedy, cowardly, cocky, etc. Such motivations if properly developed can greatly enrich a dungeon or campaign.
Minor structural changes to the dungeon can also prevent problems, such as using multiple sub-levels to divide up the inhabitants or spreading out the inhabitants a bit (perhaps via less intelligent creatures interspersed amid the others). A dungeon layout may also delay the arrival of some alerted creatures, so the PCs face a few gradually spaced "waves" of arrivals.
Surround syndrome is a drag, to be sure, but not insurmountable. Perhaps with a little extra work and creativity, any GM can banish this vexing problem.