One of the two fundamental Adventure Game puzzle types. This sort of puzzle is based on collecting an item or items from somewhere in the model world, and delivering them to some other place, where they can be of use.
The archetype of this puzzle design is an actual physical lock. The player must retrieve the corresponding key from somewhere else in the world, and bring it to the door. Another very common form is a non-player character who performs a task which alters the state of the game world when he is given the proper payment. Another variant uses a combination lock or similar that requires a code, and the player has to determine the right answer from hints in in-game documents.
In its simplest form, the player must do nothing more than bring the relevant object to the right place in order to solve the puzzle. Games with a more sophisticated user interface will require that the player use the "key" in some way specific to the nature of the puzzle, though in unskilled hands, this can lead to a Guess The Verb puzzle.
The Lock and Key Puzzle is one of the oldest and most common puzzle types across adventure games, especially Interactive Fiction. Its advantages include a tighter coupling with the model world than the Set Piece Puzzle. The setup is also easy to couple with plot developments, using the "key" as a Plot Coupon. The major disadvantages of this puzzle type are, on one hand, the possibility of Combinatorial Explosion and, on the other hand, the possibility of This Looks Like a Job for Aquaman.
See also Broken Bridge. If the "key" is something non-intuitive or ridiculous, you've got to Solve the Soup Cans. For examples that are literal locked doors that require a key, see the subtrope, Locked Door.
Video Game Examples
- This one dates back to the dawn of Adventure: the goal of Colossal Cave is to deliver the various treasures in the game to a treasure room.
- Zork has the same goal.
- Ubiquitous in the Resident Evil series.
- The ancient TinyMUD had a wonderful in-game language for constructing new puzzles. As long as they were lock-and-key puzzles. That was the only type you could build.
- The two Detective Barbie PC games had this, although it wasn't always literal keys.
- The NES game Castlequest was one gigantic version of this.
- Several puzzles in the later Wizardry games ultimately boiled down to this, though quite often the nature of the item you need is only hinted at, and said item is hidden half a world away. Also common in reverse: you find the strange or seemingly useless item first, then much, much later, find the place you need that odd item.
- In the first Mega Man Legends game, you had to find starter keys hidden in dungeons in order to drop the shield that housed the refractor. In the second to last dungeon you had to find ID cards.
- The Stoneship Age in Myst has a literal one, besides the fireplace panel in the library with over 280 trillion possible combinations.
- And then taken Up to Eleven in Riven, with its infamous "Waffle Iron" puzzle which requires you to place up to six marbles with different colors somewhere in a 25x25 grid. The total amout of possible combinations is in the quadrillions. Knowing a few of the criteria reduces the number down to a "mere" 93,850 trillion.
- The closest thing there is to a puzzle in the classic games. There are three different keys (red, blue, and yellow, all three in "keycard" and "skull key" variants, but only one variant appearing per level), each of which opens matching-color doors within the same level. Which keys appear (if any) depends on the level, and the format depend. Later on, fans cooked up source ports that allow the game to distinguish between key formats as well, so in custom WADs, a man-made electronic keycard doesn't open.
- Pops up in three different flavors in DOOM 3. The most common is restricted-access doors that require a scan for your PDA clearance, and you have to find the PDA of one of the people authorized (which the door's interface panel helpfully provides a list of) to download the clearance and gain access; sometimes, you have to find an actual keycard* ; and finally, certain areas have to be unlocked by accessing a security terminal.
- DOOM (2016) varies things up a bit by occasionally making the "key" you have to find a severed hand from one of the mangled corpses lying around.
- Wolfenstein 3-D and the later Quake both have gold and silver keys (also keycards and runekeys in the latter, depending on the level aesthetic). Most of the mid-90's "Doom clones" like Duke Nukem 3D, Dark Forces, and Blood also copied this idea. Blood is noteworthy in that it features six different key types (dagger, eye, fire, moon, skull and spider), though levels rarely feature all of them at once.
- In The Elder Scrolls III: Morrowind, in the dungeons of Tel Fyr, there is an unmarked quest involving a series of locked chests. Each contains some minor loot and a key for the next chest. Get to the final chest and you can walk away with a few legendary weapons and the best Light Armor cuirass in the game.
- There are at least two puzzle like that in Spellforce. While not mandatory, they offer nice loot. They reappeared in the sequel, as well.
- The more plot-driven Mystery Case Files games all end with variations of this.
- Almost all dungeon levels in the Dark Cloud series feature this. The dungeon item will invariably be dropped by one enemy on the floor upon defeat, which will be used to travel to the next floor. Occasionally, you'll find keys that will open up doors or bridges that block off parts of levels.
- raocow refers to these as "item babysitting" in Super Mario World ROM hacks: finding a key and bringing it back to a lock you passed, finding a springboard and bringing it back to a high jump you passed, etc. He's not particularly fond of these puzzles, but it's about all the complexity and nonlinearity one can manage in the Super Mario World engine.
- Eternal Darkness has many of these puzzles. One notable example is the "Staff of Ra"-style puzzle where the character finds a rod and a lens, puts them together and places the staff on a pedestal. The sunlight (or whatever it is) coming from above focuses through the lens into a beam, which must be rotated to reveal reflective panels before finally unlocking the door.
- Pokémon has at least two of these. In Pokémon Red and Blue and Yellow, plus FireRed and LeafGreen, you have to find the key card for the Team Rocket hideout to get through it. In Pokémon Diamond and Pearl and Platinum, the key card is needed for the Team Galactic building.
- Maniac Mansion is all over this. Finding all the keys (including keycodes), figuring out which lock they open, and getting things from the locked rooms comprises most of the game-solving puzzles
- Missing Children has quite a few locks for which you need to find keys.
- Randomly-generated Adventure Construction Set games consisted of nothing else. All but one of the dungeons would contain a locked door with an NPC demanding a specific item. The remaining dungeon would have the item that starts off the chain.
- Very common in The Castles of Doctor Creep. While not all the exit doors to the castles are locked with keys, all the castles require the collection and use of keys to proceed further in the level.
- One of the stranger examples appears in Doom RPG, in which the 'lock' is a large database with a piece of vital information buried in it somewhere, and the 'key' is getting an NPC to loan you a Beginner's Guide to SQL so you can look up the right command. Regrettably, the limits of the game engine prevent players who already know the command they need from bypassing this.
- Locked doors and color-coded keys are present in the Domino Dungeon and Plizzanet levels of Yo! Noid 2: Enter the Void. The puzzle is finding the keys.
- One of the quests in Withstand involves locating a key card that you need to open a door.
- The Pedestrian: Sometimes The Pedestrian will need to bring a key to a locked door to progress further.
- Dead County: There will come times when the delivery guy needs to hunt down keys to unlock doors.
- String Tyrant: The player progresses the manor, by finding keys to open doors. These are helpfully labeled with card suites both on the key and relevant door.
- Sydney Hunter And The Curse Of The Mayan contains many examples of different-coloured skull doors that require the appropriately-coloured keys to unlock.
- Pacify: Multiple doors in the house are locked, and the keys are scattered all throughout said house.
- Onryo (2020) has plenty of locked doors you need to find the key for.
- Blame Him has its share of locked doors that require keys to open. Luckily for the first one, the key's in the same room.
- HEPH begins with the Player Character in a locked room that requires a key card to get out. The only way to get it is to make one from the resources acquired by breaking down objects in the room.
- A-Tech Cybernetic has its share. The thing is, you just need to have the key in your inventory, and you can unlock the corresponding door by placing your hand on the scanner.
- Clea 2019: The doors to clear the levels are all locked, and you need to find the keys. Said keys are all separated into three pieces, so you need to find and combine them so they can work.
- Castle in the Darkness has a number of doors you need to find a key for.
- Today Is My Birthday has locked doors, and you will need to find keys for them.
- Hanako: The school the game is set in is FULL of locked doors. Each one needs the corresponding key to open it up.
- Ninja Outbreak: There are differently-coloured doors in the game that need their corresponding keys to unlock.
- Lunch Lady: Plenty of doors in the school are locked, and you need to find the keys to open them.
- Trenches (2021): There's at least one locked door in the game you need to find the key for.
- The Caregiver: The shed at Souichi's house is locked shut, and the key's in a box with a rusted lock.
- Roots Of Insanity: One of the first puzzles faced in the game is locating the key to B block.
- Eldervale: This game has its share of locked doors you need to find keys for, alongside ones you need to unbolt from the other side.
- Livestream: Escape from Hotel Izanami: Plenty of rooms in the hotel are locked, and require a key to open.
- Ecco the Dolphin: The majority of the series' puzzles are in this format. "SEARCH FOR THE KEY-GLYPH" indeed.
- Kolibri: This shooter has both autoscrolling levels and puzzle levels. The vast majority of the puzzle levels are in this format, requiring Kolibri to find a single-use powerup to blast through stones in his way.
- The Night Way Home: One of the first puzzles in the game is to find the key to the security room.
Non-Video Game Examples
- Commonly used in the Fighting Fantasy series of Gamebooks. Most of the time gameplay would revolve around obtaining Item A to get Item B, then using Item B to get Item C and so on...
- In a rare non-Video Game example, the 'Tomb and Trap' chapter of Various Vytal Ventures features an exercise to gather relics of seemingly odd shapes that are later revealed to fit together... and act as a key to the only exit.
- In Girl Genius the fragmented AI of Castle Heterodyne tasks the prisoners trapped in it to work on repairs with tasks like this on occasion by locking them in a room or wing of the castle and not letting them out until that section is repaired. Due to the state of the castle, the fact that there is no way to get food to individuals trapped in this manner, and the fact that the castle just can't pass up the opportunity to murder its occupants in amusing ways this often leads to the deaths of all involved rather than any repairs and opened doors.