Rogue (also known as Rogue: Exploring the Dungeons of Doom) is a dungeon crawling video game by Michael Toy and Glenn Wichman and later contributions by Ken Arnold. Rogue was originally developed around 1980 for Unix-based mainframe systems as a freely-distributed executable (Public domain software). It was later included in the official Berkeley Software Distribution 4.2 operating system (4.2BSD). Commercial ports of the game for a range of personal computers were made by Toy, Wichman, and Jon Lane under the company A.I. Design and financially supported by the Epyx software publishers. Additional ports to modern systems have been made since by other parties using the game's now-open source code.
In Rogue, players control a character as they explore several levels of a dungeon as they seek the Amulet of Yendor located in the dungeon's lowest level. The player-character must fend off an array of monsters that roam the dungeons. Along the way, they can collect treasures that can help them offensively or defensively, such as weapons, armor, potions, scrolls, and other magical items. Rogue is turn-based taking place on a square grid represented in ASCII or other fixed character sets, allowing players to have time to determine the best move to survive. Rogue implements permadeath as a design choice to make each action by the player meaningful: should the player-character lose all their health from combat or other means, the character is dead, and the player must restart a brand new character and cannot reload from a saved state. The dungeon levels, monster encounters, and treasures are procedurally generated on each playthrough, so that no game is the same as a previous one.
Rogue was inspired by text-based computer games such as the 1971 Star Trek game and Colossal Cave Adventure released in 1976, along with the high fantasy setting from Dungeons & Dragons. Toy and Wichman, both students at University of California Santa Cruz, worked together to create their own text-based game but looked to incorporate elements of procedural generation to create a new experience each time the user played the game. Toy later worked at University of California Berkeley where he met Arnold, the lead developer of the curses programming library that Rogue was dependent on to mimic a graphical display. Arnold helped Toy to optimize the code and incorporate additional features to the game. The commercial ports were inspired when Toy met Lane while working for the Olivetti company, and Toy engaged with Wichman again to help with designing graphics and various ports.
Rogue became popular in the 1980s among college students and other computer-savvy users in part due to its inclusion in 4.2BSD. It inspired programmers to develop a number of similar titles such as Hack (1982) and Moria (1983), though as Toy, Wichman, and Arnold had not released the source code at this time, these new games introduced different variations atop Rogue. A long lineage of games grew out from these titles. While Rogue was not the first dungeon-crawling game with procedural generation features, it introduced the subgenre of roguelike RPG procedurally generated dungeon crawlers with Dungeons-and-Dragons-like items (armor, weapons, potions, and magic scrolls) that also had permadeath (permanent death) and an overhead graphical view, albeit via ASCII drawings, as opposed to text descriptions in natural language as did the landmark games Adventure/Colossal Cave and the original mainframe version of Zork (which themselves were the origin of Interactive fiction games).