A role-playing game is, in its purest sense, a game based around collective storytelling, with one player (generally referred to as the gamemaster, but also in some systems as the Dungeon Master, Storyteller or Referee) setting up the environment of the game and other players using elements of chance and acting to create the action of the game within the gamemaster's planned environment. Usually played by spectacularly smart, capable and handsome men with stunningly beautiful girlfriends, these games are known as "face-to-face" or "pencil-and-paper" RPGs and are traditionally played with pencils, paper, dice, and sometimes gameboards and tokens. However, some RPGs went online in the late 1970s with the creation by UK software developers Richard Bartle and Roy Trubshaw of MUD (the original Multi-User Dungeon), which over a period of time evolved into modern Massively Multiplayer Online Roleplaying Games (MMORPGs) such as World of Warcraft and Everquest, as well as being adapted into improvisational, "real world" settings as Live Action Role Playing (LARP). This allowed computer nerds (at least those who didn't already play pencil-and-paper games on the side) to join the fantasy fun, as well as to meet many, many more people to eat chips and drink soda with than they would have in meatspace.
The term is also used, somewhat inaccurately, to refer to computer games where an adventurer or group of adventurers explores an open-ended setting to complete missions and obtain treasure. These games might be more properly called "dungeon crawl" or "adventure" games, as the storytelling aspect is largely left in the hands of the game designer, but the RPG tag has stuck due to the close association with pencil-and-paper RPG settings and mechanics.
Dungeons and Dragons is one of the most popular, having been created in the early 1970s by the late E. Gary Gygax as an outgrowth of his interest in tabletop strategy games such as Risk or Diplomacy. Its immediate precursor was a wargame called "Chainmail", and both it and D&D took as their inspiration elements of Robert E. Howard's Conan stories, the Elric books by Michael Moorcock, Three Hearts and Three Lions by Poul Anderson, and (to a lesser extent than often assumed) J.R.R Tolkien's Lord of the Rings. It combined maps, fantasy imagery, and turn-and-dice-based combat mechanics into a system that, after extensive refinement, would become known as the d20 system from one of the numerous polyhedral dice used in the game (and later identified with the often-complex statistical mechanics of the RPG genre in general).
D&D and numerous imitators became a popular pastime among students and more academically inclined types, appealing to both analytical (rules and statistical mechanics) and artistic (storytelling, imagery, and often the game materials themselves) impulses, becoming firmly established by 1980 as a favorite pastime in technical communities along with computer games, model railroading, and similar traditional, non-sporting habits. Numerous game settings, not just the high fantasy of old-school D&D but science fiction (Traveller, Space Opera, Star Frontiers, Shadowrun, Star Wars RPG, Babylon 5, Starship Troopers), horror (Call of Cthulhu, the World of Darkness games), and superhero (Mutants & Masterminds). Some game producers went a step further, separating setting from mechanics in generic RPG systems such as GURPS, TWERPS, and FUDGE. 
Roleplaying games went online in the late 1970s, influenced by early text adventure games such as Colossal Cave Adventure (abbreviated Advent on some systems) and ZORK, with the first being the American PLATO system's oubliette and moria programs, and the best-known being 1978's MUD by British hackers Trubshaw and Bartle. Copies of MUD would eventually become fairly widespread, merging early on with graphical interfaces (Plato's avatar and the later QuantumLink Habitat being prominent examples), ultimately evolving into modern MMORPGs such as EverQuest and WoW around 2000. MUDs and MMORPGs of varying levels of sophistication are wildly popular among gamers today, and serve not only as an adventuring platform but a social venue for online gamers.
Mechanics and gameplay
Fundamentally, the two main elements of any true role-playing game are storytelling and statistics. The setting - including environment, geography, biosphere, and backstory - is managed by the gamemaster, who either creates the environment or works from a prepublished scenario (known as a "module" in D&D). The players adopt characters of various types (the "roles" of a role-playing game), with various attributes (i.e. facility in various areas such as strength, charisma, magic) set up by various means to model the character's abilities in the game world. Some games have adopted D&D's character classes, where the abilities of the character are constrained by a player-chosen archetype. Others have removed these to increase role flexibility.
The storytelling element is created cooperatively, as the players explore the gamemaster's environment, with the gamemaster creating encounters between the players and non-player characters (NPCs), from peaceful encounters such as a financial transaction or an exchange of information to violent encounters with monsters or sentient opponents (from humans to alien-like beings to demons and demigods). Points of conflict - battles, negotiations, non-trivial activities such as device invention or lock-picking - are generally settled with random methods, usually dice rolls calculated according to player and NPC statistics, but also computer routines (for online games) and simple quick-decision methods like coinflips or rock-paper-scissors (for live-action gaming). Combat rules are sometimes more specific, often employing complex statistical mechanisms such as initiative (who gets to attack first) and turns (relating to speed and chances to attack). Early roleplaying games (especially the first edition of D&D) used markers (often painted figurines) and gridded maps to represent movements, especially in combat; while some systems still offer mechanics for this use now, the use of physical game pieces is usually optional except in strict strategy games such as Warhammer 40,000 or Risk, and maps are often drawn out on graph paper or special hex grid map sheets by the gamemaster.
Online games generally take the same basic setting as a tabletop game and convert it into an interactive virtual environment; game mechanisms such as movement, interaction, and combat become automated, although in large, commercially supported environments the role of the gamemaster is relegated primarily to the system maintainers (some MUDs, as well as more freeform environments such as Linden Lab's Second Life, however, do allow user participation in building aspects of the game world). Online games, especially MMORPGs, also allow for far more complex social interaction compared to what can be managed around a typical kitchen table, since any given environment can have any number of players at one time.
Live-action role playing (LARP), on the other hand, transfers the game experience to a "real-life" setting, in which acting and improvisation become a substantial part of the game world. Players interact in character (and sometimes in costume), and sometimes use "actual" weapons (foam swords and the like) in combat. The decision-making process is radically simplified, with such methods as rock-paper-scissors or coin flips used to resolve game encounters.
Styles and objectives of play
Opinions vary as to how much of role-playing should be based on actual player-player and player-gamemaster interaction and how much should be based on statistics. Those who are seen to focus overly on rules and statistics are referred to derisively as "rules lawyers" or "roll players" and, if their emphasis is strictly on treasure gain or combat experience, "min/maxers" and "munchkins". Numerous game systems have been developed over the years to appeal to gamers of many different styles of gaming; some games emphasize combat, technology, or magic, for example, while others focus on interacting with the setting or even playing politics with the gamemaster and other players. A few (such as the game Torg, originally published by West End Games) have tried to combine multiple aspects of the gaming world under one title, though the reception of such mixed-setting games has been mixed and sometimes quite polarized.
With a very few exceptions, unlike more traditional strategy games, RPGs are not inherently competitive, nor win/loss oriented except inasmuch as the objective of a specific adventure or encounter is met. Player characters are often expected to cooperate towards a certain goal. (The exception is politically-oriented games such as White Wolf Studios' Vampire: the Masquerade, where the players are often pitted against one another in an ongoing, sometimes unresolvable power struggle.) One source of RPG controversy, however, is that a great many games present a setting with a great deal of moral ambiguity. While D&D tried early on to create a nine-point "alignment" system to describe character morality, more recent games have done away with the concept entirely, and games targeted at a more adult audience often present moral choices that are sometimes amoral at best and at worst stark and highly distasteful, and often allowing players to play amoral or explicitly evil character (anti-hero archetypes are very common). RPG opponents find this perceived laxness to be unconscionable; RPG players generally consider it an author's trust in the players' emotional maturity and applaud such games for not talking down to their players.
In the early 1980s, during the advent of the Satanic panic, Christian fundamentalists leveled accusations of occultism at RPGs and their players. Common accusations (most notoriously summed up in the Jack Chick tract Dark Dungeons) include:
- Roleplaying games, particularly those in fantasy and horror settings, serve as indoctrinational tools into pagan or Satanic cults;
- They promote non-Christian practices such as magick and polytheism;
- Players become immersed in the setting and often lose touch with reality, causing violent behavior, dissociative mental illnesses and suicidal tendencies;
- Players who burn through characters frequently can lose an appreciation for the value of life, making them more likely to become killers.
As the Satanic Panic gathered steam, accusations particularly of D&D leading to suicide crystallized around the 1982 suicide of Virginia teenager Irving Pulling. Pulling was a Dungeons and Dragons player with an apparently difficult home life who shot himself shortly after a game; his mother, Patricia Pulling, blamed the game and the school authorities who had encouraged his involvement in it. When her lawsuit against the school and Dungeons and Dragons publisher TSR, Inc. failed, Pulling founded "Bothered About Dungeons and Dragons" and set up shop as an occult crime researcher. Of course her pamphlets used an assortment of half-truths, quote mines, and outright lies to push her agenda. Pulling's influence led to a vogue among some law enforcement officials to claim any crime where the perpetrator was a gamer as gaming-related. Recently, a Wisconsin prison has put into place a rule forbidding its inmates from playing RPGs, using much of the same evidence used by Pulling, et al.
Since fundamentalists will seldom admit to being wrong, pockets of anti-RPG hate still exist, and misconceptions about the exact nature of such games still abound among the uninitiated. RPG players are often seen as social outcasts, nerds or geeks by other, more "mainstream" groups (such as football/soccer enthusiasts); the perceived unsociable nature of playing RPGs (i.e. the use of imagination by all involved, playing RPGs at each others' houses) associated with RPGers has also contributed to the stigma. However, studies have shown that role-playing gamers are no more likely to commit suicide than non-gamers, and the introduction of live-action and immersive online gaming has helped RPGs to move well into the mainstream.
- And, alas, far too often pixellated.
- This was the path that game manufacturer Wizards of the Coast would follow after buying out D&D's parent company TSR, inc., abstracting the rules of what would become Dungeons and Dragons, Third Edition into the d20 system.
- This would sometimes be later known as BartleMUD to distinguish it from later implementations of the same idea; it is playable on modern browsers and hardware at British-Legends.com.
- Dice - especially unusual polyhedral shapes such as d10 or d20 - are considered one of the most obvious symbols of the roleplaying world, and frequent gamers often have bags with large numbers of different shapes of dice. This association is mostly correct, but not entirely - players of games in other genres such as Magic: The Gathering have been known to use these exotic dice for purposes specific to their own games.
- Considered by many roleplaying games a masterpiece of unintentional humor more than a warning. Available at Chick.com and heavily satirized , criticized, and parodied .
- He was also known by the nickname "Bink"; it is rumored that he was not fond of the nickname.
- Science Fiction author Michael Stackpole's 1990 Pulling Report is an extensive description of the death of Irving Pulling and his mother's connections with the seamier side of Christian fundamentalism, as well as a debunking of the supposed links between RPGs and mental illness and the occult.