(While I wouldn’t say that I’ve achieved mastery of the megadungeon format, “Megadungeon Mastery” has some nifty alliteration going for it, so it’s my title and I’m sticking with it.)
NB: Anyone interested in megadungeon creation should check out this theRPGsite thread on megadungeon design, and this Knights & Knaves Alehouse thread providing an exegesis of an original Castle Greyhawk map.
The location of the megadungeon has a dramatic impact on play. Placing the dungeon in, under or adjacent to a major city doesn’t just allow for easy PC access — which is itself no small thing, as it can save time every session that might otherwise be spent on describing travel or making wilderness encounter checks. It also impacts on magics like floating disk, slow poison or raise dead which have a limited window of utility. (Slow poison is infinitely more useful if you have time to carry the victim upstairs to the surface and just down the street to a temple.) Lastly, it makes random encounters with NPC parties more rational — an important goal if you’re aiming for Gygaxian naturalism — as those NPCs can enter the dungeon as easily as the PCs.
Placing the megadungeon out in the wilderness, as with sites like the Temple of Elemental Evil, changes the equation. Now the party has to travel to get to the dungeon, which can soak up time at the table. (It’s often best to gloss over the trip, especially after the PCs have gone back and forth several times, though that does lose the sense of scale and distance involved.) It also makes tracking the in-game calendar of events more complicated; if, like some old-school games, you have different PC parties wandering the landscape, it’s much more likely that their timelines will get snarled up if each session takes days rather than hours of in-setting time. Meanwhile, NPC parties also have to travel through the outdoors to reach the dungeon, which can result in the PCs spending whole sessions tracking down and ambushing NPC parties in the wilderness — or themselves being ambushed by those selfsame NPCs!
(Either way, the dungeon should have multiple entrances, but that’s a matter for another post.)
Having run a megadungeon outside of civilization, I have to recommend putting one’s first megadungeon in a population center instead. There’s already tons of bookkeeping involved in running old-school D&D, and it’s worth keeping the dungeon right under the PCs’ home base in order to reduce that workload.
As to the home base itself, this can be anything from a peaceful village to a Gold Rush-style shantytown to a major city. The nature and scale of the place has a number of immediate effects. Smaller and poorer settlements may be limited in what wizardry and priestly magics are available to the party, and their merchants are less likely to sell unusual items, may have limited quantities of basic equipment, and may not be able to pay a decent price for some of the valuables pulled up from the dungeon. (This may mean lots of side trips to the nearest city, which you may see as an exciting diversion or an unwelcome distraction.) Meanwhile, larger cities are more likely to host rival adventurers to encounter the PCs in the dungeon or beat them to key treasure hoards.
In the longer term, the political impact of the PCs will also vary depending on the environment. Third or fourth level PCs may quickly become big shots amid an isolated rural landscape, while the same PCs may still be second-stringers in the politics of a metropolis. Again, your choice should be influenced by how closely you want your game to hew to dungeon delving as opposed to urban adventures.