One of the things that struck me as odd even back when I first started playing D&D lo these many years ago was the assumption that castles existed in a world where dragons, griffons, manticores, and all manner of large, dangerous flying things ruled the air. Not to mention the fact that any adventuring party with a few scalps under its belt had access to levitate, fly, and dimension door and at least one member who was really good at climbing walls. The fact is, against the former a castle would provide no real protection and against the latter it would hardly be an obstacle.
Now don’t get me wrong. I understand the assumption is that such monsters are rare (although surprisingly common once you reach requisite level . . .) and that higher-level individuals are far from the norm (although, again, surprisingly common at times . . .). In other words, it’s bunk. To my mind castles, at least in the real-world sense, would not exist in a fantasy world because they simply cannot serve the same purpose in a fantasy world as they would in the real world. At least not built as they are. After all, real-world castles and fortresses developed, were refined, and finally fell out of use based on real-world concerns. So how would a castle – and by this I really mean fortified structure sitting on the ground – be built in a fantasy world?
Obviously if it’s a low fantasy/classic Tolkien fantasy game where powers and creatures able to circumvent a castle’s defenses are rare or non-existent then castles can be as they are, climb walls notwithstanding. But if it is your standard D&D/Pathfinder type game then some changes would need to be made.
Chief among these would be increased protection from aerial assaults. That means no wooden/slate shingles as roof-protection – we’re talking solid roofs here. It also means the end of an open courtyard, at least without some means of preventing flying creatures from landing in it. This could take the form of anything from nets and cables strung across open areas to some form of magical protection (more on that later) to not having any open spaces at all (and if there is an open space, you can be certain it is a trap). Another option would be to build the entire thing, or at least a large part of it, below ground (think Maginot Line); the castle has effectively become a dungeon.
Having dealt with aerial threats the design of a castle would now concern itself with magical threats. One such spell is of course guards and wards, but that is mainly for dealing with intruders already inside. What about defenses for the outside? How about a spell that senses someone climbing the walls and turns the stone to glass or causes the stone to turn to mud and then turn back to stone, trapping the climber? How about a dimensional shield/wall effect that prevents passing through the walls? You can rest assured that in “action/equal opposite reaction” style spellcasters would work around the clock to create spells to counteract these threats.
So in the end there would probably still be castles in FRPGs, but they’d look more like modern-day bunkers designed to deal with big guns and aircraft than the classic medieval designs. Furthermore, they’d be protected by an array of magic designed to counteract those wonderful spells and abilities the adventurers find so handy.