Because putting a deathtrap right below your bedroom is totally safe!
"Would you put up with a row of whirling knives in the cereal aisle at Safeway?" the Double Dragon guy asked. "Of course not. Why, then, should Duke Nukem have to run through a corridor of them to get the health pack he needs to survive?"
The Guild in Angel Beats! has a huge series of traps. They can (supposedly) be deactivated, though, and the deathtrap chain is justified since they need the traps to defend the place from Angel (and Death Is Cheap in their world anyway).
In Magi - Labyrinth of Magic the dungeons embody this trope, along with having malevolent living things inside too. Everything about dungeons wants to kill anyone who dares to enter them.
Library Island from Mahou Sensei Negima!. A library with not only monsters, but also booby traps. So much so that there's a club dedicated to exploring it. A member of the club actually becomes a full-fledged treasure hunter in a later arc. Library Island is apparently comparable to the most dangerous dungeons the Magic World has to offer.
The Twelve Temples Stairs from the Saint Seiya Sanctuary Arc. An endless staircase on a mountain, with twelve temples to cross for everyone without using their superhuman speed or teleportation (though dimension warps do work, strangely), invader or non-invader. The kicker? The heroes have to go through these to save their Goddess, who would normally be owning the place if not for the Big Bad, and to add insult to injury, it even has this giant fire clock (12 flames, 1 hour for each flame) whose only purpose is to give a sense of time running out to the heroes. Architecture bearing ill will towards the legitimate owner of the place (and her warriors) on this level HAS to be this.
Subverted in that the Anime seems to imply that several people know secret passages and shortcuts (but not the heroes). Which leads us into serious Fridge Logic territory, or in Screw the Rules, I Have Plot! territory.
And let's not even get into how Sagittarius Aiolos greets visitors in his Temple in the anime. The whole temple is full of tests of determination/character disguised as booby-traps.
To be fair, though, in the Hades Sanctuary Arc since the endless staircase + fire clock deadline is turned on the villains who are renegade Saints who came Back from the Dead. It still serves no real actual purpose, besides making it harder for heroes and enemies altogether (and this is used as a plot point to justify that some characters can't come to help in time). This is a recurring argument point in fandom and lots of speculations are made as to how the restrictions and such works, since Word of God said virtually nothing on this.
Also, Hades' Castle and the endless spiral staircase leading to Hell. With no security ramps. And every character has to jump in the pit anyway, with a very likely risk to die in the process.
Not that the architecture in the games of the same franchise is much friendlier, though...
The trap in the chilling movie Cube: another prime example of Malevolent Architecture, created no doubt as a sadistic experiment in human psychology. Every room is indeed a puzzle, and the slightest mistake will invite death. In short, everything is explicitly designed to be as lethal as possible, to force the unwilling participants to work together or perish.
City of Ember has an escape route (meant to eventually be followed by all the inhabitants, no less) that requires activating a complex machine that moves around small boats, destabilizes a power reactor, generates a powerful water current and finally blasts the hapless citizens in the aforementioned tiny boats through a waterslide course any entertainment company would pay millions for (replete with suspended structure). You'd think they could have built, I dunno, an elevator instead... It might have been justified if not for the waterslide, since the place was already past its expiration date anyway.
This is the Weapon of Choice of Death in the Final Destination, applicable to any location: Electric devices malfunction, containers holding liquids leak, sharp objects line up, heavy objects start moving, load-bearing structures break and so on.
Another literal example, like the one in Neverwhere, can be found in the Stephen King movie 1408. "It's an evil fucking room!"
In Galaxy Quest, Sigourney Weaver complains a lot about having to go through a Death Course to disarm a nuclear reactor:
Gwen DeMarco: What is this thing? I mean, it serves no useful purpose for there to be a bunch of chompy, crushy things in the middle of a hallway. No, I mean we shouldn't have to do this, it makes no logical sense, why is it here? Jason Nesmith: 'Cause it's on the television show. Gwen DeMarco: Well forget it! I'm not doing it! This episode was badly written!
When Judge Dredd and Fergie are sneaking back into Mega-City One, they do so via a vent that belches fire every thirty seconds. Dredd mentions that some people figured out the pattern, but died trying to take advantage of it.
The Black Fortress in Krull was one of these, including pits that randomly open and a spike trap room with absolutely no purpose. Then again, almost everything in that movie was bizarre and fatal.
The house at the center of the Jacques Tati film Mon Oncle is much the same, although this time it's played for comedy. In Tati's follow-up film Play Time, the theme is carried even further, showing a section of Paris ruthlessly sealed up in glass, concrete, glass, metal and then more glass.
Played seriously and fairly well in The People Under the Stairs. The house is designed to keep people in, and includes secret rooms, trick stairs, and electrified doorknobs.
The ancient South American Temple of Doom at the beginning of Raiders of the Lost Ark. No one has set foot in it in centuries and everything is absolutely coated in dust and cobwebs the size of blankets, but every single Death Trap is in perfect working order.
The Grail Temple at the end of Indiana Jones and the Last Crusade also qualifies, as a series of deadly traps divide the entrance to the grail's antechamber. After those traps have been conquered, trying to leave with the grail in hand triggers a Cataclysm Climax. Dr. Elsa Schneider discovered this fact the hard way when she stepped across the Great Seal in the middle of the temple: the ensuing earthquake claimed her life. That said, Grail Temple is both a test to determine who is worthy to become the next Grail guardian, and to prevent it from being removed, so it's justified.
In The Rock, John Mason gets in and out of the cistern room underneath the furnace by way of crawling through a tight space with turning gears and belching fire. Mason: "I memorized the timing. I just hope it hasn't been changed..."
Which is odd because the first time he went through he was escaping and the door opened from the inside. Meaning that he memorized and went through the dangerous fire tunnel instead of using the door.
Pre-Empire architecture doesn't seem much better. Recall the power generator room on Naboo: Lots of catwalks, no railings anywhere, and a corridor that appeared to serve no purpose except to have deadly-looking force fields periodically be turned on in it.
A more subtle example occurs in the film Targets; murderer-to-be Bobby Thompson lives exists with his parents and wife in a suburban house "decorated" in such hideously sterile banality that it would drive anyone insane.
Simon R. Green's Blood and Honour has a castle that is slowly turning into an Eldritch Abomination, amongst the many joys contained therein is a suite that one day spontaneously turned into a stomach and digested the family (including small children) that was living in it. It's such a happy book.
A borderline case occurs in Neil Gaiman and Terry Pratchett's Good Omens, with the M25 London orbital motorway. While it isn't actively trying to kill anyone, it is in the shape of a glyph from the ancient Black Priesthood of Ancient Mu that means "Hail the Great Beast, Devourer of Worlds." The frustration of travelers on the M25 is described as perpetually generating a form of low-grade evil into the surrounding landscape. later it becomes a straight example, when such leaking evil turned it into a lethal barrier that was at both the hottest and coldest temperatures conceivable at the same time. needless to say, crossing it was a bad idea.
The underworld of Atlantis in Grailblazers may not actively try to kill you, but the results are indistingushable when the corridor you were running along suddenly changes into a spiral staircase, causing you to plummet at full speed. This is a side effect of the relocation spell which moves Atlantis (the ultimate offshore banking haven) randomly around the world every 30 seconds.
Hogwarts Castle from Harry Potter shows tendencies for this, with labyrinthine corridors, disappearing stairs, doors that lead to a different room on Tuesdays, and the death course that leads to the Philosopher's Stone.
And should you venture outside, it's surrounded by a forest populated with people-hating, man-eating monsters. Have fun, kids!
In John Peel's Hide and Seek six teens take shelter from a storm in a seemingly abandoned house. They play hide and seek to pass the time. Then they start disappearing.
The house from House of Leaves. And not in the "ludicrously designed" sense, but in the "actively trying to eat the residents" sense.
Iain Sinclair wrote a book (London Orbital) exploring the grimness of the motorway and its surroundings.
In one of Manly Wade Wellman's short stories, Silver John encounters a living creature called a gardinel that resembles a house and eats whomever comes inside.
In Neil Gaiman's Neverwhere, a room in the monastery of the Black Friars is malevolent, as entering it gives you horrific visions of your own worthlessness and cheerily urges you to commit suicide.
Spoofed in Pelevin's Prince of Central Planning, where the protagonist has to pass through Prince of Persia-styled deathtraps routinely while going around his job (being a petty clerk in Central Planning).
Terry Pratchett's Reaper Man features the Lost Jewelled Temple of Doom of Offler the Crocodile God. The priests have a very easy time of it as, of the very few people who ever find the place, none gets past the Death Course, even as far as the jolly drawing of a thermometer for the Roof Repair Fund (a joke about the maintenance problems of old English churches, by the way). The priests barely look up from their game of cards to comment, "Heyup, another one for the big rolling ball, then." To date, two people have gotten through: one is Mrs. Cake, feared by all churches as a stubborn busybody, and the other is Death. When the latter showed up, the priests ran screaming, thinking it was the former. Essentially, their choices boiled down to Cake or Death.
The mall organism from the same novel is a literal and living example of this trope.
Also the Labyrinth in Ephebe as seen in Small Gods, and it gets redesigned every so often.
In Michael Slade's Ripper, a mansion on an isolated island has been converted into this trope by the pair of serial killers, as inspired by a book about H.H. Holmes (see Real Life below).
Live Action TV
In one episode of CSI: NY, Mac and the team had to navigate a penthouse that was still deadly years after its architect had it built, plus hidden puzzles and switches comparable to those found in the early Resident Evil games. Step on a panel, get stabbed by a what looks like a saw folded in half that pops out from the ceiling; an Advancing Wall of Doom that doubled as a very big broiler; and a room that'll drown you if you didn't bust open the correct wall.
Subverted in the Doctor Who comedy special "The Curse of Fatal Death", where the Doctor reveals he popped back in time to have a word with the architect, so the Master's would-be death trap dungeon turns out instead to contain only a Sofa of Reasonable Comfort.
In fact, the Master bribed the architect to install death-traps, but the Doctor anticipated that he'd do this, and bribed the architect to allow for escape from said death-traps, but the Master anticipated this bribery, and bribed the architect to install more death-traps, but the Doctor anticipated this too, and bribed the architect in defense. Eventually, the Master decides that after meeting the Doctor, he'll go back and buy the architect an expensive dinner. However, the Doctor already had dinner with him.
In part 3 of "Keys of Marinus", a building full of death traps houses one of the titular artifacts.
Played straight in "The End of the World", where the switch to restart Platform One's heat shields is on the wrong side of three enormous spinning fans.
This trope was the entire premise of the Sci Fi Channel game show Estate Of Panic.
British CITV series Knightmare invoked this trope on a regular basis - rooms filled with tiles which would send you plummeting into an abyss were common puzzles for the dungeoneers. The most literal examples were Wall Monsters; creatures who would appear in clue rooms and give hints as to which items would be most useful... assuming you could answer their questions correctly, that is. Later seasons sped up proceedings by introducing Blockers, mobile walls who would simply ask for a password... and devour any dungeoneer who didn't possess it.
Mr. Tid: Gentlemen, we have two basic suggestions for the design of this architectural block, the residential block, and I thought it best that the architects themselves came in to explain the advantages of both designs. (knock knock knock knock knock knock knock knock knock knock) Mr. Tid: That must be the first architect now. Ah, yes. It's Mr. Wiggin of Ironside and Malone. Mr. Wiggin: Good morning, gentlemen. Uh, this is a twelve-storey block combining classical neo-Georgian features with all the advantages of modern design. Uhh, the tenants arrive in the entrance hall here, are carried along the corridor on a conveyor belt in extreme comfort and past murals depicting Mediterranean scenes, towards the rotating knives. The last twenty feet of the corridor are heavily soundproofed. The blood pours down these chutes and the mangled flesh slurps into these large containers— City Gent #1: Excuse me. Mr. Wiggin: Hmm? City Gent #1: Uh, did you say "knives"? Mr. Wiggin: Uh, rotating knives. Yes. City Gent #2: Are you, uh, proposing to slaughter our tenants? Mr. Wiggin: Does that not fit in with your plans? City Gent #1: No, it does not. Uh, we— we wanted a... simple... block of flats. Mr. Wiggin: Ahh, I see. I hadn't, uh, correctly divined your attitude... City Gent #2: Uh, huh huh. Mr. Wiggin: ... towards your tenants. City Gent #2: Huh huh. Mr. Wiggin: You see, I mainly design slaughter houses. City Gent #1: Yes. Pity. Mr. Wiggin: Mind you, this is a real beaut. I mean, none of your blood caked on the walls and flesh flying out of the windows inconveniencing passers-by with this one. I mean, my life has been building up to this. City Gent #2: Yes, and well done, huh, but we did want a block of flats. Mr. Wiggin: Well, may I ask you to reconsider? I mean, you wouldn't regret it. Think of the tourist trade. City Gent #1: No, no, it's— it's just that we wanted a block of flats and not an abattoir.
The next design tips over and then spontaneously combusts while the architect is explaining how safe it is - but the architect gets the contract anyway, because he and the city gents are Masons.
In The Prisoner episode The Girl Who Was Death, she lures him into a ghost town, to a block of shops for a butcher, baker, and candlestick maker, each equipped with lethal booby traps inspired by their trade.
Robot Wars (no, not the super kind) and Battlebots, both shows featuring homemade combat machines, had the arena be as much of a potential threat at the other robots. Sawblades, spikes from the floor, fire coming from the ground, and many other things were available for potential damage. The former even had a Pit Of Do... Oblivion, which was an instant win if a team got the opponent in it, along with being a disposal bin of sorts for defeated robots; and the "Drop Zone", in which defeated robots are placed on a square on the ground with something very heavy hanging above. What's about to happen should be quite obvious.
"The Flipper". Defeated robots got some of their dignity back by getting air time. LOTS of air time. On more than one ocaision the latter flung said defeated robots into one of the former. And in early series the pit was perpetually open, and more than one obvious winner threw the competition on a driving error...
Rose Red. (Also based on the Winchester Mystery House.)
Betrayal at House on the Hill generates a completely new, usually absurd house each time. Even with full cooperation from the other players, it's possible to discover a room with a door adjoining a room with solid wall. This is discussed in the rules and errata as being false doors, not uncommon in ghost story houses.
The Underground Lake is also misprinted as an Upper Floor tile, which the errata says to play as discovered by a player suddenly falling from the Upper Floor into the Basement.
Tomb of Horrors is something of a Trope Codifier amongst Tabletop RPGs. The dungeon was explicitly designed as a place where the layout and traps would provide most of the danger, rather than monsters and combat. Justified in its sequel Return to the Tomb of Horrors where it's revealed that the original inhabitant of the Tomb, the lich Acererak, purposefully spread rumors of the fabulous wealth of the tomb to lure adventurers in, killing them and harvesting their soul energy in a bid for godhood.
Exalted has a very literal example in Malfeas, the Demon City. A bipolar living city that hates everything, including himself. And it's amazing what he can do with green fire. Luckily, in that body (he's got several), he's kind of blind to street-level stuff, meaning a character has to go out of their way to have that malevolence pointed at them (in the form of being beaten to their knees with buildings and set on radioactive fire), but since his attempts at self-harm take the form of slamming two shells of the city together with mass casualties, Malfeas is still not a place where you particularly want to spend your time unless you absolutely have to.
Alpha Complex, the dilapidated underground city in the tabletop roleplaying gameParanoia, thanks to the benevolent rule of your friend, The Computer (an insane and Orwellian Big Brother type A.I. that rules over all of Alpha Complex). Danger lurks around every corner and in every hallway, ranging from nuclear leaks, crazed robots, medical experiments and exploding prototype equipment to your fellow clone citizens out for a quick promotion. The bureaucracy is a maze that strangles you in red tape. And let's not even talk about the food vats. The slightest mistake (such as failing to display the mandatory, required level of happiness, or failing to duck in time) can be instantly fatal, or at least invite summary execution.
Which is generally fatal too.
Not only is Castle Ravenloft crawling with traps, but the original I6 module offers a literal example of this trope: one of the castle's towers is alive, and tries to dump you off its stairs or whack you with the halberds mounted on its interior walls.
The object of Robo Rally is to win a race through an factory-floor obstacle course of lasers, flamethrowers, conveyor belts, etc.
Any temple left by an ancient civilization in any RPG, ever. In fact, any ancient anything. No wonder all these ancient civilizations died out — they probably got killed by their own overly-complicated temples, outhouses and kitchens.
It makes more sense if said ruins were designed with the intent of making sure nobody gets out alive with itstreasure rather than putting people in there.
In the freewareBinary Boy, you have a beautiful green field ... which has stumps with man-sized balls spinning around, and meter-tall red blades flipping up and down, both very much lethal to the protagonist.
Mostly justified in Borderlands and Borderlands 2: the majority of the buildings in the setting are either cobbled together by bandits of questionable sanity (and as a result wouldn't necessarily have a logical layout anyway), and most of the other constructions actually make some sense (although many of them have fallen into heavy disuse). The few exceptions (such as Opportunity, which has a rather unintuitive layout for a city) are also justified, as the guy who built them cares much more about stroking his ego than about any practical concerns.
Dracula's Castle in all its forms in the Castlevania games. Given who it belongs to, it is quite malevolent. It is, as he puts it, "a creature of chaos". It isn't even his doing- its ever shifting, creating new deathtraps without his lifting a finger, although he does stock it with monsters- but some of them just appear regardless. After his death, his reincarnation has to deal with it just as the Belmonts did, and its just as bad, despite his metaphorical deed of ownership.
In Cave Story, it's unclear how much of any given cave is designed, and how much was just naturally hazardous. Some parts make sense: The Labyrinth is supposed to be impassible because it's meant to confine the Gaudis and protect the Core. And some of it makes less sense, such as the Grasstown pathway running through Chaco's fireplace, or the pit with instant death spikes (helpfully labeled) in Santa's house.
The Malevolent Architecture of Chips' Challenge is the point of the game. Chip is traversing the deliberately malevolent clubhouse to win the heart of Melinda.
The prevalence of the traps in ancient temples is lampshaded in Crimson Skies: High Road To Revenge.
Dark Messiah has loads of spiky things around to kick enemies into/onto. As one review memorably said "Welcome to The Adventures of Sir Kicksalot Deathboot in the Land of the Conspicuously Placed Spike Racks."
Used for fun in Tecmo's Deception. In the sequels, even the buildings inhabited by the heroes are filled with death-dealing devices which never shut off.
This is actually the entire point of Deception: Every game involves the player building death-courses to protect themselves from a nigh-endless stream of attackers. In the first game, you have to build most of the house, and building the course inside it. In the later games, they simply give you a pre-existing terribly dangerous area to hide in and go "Here's a giant pile of traps, make this place worse."
Not quite... the main danger's not the building, but either falling off bits of it (oddly for a platformer, falling more than about 1-2m would KILL you), or the wandering deadly things like thrown barrels, sentient firechickens, and so on.
The original batch of Doom games say that the influence of hell has changed the layouts of many of the proper Earth levels. Once you enter Hell itself, all bets are off. Keys in Hell itself are an explanation of Benevolent Architecture.
Dragon Age: Origins uses this trope quite a lot in the ancient elven ruins, since the ones you do get to visit were designed as burial chambers and so traps (including jets of flame between the statues) are needed to keep people out. The trope is also outright invoked in the trap-laden Temple of Andraste, where the scholar Genitivi explains the cultists' referral to Maker's retribution for trespassing thusly:
Brother Genitivi: It's much lyrical to write "Maker will smite the heathen", then "Billy toiled for years and years to make sure the spike goes right up some traveller's ass.".
In Dragon Age II, this is somewhat justified as Kirkwall was originally built by Tevinter Magisters. To prevent slave uprisings in Lowtown, the streets were purposefully designed to be narrow and "fences" are knee-high, jagged iron spikes. "The Enigma of Kirkwall" codex entry speculates that many streets were intentionally designed to form sigils for Blood Magic rituals, making the entire city itself both Malevolent Architecture and an Eldritch Location.
In the game Dwarf Fortress, instead of trying to dodge Malevolent Architecture, you're the one creating it.
Succession Games are particularly prone to this, with the fortress layout making absolutely no sense at all after a few people have been building, expanding and making mistakes.
Wherever mummies can be found in Adventurer mode, there too will be traps of every kind. Triggering one, even if you manage to successfully evade the trap, will wake the mummy's wrath.
The Dungeon Keeper series (which has you, well, keeping a dungeon) demonstrates just why this is necessary.
Largely averted in The Elder Scrolls III: Morrowind. The player can explore tons of ancient ruins, especially those of the technocentric (and extinct) Dwemer, but the only things trying to kill you are the mechanical defenders. However, in the Tribunal expansion, the player can visit Sotha Sil's Clockwork City, where there ARE deathtraps which WILL kill you and anything else that they get a hold of.
Played oh-so-straight in Oblivion. Ayleid ruins are the most justified example, since they were xenophobic against all other species, and so nearly every ruin is filled with traps. However, not only do they fail to actually keep anyone besides the player out, but other ruins also include traps with much less justification. A goblin-infested cave featuring tripwires? Makes sense. An abandoned mine reclaimed by bandits can drop logs on your head? Plausible. An Imperial fort full of undead that has clearly inbuilt pressure plates and swinging axes? This trope to a hilt.
One quest even had you walk through a grid of pressure plates which triggered darts if you didn't follow a pattern of symbols on the conveniently-given map. Of course, this quest took place in a crazed guy's head, so it makes sense in the retrospect.
In Evil Genius, you have to make the choice between making corridors easy for minions to use and filling them with traps against enemy agents: there's very little common ground between the two.
The Fatal Frame/Project Zero franchise. It almost seems a common practise to create the building in ancient Japan as puzzle rooms requiring the inhabitant to find all the missing pieces or shuffle around blocks to get into the next room, and certain rooms in the third game can only be accessed by climbing around in the rafters...
Justified in a way that the architect really DID design them that way on purpose for some reason and were then killed and buried in the very walls of the building.
Ultimecia's castle in Final Fantasy VIII, which, true to the trope, requires a good bit of puzzle-solving to navigate. In this case it's justified, partly by Time Compression, but mostly by the fact that the place is falling apart, requiring some creativity on the part of the characters to get around its broken staircases, blocked doors, and crumbling halls.
Zig-zagged in Final Fantasy X. When Summoners go on their pilgrimage, they are required to pray at all of the temples across Spira, with the "Trial of the Fayth" being reportedly very dangerous. The actual trials are all variations of block maze puzzles, but with lethal elemental magic. In Killika, there are flames that could kill you if you did the puzzle wrong. In Djose, there's lightning everywhere, in Macalania, if you can't solve the puzzle (and it's quite difficult), you stay there forever, and in Bevelle there are many platforms one could have fallen off from. Of course, the game doesn't actually let you die in any of those trials, and the first temple in Besaid is not dangerous in any reasonable way.
Severely downplayed in Goblet Grotto. Even though the game is full of Bizarrchitecture, the Egyptian Pyramid level is the only one that comes close to this trope - and all it has are a few shallow pits, that are easily seen and avoided in spite of the trapmasters attempting to persuade you they're full of jewels and perfectly safe. Of course, the game is a parody, so this was to be expected.
God of War: Pandora's Temple. Justified in that it protects the only weapon powerful enough to let a mortal kill a god, and as such, it was specifically designed (by an architect, making it actual Malevolent Architecture) for no other purpose than to killeverysinglething that crosses its threshold.
Also justified in the second game, the isle of fates is trying to protect something similar to Pandora's box; The sisters of fate, who call the shots for even gods.
And, surprisingly averted in 3, if an area isn't really fitting a death trap (like most of Olympus, which is only siege ready in the terms of their army), the most you'll find are a few foes. There is one exception though, the foyer where you fight Hercules has thorns that can be either this or Benevolent Architecture, since you and the boss can both be skewered by them.
Gremlins 2 for the NES takes this trope to the extreme. The game takes place mostly in an office building whose architect would most likely be sued by integrating an extreme amount of spikes, electricity, lava, bottomless pits, inconveniently placed conveyor belts, spinning flails and moving platforms into the building.
In Half-Life, Gordon Freeman frequently needs to turn on equipment, but the required buttons, valves and switches are in dangerous or unlikely locations, such as underwater or on the wrong side of an enormous fan.
Partially (but only partially) justified by the fact that the aftermath of the Resonance Cascade banged up the place pretty badly, and Marines and aliens shooting stuff what go "BOOM!" at each other all over the place probably didn't improve things. Nevertheless, the OSHA would probably have had a field day at Black Mesa even pre-Resonance Cascade.
Being a Capcom game, the castles in Haunting Ground seem to have minds of their own.
The finale location in Heavy Rain. Conveyor Belts which lead into meat grinders, a pit filled with water that can be used to drown kids, Pipes lying around for no reason...Almost justified when you discover it's a scrap reprocessing plant. But then it just raises more questions!
Subverted in ICO, where the deathtrap of a castle you're trying to escape was clearly a perfectly inhabitable building before the ravages of time knocked out most of the access ladders, walkways, ropes, bridges, and anything else that falls to pieces easily with time. (A few puzzles even involve accelerating this process with acts of creative vandalism to create new paths.)
I Wanna Be the Guy. The architecture in the game is loaded with this. The palace or castle of The Guy truly stands out.
The Catacombs in King's Quest VI are an interesting example in that, after you play through them, the Winged Ones have the traps taken out of them.
The Legend of Zelda series are all about this trope. Every single game. The games makes dungeons out of wells, castles, temples, a water plumbing plant, caves, a tree, a volcano (yeah, tiles and spikes and blocks and puzzles in a volcano), the insides of giant fish, an open forest, the top of a mountain...
The Legend of Zelda: Ocarina of Time has to take the cake with invisible moving platforms, invisible spikes, illusionary floors, floor tiles that rise up to try to kill you and doors trying to kill you. Oh, and pots. Yes, POTS!
Fabulously Lampshaded in the E3 trailer for "LEGO City: Undercover" where Chase Mccain, the protagonist, is falling down a mine's air shaft and narrowly misses a fan. He yells:
Chase: WHY WAS THAT EVEN THERE!?!
Treacherous Mansion in Luigi's Mansion: Dark Moon. The name kind of says it all, but for those who haven't played the game, the house/museum is perched on a tiny rock a few hundred feet above a canyon with waterfalls all around it. The interior isn't much safer, with a moving staircase to access the second floor, working space rockets and machinery, a maze of catacombs and Animated Armour wanting to slice whoever in half. The fact it has the 'strongest paranormal signals ever recorded' just makes it even worse.
The builders of the U.E.S.C. Marathon decided to put crushing elevators and huge pits of lava in a civilian residential area, among other things. Oh, and the seven-platform puzzle which is monstrously difficult and requires an hour of trekking back and forth between control rooms which activate a mechanical staircase to get to the friggin'observatory.
Invoked in Marlow Briggs And The Mask Of Death, the villain Heng Long comes up over the PA early in the game and fires all his maintenance people, instructing them to make the place as unsafe as possible before leaving to try and get the various obstacles to kill the hero.
The Mass Effect series generally averts this, although the haphazardly arranged volatile containersare another issue. One location in the second game has this fully in force: Jarrahe Station. The station is accessed after finding a crashed freighter on an uncharted world in which the security mechs it had been transporting got a virus, went crazy, and started killing the crew and randomly self-destructing. You trace the ship back to Jarrahe Station. You go on board to find that everyone is dead. Apparently the station's VI was infected with the same virus and killed the crew as they attempted to shut it down and reset the system. Mostly the station is just kind of creepy. Then you get to engineering. (The Malevolent Architecture comes into play here). The hallways in the section appear to have steam venting into them. Then the computer tells that it's actual plasma venting into the hallways. So then you have to make your way to the controls way in the back of the section, dodging the vents along the way to restore power to the section and shut the vents down. The plasma was venting due to the Axe Crazy VI running the place, but one wonders why there were plasma vents in the hallways in the first place.
Metal Gear Solid series is somewhat guilty of this, but not as bad as some other examples. In Shadow Moses Island, there are trap doors around the pillbox armory, and there's a blast furnace room right now to an extremely cold room - the former makes it extremely easy for someone to be incinerated with a misstep (or a helpful little push). In Big Shell, there are several-story high walkways with sections falling out, although this is due to crap worksmanship, rather than the architect's intent.
Perhaps the most absurd example is from the first MGS, which has one hallway start off with an electrified floor, contact with it being lethal and the rest of the hallway being flooded with toxic gas. Granted, in the current circumstances it makes sense as FOXHOUND needs to keep Otacon locked away in his lab, but this brings to mind several problems. 1: The path to Otacon already has several guards. 2: Their own people need to use that hallway too, but perhaps worst of all 3: Prior to the takeover, this was just a normal base. The only rooms in this hallway are a few offices, a conference room and a lab. What was the thinking behind it? In case the military can't pay their salaries, they'll just keep their personnel locked in behind the death floor?
Naturally, The Last Days Of FOXHOUND mocks this as with everything else with the series. First with the trap doors by that it had already killed several Mooks and nearly claimed Sniper Wolf, and later on, upon examining the Furnace Room/Freezing Warehouse (directly adjacent), Ocelot remarks that "whoever designed this place can go straight to Hell." Liquid had earlier criticized the trapdoors by asking if Dr. Doom was the architectural consultant?
Metroid's Samus Aran has to deal with traps and machines everywhere she goes, even ships and stations belonging to her Federation allies. On the other hand, these puzzles are always perfectly suited to her battle armor's powers; no one else could possibly get around these places. The Prime games set new records for both using and explaining away this trope — there are reams of scan text that tell you how, for example, Space Pirates unlock some of their doors with metal balls the same size as Samus's morph ball.
This is justified in many cases in Prime by decay of some sort. Either the ravages of time or battle have messed up the status quo and your only hope is what's in your arsenal of gadgets, or the world is crashing down around you (Prime 1 for instance, where you start off brimming with techno-wonders and lose it all to an explosion as the station self destructs around you).
One example is Echoes's Sanctuary Fortress. There is a single elevator to the roof, with one access door. That door is behind a wall of glass that can't be moved. You have to shatter the glass to get to the roof. To do that, you must shut off the main generator of the fortress, become a small sphere, magnetically adhere yourself to the generator's surface, and then propel yourself away from it with enough force to fly upwards several feet and shatter the glass. No trouble for Samus, but virtually impossible for anyone else, until you realize the species that lived there could fly and had mechanoids to help them.
Standard in Minecraft. Though there are some "cannon" examples in the randomly generated structures (eg. both types of temples), the mot prominent ones occur on multiplayer. In a vanilla Mine craft server, there is no protection against someone murdering you, stealing your stuff, and razing your base or house, making you a noob again. Though many servers have mods to prevent this, some don't or make you donate (pay) to use them. So what are you to do? Why integrate as many traps into your house as possible to kill any would be thieves of course! Nearly every serious player's house will have many traps and decoy treasure rooms, and they will have to go through great lengths navigating their own traps every time they want to deposit or withdrawal so much as an iron ingot from their horde. However in mine craft you can always mine blocks so there is no trap that can't be successfully or destroyed, so expect lots of obsidian to try to Rail Road you into forcing to go down the trapped paths an make you solve the puzzles. Many players even go a step further and, taking a page from every super villain, rig their buildings to self destruct with TNT upon command, so no one benefits from stealing.
Myst contains many examples of how the D'Ni seemingly wanted their lives to be a constant challenge, in which you couldn't go to the bathroom without solving a puzzle to unlock the control cabinet containing the switch which will free up the gear that you have to turn to open the lavatory door. The architecture can't actually hurt you (since there's no damage mechanism in the game), but it can block your progress and leave you frustrated for hours.
Uru's Gahreesen age. Two rotating fortresses "connected" by nothing more than a small rocky platform. Time your jumps carefully. Justified as additional security measures (the aforementioned rocky platform is the only place an intruder could conceivably enter) thus making an attack on the age with an army of more than about five people impossible.
Only if you assume the attackers don't have the means to fly, which is doubtful given how many weird creatures exist in other Ages, presumably including a Giant Flyer or two.
Pops up in virtually every level of Ninja Senki. There are large gaps requiring pixel-perfect double-jumps to get through, caves with floors, ceilings and occasionally walls laden with instant-kill spikes, dissapearing platforms you have to jump on, jets of high-temperature flame to bypass, a section requiring the player to jump off of water's surface or else drown ... You're a ninja, technically, and so are your antagonists (when they aren't ghosts, demons or worse), but that seems like an overkill even for them.
The fourth episode of Nocturne pins you against a deranged ex-demonhunter, with an overwhelming hatred for all non-human beings. Almost every room in his three floor villa is conceived as a deadly trap. Given that this apparently frail old man keeps a greater demon prisoner in his basement, a werewolf in the attic, several monsters roam the corridors and he has no problems navigating his home, could also be a token of his badassery.
Portal and Portal 2 have the Aperture Science Enrichment Center, where some of the tests are potentially lethal, and the whole place is controlled by a malicious A.I. At one point in Portal 2, you find the remains of the employee nursery and "Bring Your Daughter to Work Day" mentioned in the first game. It's in the bowels of Aperture, a few feet away from a giant device that produces and distributes neurotoxin. Although, the test chambers themselves can't count because they are designed to be lethal and dangerous. There's no excuse for everywhere else though.
Prince of Persia: Warrior Within justifies this: the Prince is using a castle whose owner is actively trying to kill him. Worn-out paths on the walls over chasms show that mooks have to wall-run routinely while going around as well. At least the traps in this game work on the monsters.
The palace segments of Prince of Persia: The Two Thrones, which take place in the Prince's home. You'd think he'd know how to bypass the traps, except for the completely inexplicable ones in the palace well. One possible explanation is that the traps had never been activated during his lifetime, and/or he hadn't really been paying attention when instructed about the bypasses, being kind of an arrogant jerk before SOT. "Who on Earth would dare to attack Babylon?", he may have said.
Prince of Persia (2008), however, makes no excuses, as it's implied people actually moved around the city as ruined as it is. In fact, when asked why she's so athletic, Elika responds that her home does not allow one to be weak. Yes, in a city that has no floor, one can imagine. However, when you enter the Royal Palace for the first time, when asked how people got around in that place, Elika remarks that the bridges that used to be there must have collapsed.
Pops up from time to time in the Quest for Glory series, but most prominent in Quest for Glory IV. The Cave of the Dark One is filled with rooms that will kill you in the Endgame. Make a mistake solving the puzzles needed to get around? Death. Screw up the ritual you need to perform in each chamber? Death. Fail to safely navigate the pools of lava, electrical barriers, and deadly wind-tunnels that the ritual you performed just activated? Death.
Lampshaded in Ratchet & Clank: Up Your Arsenal. In one of the games within a game (which is one of the few points where this trope is played straight), the Big Bad asks who designed his lava-filled base. His butler agrees it isn't very practical.
Attempted justification in Resident Evil 2, where the police chief was stark raving mad, and did it on purpose.
In the first Resident Evil, the architect of the trap-filled mansion was named George Trevor, who was hired because he liked to put such unusual quirks in his designs. Then other people started adding their own more additions to the mansion to make it even more complicated, and eventually Trevor got lost and died in the mansion because he did not recognize the layout.
Trevor also was apparently partly responsible for places in town, in particular the police station. The novels indicate (and thus lampshade) that most of the city's Powers that Be were nuttier then a bag of almonds.
To be fair, a lot of the weird puzzles are intended to keep the place hard to access on purpose (for example, the Aztec sacrifice puzzle in Chief Iron's office, which lets a person access the sewers and which is not supposed to be there) — these are secret passages/chambers for a reason. Also, you do tend to show up at these places after the initial chaos of a Zombie Apocalypse is over; in several cases, it's quite plausible that the items were scattered by people panicking or trying to avoid being attacked or security details just getting things screwed up. And there are some cases where items are where they should sensibly be — Resident Evil 2 has a spare fuse in the superconductor room, where you need to fill it in order to create a replacement main fuse.
Blackwood Manor in Scratches is a subtle example, in that every door in the place is designed to swing in both directions, allowing you to push them open no matter which side you approach them from. So many two-way hinges might be logical if the house had been built to accommodate a wheelchair, but it has too many stairs for that. Rather, it's to keep you wondering if something's lurking behind the door you just opened.
Which does happen once...
The 7th Guest: Old man Stauf built a house, and filled it with his toys...
The puzzles in question are there to instruct the guests as to what Stauf wants them to do. It's also implied both in this game and in its sequel that The house itself is actually alive.
Shrek the Third tie-in game had the sewers converted into a makeshift prison. Amongst other things, there's also a row of curved, hair-like spikes that emerge at different times in a pattern of sorts. There are also two guards nearby who are either discouraging you from going through or taunting you to go forward and get skewered.
Two words: Silent Hill. A town forged of Chaos Architecture and designed by the subconscious guilt of the main character, that leads to such things as the entire city being transformed into a maze of rubble, uncrossable police tape, and fissures; doors held closed with keys being convoluted puzzles involving unnerving poems, and coins scattered around the building.
Every Big Bad's base seems to consist of nothing more than endless rooms filled with deathtraps, bottomless pits, robots, and Spikes Of Doom, along with a few things that vary depending on the game.
One has to wonder about when Aquatic Ruin Zone from Sonic the Hedgehog 2 was more than just ruins. It's full of arrow-shooting devices, Spikes Of Doom and loops, among other things.
Speed Highway from Sonic Adventure, and Radical Highway from the sequel. They're both floating highways with 360 degree loops, traps and bottomless pits all over the place.
Hang Castle from Sonic Heroes. Turning the castle upside down just to open a door?
You generally got one section of this per indoor level in Franchise/Starcraft, although once during Brood War you got to make it work for you.
In Jedi Academy, in the second level on Vjun, about two-thirds of the way through the game, you start in a hanger with the series's star Kyle Katarn, who immediately runs to the locked elevator, then starts talking about how the switch to summon it is hidden in a control panel fourteen floors up, and generally mocks the trope he has lived in for about five games so far. This sequence is easy to miss as the real exit is blatantly obvious and closer than the elevator; approaching it starts a new cutscene where Kyle makes more comments about your next stop being a garbage compactor.
Throughout the entire level, Kyle uses his superior abilities to bypass the jumping puzzles and deathlasers you must get through. While the presence of nonfunctional elevators in nearly every corner takes some of the edge off, the player still has to wonder what the architect was smoking. The architect was probably Vader, so maybe deathtraps are to be expected?
Really, Imperial architects and designers are very clearly not right in the head - what purpose DO all those random death pits in their bases and ships serve? And how exactly do non-Jedi, like the Stormtroopers, manage to get to their positions when even Kyle. Kriffing. Katarn is nearly killed or maimed getting around these places by the architecture alone?
One extremely powerful build in Jedi Academy is to get Level 3Force Grip as soon as possible, which turns Malevolent Architecture into your weapon of choice.
Namco's Famicom version of Star Wars is rich in levels that require precise jumping or else you'll end up falling to your death, whether it be a bed of spikes, water, quicksand, or a bottomless pit.
The NES version of Star Wars: The last section of the 'appropriately-named' Death Star level is covered in lots and LOTS AND LOTS of spikes from TOP TO BOTTOM.
Super Meat Boy and its abandoned hospital with deadly needles and blood shooting out of pipes, as well as the inexplicable laser cannons. Same goes for the Salt Factory, with its deadly salt piled everywhere (what do you expect would be more dangerous for a boy without skin?) and the even more inexplicable rocket launchers.
Largely averted in the Thief; the levels are usually pretty logical and you get the impression that people COULD live in them; there are kitchens, bathrooms, toilets, etc. There are still some exceptions, though.
The entire Tomb Raider series really, but in particular Tomb Raider 2, in which an oil rig, a sunken ship and the streets of Venice usually feature doors that require a 3-mile away switch to open, deadly traps, timed runs through flames, extremely tall ladders, boulders, "dropped" keys that could only have been put there on purpose, and generally anything to pad the levels out and make them interesting.
Legend both plays this straight and plays with it a little. In one particular tomb, Lara is somewhat disappointed to find that the death traps are not functioning. Even if activating them wasn't a requirement of passing the Broken Bridge puzzle that impeded progress through the level, one feels that she would have figured out how to get the traps running regardless. She even mentioned installing them in the Gym, which is full of equipment made just for practicing traversing small platforms and balance beams like those in temples, so it's only a matter of time before she installs a sawblade corridor in Croft Manor. Of course, it's hard to tell if she's actually serious or joking.
In the movie, she actually has an ancient temple in her house, just to keep in practice.
The haunted hotel in Vampire: The Masquerade – Bloodlines is a labyrinthine maze where chandeliers fall on you, floors burst open, and vases, paintings and other small ornaments leap at you in order to kill you; at one point, the ghost(s?) even try dropping the elevator on you. The place is haunted, and wouldn't be very malevolent otherwise. Unlike...
The house of Dr. Alastair Grout later on. In this case, the mazeline nature and tricky doors are justified due to Grout specifically building with defence in mind; some of the more inventive traps, like the room full of electricity, are justified by Grout having an intense fit of paranoia and hiding from the things he thought were out to get him. The lunatics that wander the mansion (Grout's experimental subjects) presumably were either released as a bonus obstacle, or got out of their cells when Grout sealed himself in. Being a vampire, he probably had little problem with the place himself — unfortunately, neither had other vampires, like the main character, or Ming Xiao. Grunfeld Bach is human, but seems to get in easy enough—this is after the PC opened all the doors and got rid of all the crazies.
Lampshaded at one point in Voodoo Vince, in which the titular character stumbles upon a mansion that, for no apparent reason, contains a complex room-rotating system, and the narrator comments "wow, that must have been one screwed up architect."
Both Crescent Moon Village and Hotel Horror from Wario Land 4 have this in spades. The former seems almost unlivable, with the fire escape being the entrance, an open storm drain in the town and a cliff in the middle of nowhere, and the latter has huge vertical shafts in rooms with no floor. And randomly locked doors.
Also, Glittertown/Neon City and Derailed Express from Shake it. The former has slot machines with bombs as winnable as well as fire and enemies, the latter is not only a freaking dangerous train, the timetable (one of the treasures in the level) actually says it's scheduled to derail at 09:29.
The fourth level of World of Goo gives this a Lampshade Hanging with a message from The Sign Painter, who apparently aspires to be The Narrator: "The Goo Balls were excited to explore the mysterious pipe system... even if it meant traversing ridiculously contrived terrain."
When the Absurd Notions cast is playtesting "Traps & Treasures", which is exactly as much of a D&D ripoff as you would predict from the title, they run into one of these.
The Temple of Fiends in 8-Bit Theater is like this... well, until it, like every other trope in the comic, is turned right on its head.
In the Girl GeniusSteam Punk comics, old Castle Heterodyne is not only extremely malevolent, but also sentient. And a Heroic Comedic Sociopath with a nasty sense of humor. Its fractured personality core controls everything that goes on inside and delights in luring explorers (and repair crews of convicts) into death traps that make every Grimtooth dungeon look tame.
The place KNOWS it's screwed up. When Agatha tries to get the kitchen in line by telling it she's the latest Heterodyne and has already proven such to the mausoleum, the kitchen calls shenanigans and claims it hasn't heard from the mausoleum in decades. Oh, and did I mention that the impostor Heterodyne instructs the hired help with a lengthy lecture about what things are not to be touched, seeing as they're traps and will kill you? Malevolent Architecture indeed.
In Absit Omen, a group of first- and second-year Hogwarts students became lost in a previously-unknown section of dungeon alternatively called 'The Lost Dungeons' or 'The Terror Dungeons' depending on who you talk to. Possibly as the result of a massive Boggart infestation, the dungeons separated the lost kids, subjected them to their worst fears, and left them wandering lost for hours until rescue arrived via professor.
The Empty City in The Fear Mythos is a sentient city that likes to...play with its food. Its food being people who enter one of its Doors and then proceed to wander the City until they die. However, if you piss off the City (like interfering with one of its meals), it will find...creative ways of keeping you alive.
In Worm, Bohu turns entire cities into this, by merging with them and then reshaping them over periodic intervals to create deadfalls, pitfalls, and complex mechanical traps, closing off sections in order to trap and suffocate defenders, and on occasion just flooding the area with a Flechette Storm.
In the episode "If You're So Smart, Why Aren't You Rich?" of Batman: The Animated Series, there is a maze in an amusement park full of death traps, path-blocking puzzles, and highly lethal robots that prevent you from going back the way you came. None of which seems so unusual for Batman until you remember that this was meant to be navigated by the park-goers.
The maze was "tweaked" after-market by the its designer, the Riddler, who in the BTAS continuity is a Gadgeteer Genius, specifically to make it a death trap.
In Code Lyoko, Sector 5 or "Carthage" includes about every example of this trope: from crushing walls and Descending Ceilings to Laser Hallway or deadly doors, and a whole room that just fall down on the heroes. And that's not even accounting the monsters.
And all of this is on a timer — the heroes get trapped unless they press a switch within a certain amount of time.
Being a parody of video games, Code Monkeys often has characters navigate through Malevolent Architecture when traveling within the Gameavision building.
In an episode of Fish Hooks it's revealed that Principal Stickler has a secret lair with pits of molten metal akin to the ending of Terminator 2: Judgment Day. Bea lampshades this asking why he would need them.
The Hotel Cabal from Gargoyles employs severalDeath Trap tropes and provided one of the most chilling episode endings ever seen in a Disney cartoon.
An early episode of The Penguins of Madagascar did this with a toy factory with tanks of molten metal and a conveyor belt with pendulums and other things that have no earthly business being in a toy factory, prompting Skipper's lampshading of the situation with the question "What kind of sick and twisted toy factory is this?!".
Parodied in a skit on Robot Chicken, where it shows the Mayans building the temple from the first Indiana Jones movie, with the head engineer explaining to the chieftain all of the death traps and how there's no way anyone could possibly pull off all of the specific things Indy did to avoid them...
Star Wars: The Clone Wars did this with the titular "Box" of the episode "The Box". It is a death trap maze that is meant to lethally weed out bounty hunters to find those skilled and hardy enough to participate in a plot to kidnap Chancellor Palpatine. It helps that it is also being run by a Killer Game Master who wants to kill his closest rivals to prove he's the number 1 bounty hunter.
ThunderCats (2011) episode "Journey to the Tower of Omens" has a video game-style Temple of Doom and makes its existence make sense. A bunch of Warrior Monks created it to guard a holy book that no-one else should have (hence the gratuitous sharp objects). They are extremely badass and know where all the traps are, so it would probably be easy for its makers to use. Anyone else would have a hard time not getting ground into hamburger.
The original '80s ThunderCats series has Baron Karnor's tower from the episode "The tower of traps", in the 1st season. Lion and WilyKit have to deal with several Booby Traps through the whole tower.
My Little Pony: Friendship Is Magic: The episode "Castle Mane-ia" revolves around the cast exploring Celestia and Luna's old abandoned castle, which includes numerous trapdoors, secret passages, and numerous other oddities, all controlled by a giant underground organ. The only possible explanation is that Celestia and Luna apparently liked messing with each other, because the castle is anything but practical.
The Winchester Mystery House, a giant mansion begun in 1884 by Sarah L. Winchester, and under construction continuously until her death thirty-eight years later. It features hundreds of false doors, dead ends, stairways to nowhere, and closets that open into five-bedroom suites in an attempt to confuse the ghosts of people who were shot to death by the Winchester rifles her family made. It was part of the inspiration for the house in House of Leaves and Rose Red mentioned above.
Truth in Television: Egyptian tombs were equipped with false passages, false burial chambers and death traps to foil grave robbers.
Incidentally, modern analysis reveals several chambers in many pyramids that are completely sealed from all sides with tons of rock, that may well be real burial chambers, and those easily accessible ones just fake, or ceremonial. Unfortunately getting into them would require severely vandalizing national monuments, so it may take long before any can be studied.
Designed to impede your progress? How about prisons? Which makes for great video game levels.
As mentioned in Literature, the M25.
H. H. Holmes, one of America's first serial killers, built a hotel called the "Castle", which, in addition to being a grade-A Torture Cellar, featured windowless rooms, labyrinthine hallways, hidden passages, trap doors, rooms that were literal death traps (some were gas chambers, some were incinerators, and some were just soundproofed self-sealing rooms where Holmes could murder the victim at his pleasure), and a pit of lime for disposing of bodies once he was done.
And he constructed it just in time for the Chicago World's Fair, ensuring he'd have plenty of victims. Chicago, come for the fair, stay for the torture.
A more passive variant, but there is actually a phenomenon called Sick Building Syndrome which is a slower real world version of it. The Other Wiki has a reasonable article about it
Old-school kid's playgrounds were often like this, unintentionally. Jagged, possibly rusty, metal slides that can burn you? Check. Potentially deadly fall hazards with no cushioning? Check. Ziplines prone to breaking? Check. Wood that splinters and gets chewed up by termites and dryrot? Check. If you think that's bad, check out this photo from FAIL Blog. And now they complain about playgrounds being too safe.
Cracked.com's article, 5 Most Embarrassing Architectural Failures, features several buildings with flaws that could have (or already have) hurt and/or kill people in or near them. A few examples being a concert hall whose curved, reflective surface became a solar-powered death ray, a hotel that tipped over completely due to rain, and a skyscraper on stilts that could have destroyed all of Manhattan if it collapsed.
Curved glass surfaces on large buildings have become a source of ersatz Archimedian death rays as of late. Recent offenders include the Vdara Hotel in Las Vegas, which projects a nice, concentrated beam of sunlight across the pool area (mitigation has only been partially successful in reducing the intensity); and a distinctively shaped skyscraper nicknamed the "Walkie-Talkie" in London, which made news when it partially melted a Jaguar parked nearby.
Many fortresses, castles, and palaces have an element of this in their design. After all, they are designed to be difficult to penetrate from outside, and if necessary, attacking troops attempting to enter the castle/fortress would be forced into awkward positions where they can be easily attacked from all sides (and have trouble finding cover). So-called star fortresses, pioneered en masse by French Marshal and fortifier extraordinaire Vauban exemplifies this.
Of course, many old palaces had dungeons had torture chambers inside for "entertaining" their owners' enemies as well.
Averted by fortresses in the modern/artillery (post-1870) age - their value lay in providing artillery-resistant points for troops to mass and counter-attack from, their defenses being purely for the purposes of slowing down the initial penetration and allowing friendly troops to more easily hold the 'shoulders' of the breakthrough-section. Once the enemy had committed the mobile forces to exploit the breakthrough, the reserves would emerge from the staging-galleries and counter-attack to re-establish the (old) front line, thereby cutting off the enemy's mobile forces from supply and reinforcementn and thus allowing them to be crushed at the defender's leisure. The fortress-complexes on the German side of the post-1870 Franco-German border were apparently extremely well-designed for just this purpose. Fortifications can also provide protection for artillery at the expense of limiting its mobility and thus actual usefulness - an artillery piece invested in a fortress cannot be redeployed as needed (at the operational/campaign level) to help execute offensives or disrupt and/or counter-attack enemy offensives.