One of the standard tropes of both swords-and-sorcery literature and Dungeons & Dragons type game settings is the lost ancient civilization which was possessed of high technology, fell through some cataclysm, and is now known only through legends and a few obscure artifacts.
In fantasy, we see this in many places. The Dying Earth is an obvious example, the World of Greyhawk has its Mighty Servant of Leuk-O and Machine of Lum the Mad, the Judges Guild Wilderlands campaign setting has its share of technological artifacts scattered about the landscape, and Blackmoor has a veritable City of the Gods. We see it in Ralph Bakshi’s wonderfully bizarre film Wizards. The theme is echoed in the legends of Atlantis and Lemuria, and even Middle Earth has its sunken Numenor, which ruled over what could be called a Golden Age, albeit without the benefits of high technology.
There is historical precedent for this as well. After the fall of the western Roman Empire, the successor barbarian kingdoms of the Franks, Anglo-Saxons, Burgundians, Langobards, etc. found themselves rulers over regions that contained architectural wonders that they were flat-out incapable of recreating. Roads of incredible durability, aqueducts demonstrating precision structural engineering, and even baths and villas with central heating that were simply not able to be replicated. Surely these were the works of gods or giants.
I can envision such a fallen technological civilization giving rise to a magical culture, as a sort of cargo cult attempt to replicate the now-unduplicatable wonders of the ancients. Stories are told of wondrous devices that can project an image from one end of the world to the other in an instant, complete with sound. Incapable of making a videophone, the barbarians in the ruins, through trial and error and hard work, manage to figure out the crystal ball instead. Hearing tales of weapons that could spit fire and lightning, but themselves incapable of creating a laser pistol or flamethrower, eventually come upon the secret of fireball and lightning bolt. And so forth. Use of magic develops because technology is no longer within reach.
Arthur C. Clarke once famously observed that “any sufficiently advanced technology is indistinguishable from magic.” That presupposes that the technology comes after the magic. What if a game setting reversed that trend and postulated the corollary?