Golems were not "invented" by D&D, they come from Hebrew folklore. The idea of trapping a soul in an object (or having intelligent objects) comes from real-world mythology as well. The concept of "ego objects" has been used in fantasy literature that predates D&D, as well, such as Michael Moorcock's "Elric of Melniboné", or J. R. R. Tolkien's "Lord of the Rings".
I'm very shocked that you never heard of Lord of the Rings, they even made a movie of it.
|