Doors and Gates
A door is a obstruction to descending or progressing in a dungeon. A giant locked door blocking the way from level 2 to level 3 is a door.
A gate is an obstruction to an optional path in a dungeon. A underwater passage acting as a shortcut leading from level 1 to level 4 is a gate.
Soft and Hard Locks
A hard locked door or gate has exactly one solution to it, such as as the aforementioned giant locked door requiring the equally sized giant key.
A soft locked door or gate is one with an intended solution, but one where a variety of other solutions also works. The blessing of the water god might be the intended solution to the aforementioned underwater tunnel, but a water breathing spell or potion works just as well.
Tangent: What Even is a Metroidvania?
Some questions don't have answers, but I will attempt to do so anyways because I am nothing if not a fool.
A metroidvania is a type of video game that's kind of like Super Metroid and Castlevania: Symphony of the Night. Vague, I know.
Essentially, it's a genre in which you explore a large open map and unlock powerups over time that allow you to explore new areas, as well as explore areas in a new lens. A double jump might unlock the garden level, but it also allows you to reach that chest that's been taunting you since the start of the game. It also makes exploring areas easier, allowing you to easily perform once-difficult jumps with ease.
You might be seeing some similarities to the megadungeon.
What Even is a Powerup?
In a video game, the answer of "what is a powerup" is VERY easy to answer, even in the context of the extraordinarily weird genre that are metroidvanias. Samus' ball form is a powerup.
What about in a megadungeon?
This question becomes harder to answer due to the ephemeral nature of PC life. The fighter finds a cool ass set of boots that lets him walk on water? Damn it really sucks when he gets eaten by a dragon.
Games that treat players as a group of a great organization (like His Majesty the Worm) or where character's are much harder to kill (many modern games, but an OSR style game where the PC's are immortal would work too).
So again, what's a powerup? Simple: it permanently opens gates. A water breathing spell temporarily opens an underwater passage, but the blessings of the water god open it indefinitely. Draining it also does this, and as strange as this statement is, I would also consider that a powerup. Not having to treck through 3 dungeon floors to get to floor 4 is inherently a powerup to exploring the lower dungeons.
Ok But How Do I Make a Megadungeon?
Doors block progression. Gates block options. The point of a door is to stop the party from going places without first doing something else. You do this either to limit them from going too deep too fast and getting themselves butchered, or to prove that they have the mettle to explore something.
In a hexcrawl (which is essentially a megadungeon), the areas that are filled with more dangerous random encounters are generally only explorable by parties that can handle said random encounters. Those encounters are acting as a door.
Hard locked doors are a sometimes treat. A door that can only be opened by its intended key is inherently limiting to the party. Use them only when it makes sense and only in rare circumstances. New players often appreciate a hard locked door encouraging them to explore what they can handle first.
Soft locked doors are great. You want to progress? Prove you have the smarts to go on. Like any OSR problem, soft locked doors shouldn't have simple or obvious answers. "How do you cross the undergrouind ocean" is a far better question than "can the rogue roll high enough to open the locked door".
Hard locked gates are for checkpoints. They're a reward for progressing to a certain point, an easy way back.
Soft locked gates are also for checkpoints, but where a hard locked gate is best for progressing deeper, soft locked gates are best for progressing sideways, though obviously both are effective at either task.
The Caveat: The Rule of Options
There should never be but one key.
You might have a hard locked door, but there should never be only one key. At least 2, 3 is better. You never want the party to be stuck, unable to progress because they can't find the only key to progression.
Even gates and soft locked doors should have multiple options. Yes, the blessing of the water god will get you past the underwater tunnel, but so will finding a way to drain the tunnel, or drinking the alchemist Damasc's permanent water breathing potion, or any of a number of other options.
There should ALWAYS be options. Options breed creativity, and creativity is good. If you take nothing else from what I've said, take this.
In fact, there should be multiple paths of progression anyways. There should never be only one way from level 1 to 2, but several. Perhaps there is the main intended path, but there's also a way from level 1a, and a secret route from level 1 to 2 that requires a bit of fenagling to find.
Again: options breed creativity. Options breed exploration, and metroidvanias are about: fostering exploration.
I have a million more things I could say on the topic of megadungeon design and what we can learn from metroidvanias, but I'll call it good for now. Perhaps if there's interest, I'll consider writing more.