The world of D&D was influenced by world mythology, history, pulp fiction, and contemporary fantasy novels. The D&D magic system, in which wizards memorize spells that are used up once cast and must be re-memorized the next day, was heavily influenced by the Dying Earth stories and novels of Jack Vance. The original alignment system (which grouped all characters and creatures into 'Law', 'Neutrality' and 'Chaos') was derived from the novel Three Hearts and Three Lions by Poul Anderson.
The first Dungeons & Dragons licensed games were made by Mattel for the Intellivision. The contract actually required some variations to the normal Intellivision title screens. The games, however, had nothing to do with the rules or any of the settings. The first license for video games based upon the Dungeons & Dragons rules was awarded to Strategic Simulations, Inc. (SSI) in 1987 after ten companies had applied. SSI won the award primarily because of their broader vision and their experience in computerized wargaming. After a successful run with their Gold Box series of games, SSI lost their exclusive license in 1994. TSR then divided the license among multiple publishers. SR awarded Interplay Productions, Inc. a license to use the Forgotten Realms and Planescape trademarks and associated properties for use in computer and video game products. Within Interplay, a division named Black Isle Studios used this license arrangement to develop a series of successful games based upon the two D&D settings. They also published the Baldur's Gate series developed by the Canadian company BioWare. In 2003, Interplay ran into financial difficulties, resulting in the closure of Black Isle Studios. Their next planned D&D video game, code-named "Jefferson," was canceled as a result of legal issues with Wizards of the Coast, the new rights holders to the D&D franchise. In 2004, D&D remained the best-known, and best-selling, role-playing game in the US, with an estimated 20 million people having played the game, and more than US$1 billion in book and equipment sales worldwide. The year 2017 had "the most number of players in its history—12 million to 15 million in North America alone". D&D 5th edition sales "were up 41 percent in 2017 from the year before, and soared another 52 percent in 2018, the game's biggest sales year yet".