Rogue (also known as Rogue: Exploring the Dungeons of Doom) is a dungeon crawlingvideo 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 of Adventure/Colossal Cave and the original Zork games.
In Rogue, the player assumes the typical role of an adventurer of early fantasyrole-playing games. The game starts at the uppermost level of an unmapped dungeon with myriad monsters and treasures. The goal is to fight one's way to the bottom level, retrieve the Amulet of Yendor ("Rodney" spelled backwards), then ascend to the surface. Monsters in the levels become progressively more difficult to defeat. Until the Amulet is retrieved, the player cannot return to earlier levels.
The basic movement keys (h, left; j, down; k, up; and l, right) are the same as the cursor control keys in the vi editor. Other game actions also use single keystrokes—q to quaff a potion, w to wield a weapon, e to eat some food, etc. In the DOS version, the cursor keys specify movement, and the fast-move keys (H, J, K, and L) are supplanted by use of the scroll lock key.
Each dungeon level consists of a grid of three rooms by three rooms (potentially); dead end hallways sometimes appear where rooms would be expected. Lower levels can also include a maze in the place of a room. Unlike most adventure games of the time of the original design, the dungeon layout and the placement of objects within are randomly generated.