An immediate predecessor of Dungeons & Dragons was a set of medieval miniature rules written by Jeff Perren. These were expanded by Gary Gygax, whose additions included a fantasy supplement, before the game was published as Chainmail. When Dave Wesely entered the Army in 1970, his friend and fellow Napoleonics wargamer Dave Arneson began a medieval variation of Wesely's Braunstein games, where players control individuals instead of armies. Arneson used Chainmail to resolve combat. As play progressed, Arneson added such innovations as character classes, experience points, level advancement, armor class, and others. Having partnered previously with Gygax on Don't Give Up the Ship!, Arneson introduced Gygax to his Blackmoor game and the two then collaborated on developing "The Fantasy Game", the game that became Dungeons & Dragons, with the final writing and preparation of the text being done by Gygax.[68][69][70] The name was chosen by Gygax's two-year-old daughter Cindy; upon being presented with a number of choices of possible names, she exclaimed, "Oh Daddy, I like Dungeons & Dragons best!", although less prevalent versions of the story gave credit to his then wife Mary Jo.
Many Dungeons & Dragons elements appear in hobbies of the mid-to-late 20th century. For example, character-based role playing can be seen in improvisational theater. Game-world simulations were well developed in wargaming. Fantasy milieux specifically designed for gaming could be seen in Glorantha's board games, among others. Ultimately, however, Dungeons & Dragons represents a unique blending of these elements.
The world of D&D was influenced by world mythology, history, pulp fiction, and contemporary fantasy novels. The importance of J. R. R. Tolkien's The Lord of the Rings and The Hobbit as an influence on D&D is controversial. The presence in the game of halflings, elves, half-elves, dwarves, orcs, rangers, and the like, as well as the convention of diverse adventurers forming a group, draw comparisons to these works. The resemblance was even closer before the threat of copyright action from Tolkien Enterprises prompted the name changes of hobbit to 'halfling', ent to 'treant', and balrog to 'balor'. For many years, Gygax played down the influence of Tolkien on the development of the game. However, in an interview in 2000, he acknowledged that Tolkien's work had a "strong impact" though he also said that the list of other influential authors was long.