NetHack
NetHack is a single-player roguelike dungeon exploration video game where players control a character navigating procedurally generated levels filled with monsters, traps, and treasures, with the ultimate goal of retrieving the Amulet of Yendor from the deepest dungeon and escaping alive.[1] The game features permadeath, meaning character death ends the game permanently, and emphasizes complex item interactions, role-playing elements such as character classes and alignments, and humorous, unpredictable events that arise from its intricate ruleset.[1] Originally released in 1987 as an open-source project, NetHack has been continuously developed by the NetHack DevTeam, with the latest major version, 3.6.7, released on February 16, 2023, and it supports a wide array of platforms through text-based ASCII interfaces, graphical tilesets, and even accessibility features like speech synthesis for blind players.[2][1] NetHack traces its roots to the 1980 game Rogue, which inspired Jay Fenlason's Hack in 1982, a simplified dungeon crawler that evolved through community modifications into the 1985 rewrite by Andries Brouwer at the Stichting Mathematisch Centrum.[3] The NetHack DevTeam, initially formed from the Unix Users Group at Rutgers University, released the first version in 1987, incorporating contributions from dozens of developers over the years and adopting the NetHack General Public License to ensure its free distribution and modification.[2][3] Key innovations include random dungeon generation for replayability, hundreds of items and monsters with emergent behaviors, and branching questlines tied to the player's chosen role, such as Valkyrie or Wizard, making each playthrough uniquely challenging and exploratory.[1] The game's enduring popularity stems from its depth and community-driven evolution, with variants and ports expanding its reach, and it received cultural recognition when inducted into the Museum of Modern Art's permanent collection in 2022 as a landmark in interactive design.[2][4] Despite its retro aesthetic, NetHack remains actively maintained with bug fixes and patches as recent as July 2025, underscoring its status as one of the longest-running open-source games in history.[2]Gameplay
Core Mechanics
NetHack is a roguelike dungeon crawler where the primary objective is to retrieve the Amulet of Yendor from the deepest level of a procedurally generated dungeon known as the Mazes of Menace and then ascend back to the surface to escape alive.[1] Players must navigate through multiple dungeon levels filled with monsters, traps, and treasures, managing resources carefully to survive the journey. Success requires strategic decision-making, as death is permanent, ending the game and forcing a new attempt with a different randomly generated dungeon.[1] The gameplay operates on a turn-based system, where each player command—such as moving, interacting with objects, fighting, or using items—advances the game by one turn, during which monsters also act.[1] Levels, monsters, and events are generated randomly at the start of each game, ensuring high replayability and unpredictability.[1] Core character attributes include strength (affecting melee damage and carrying capacity), dexterity (influencing accuracy and stealth), constitution (impacting hit points and resistance to ailments), intelligence (boosting spell success), wisdom (enhancing energy recovery), and charisma (improving shop prices and diplomacy), each typically ranging from 3 to 18.[1] Additional vital statistics are hit points (HP, representing health), energy or power (used for spellcasting), and alignment (lawful, neutral, or chaotic, which influences interactions with certain monsters and deities).[1] Combat forms a central pillar, with melee attacks initiated by moving into an adjacent monster, ranged attacks via throwing weapons or projectiles, and spellcasting that consumes energy to unleash magical effects at a distance.[1] Monster behaviors are driven by simple AI: many are hostile by default, but those sharing the player's alignment may remain peaceful unless provoked, while opposing alignments increase aggression; provocation, such as attacking or trespassing, can turn neutral monsters hostile.[1] Survival mechanics include hunger, which progresses from satiated to fainting if not addressed by consuming food, potentially leading to death, and encumbrance, where carrying too much weight slows movement and heightens food consumption based on load levels from unencumbered to overloaded.[1] Time-sensitive elements add urgency, such as shopkeepers becoming angry and summoning aid if debts are unpaid or shops are damaged, and pet management, where owned creatures require feeding and proximity to follow through levels, lest they turn wild.[1] Randomness permeates outcomes through underlying dice rolls that determine combat hits, damage, trap activations, and other events, creating variability in every encounter.[1] Item identification relies on this uncertainty, as most objects start unknown and must be tested through use, price identification in shops, or tools like scrolls of identify to reveal properties, blessings, or curses.[1]Dungeon Exploration
The dungeon in NetHack, known as the Mazes of Menace, consists of multiple interconnected levels that players must navigate to retrieve the Amulet of Yendor and ascend.[1] Exploration occurs in a turn-based manner, where each level presents a unique layout filled with rooms, corridors, monsters, and hazards.[1] The environment emphasizes discovery and risk, with deeper levels introducing greater challenges and rarer rewards.[1] Most levels are procedurally generated upon first entry, creating random arrangements of rooms, corridors, traps, doors, and special features such as vaults or thrones to ensure replayability.[1] This generation process draws from predefined room templates and algorithms that connect elements via hallways, incorporating elements like fountains, altars, and shops in a semi-random fashion.[1] Procedural creation applies to the majority of the dungeon, though certain areas use fixed designs for narrative or mechanical purposes.[1] The dungeon is structured around several branches that diverge from the main path, each offering distinct environments and objectives. The main dungeon, or Dungeons of Doom, spans levels 1 through approximately 10 or more, serving as the primary descent with escalating difficulty.[1] Early on, the Gnomish Mines branch provides an optional side area accessible via a side staircase, featuring ore veins and goblin inhabitants but ending in a dead end.[1] Sokoban is a puzzle-oriented branch with pre-designed levels requiring boulder manipulation to solve challenges and access rewards.[1] Mid-game includes the Oracle level, a quest-like area where players consult the Oracle of Delphi for cryptic information about the Amulet.[1] The endgame transitions to Gehennom, a hellish branch beyond the 20th level filled with demons and undead, culminating in the Planes, including the astral realm for final ascension rituals.[1] Special levels feature fixed layouts to enhance thematic elements and challenges, contrasting the randomness of standard levels. Quest branches are role-specific areas with predetermined maps, often involving unique objectives tied to the player's class.[1] In Gehennom, Vlad's Tower is a multi-level structure housing the vampire lord Vlad the Impaler, complete with drawbridges and traps.[1] The Wizard's Tower serves as a fortified lair for the antagonist, accessible via a magic portal and containing protective summons.[1] The Castle is a sprawling, multi-room level with a drawbridge, moat, and wand-wielding guards, designed for strategic siege-like entry.[1] The Astral Plane forms the ultimate special level, an open expanse where players confront cosmic forces during ascension.[1] Navigation relies on specific tools and features, each carrying potential risks. Stairs marked as '<' for upward and '>' for downward movement provide reliable vertical travel between levels, though pets may follow or block paths.[1] Teleportation traps or items can shift players randomly within or between levels, often without control.[1] Levelporting, invoked via magic or the '^T' command, allows direct jumps to other depths but risks stranding players in unprepared areas.[1] Environmental hazards include lava pools that burn on contact, water bodies traversable only by certain means or races, and chasms that drop items or characters to lower levels.[1] Monsters populate levels dynamically, contributing to an emergent ecology through random spawns tailored to depth and branch.[1] Placement occurs upon level generation or as players explore, with stronger creatures appearing deeper; monsters remain active only on their current level until encountered.[1] Unique bosses like the Wizard of Yendor serve as recurring adversaries, initially guarding the Amulet's theft and later pursuing the player with spells and minions across branches.[1] Faction dynamics include peaceful monsters, such as certain humanoids or animals, that coexist neutrally unless provoked, allowing for diplomatic interactions or alliances.[1]Character Creation and Progression
In NetHack, character creation involves selecting a role, race, gender, and alignment, which collectively define the player's starting capabilities, equipment, and interactions within the dungeon. There are thirteen roles available: Archeologist, Barbarian, Caveman, Healer, Knight, Monk, Priest (or Priestess), Ranger, Rogue, Samurai, Tourist, Valkyrie, and Wizard. Each role comes with a tailored starting kit of items and proficiencies; for example, the Barbarian begins with a dwarvish mithril-coat (hauberk), a two-handed sword, and high strength, while the Tourist starts with ample gold, a Hawaiian shirt, and a camera for taking "proof" photographs. These kits provide immediate utility suited to the role's archetype, such as the Healer carrying potions and a scalpel for medical applications or the Wizard equipped with spellbooks and a dagger.[1] Players choose from five races—Dwarf, Elf, Gnome, Human, or Orc—each imparting inherent traits that influence attributes and gameplay. Dwarves and Gnomes possess mining expertise and infravision for detecting warmth, Elves gain enhanced dexterity and perception but vulnerability to iron, Humans offer balanced versatility without extremes, and Orcs provide brute strength at the cost of poorer equipment quality and enmity from other races like Elves. Gender selection is binary (male or female) and primarily affects role nomenclature (e.g., Priest vs. Priestess) without altering mechanics. Alignment options are Lawful, Neutral, or Chaotic, shaping social dynamics: co-aligned monsters tend to be neutral or friendly, while opposed alignments provoke hostility, influencing temple access and divine favor. Some role-race combinations are restricted, such as Orcs being unable to select certain Lawful roles, ensuring thematic consistency.[1] Character progression occurs through accumulating experience points (XP), primarily earned by defeating monsters, though secondary sources include reading certain books or successful prayers. Upon reaching XP thresholds, the character advances a level (up to a maximum of 30), randomly increasing hit points (typically by 1d10 plus Constitution modifier for most roles), enhancing physical and magical resistances, and boosting combat prowess. Leveling also improves weapon and spell skills, with spellcasters like Wizards gaining access to new spells from their spellbook as power increases. Role-specific intrinsics—innate abilities such as poison resistance for Healers or stealth for Rogues—may activate at designated levels, providing passive benefits that grow with further advancement.[1] A pivotal aspect of progression is the role-specific quest, a unique multi-level dungeon branch accessed around dungeon level 15, where the character retrieves a quest artifact essential for ascension. These quests are tailored to each role's lore; for instance, the Knight undertakes a mission in a fortified castle to recover the Sceptre of Might, while the Samurai journeys to a lord's palace for the Mikaboshi. Success requires navigating role-themed challenges, guardians, and the quest nemesis, often involving puzzles, combat, and moral choices that test the character's alignment. Completing the quest not only grants the artifact but also unlocks deeper dungeon access and potential intrinsic enhancements tied to the role.[1] Alignment is dynamic and shifts based on in-game actions, tracked on a scale from +10 (extremely lawful) to -10 (extremely chaotic), with Neutral at 0. Benevolent deeds, such as aiding peaceful beings or sacrificing at co-aligned altars, nudge toward Lawful, while aggressive acts like slaying non-hostile or co-aligned creatures push toward Chaotic; extreme shifts (beyond ±5) can alter the character's official alignment, affecting monster attitudes, altar conversions, and artifact wielding. Certain conducts—voluntary restrictions like maintaining a vegetarian diet (no meat consumption), atheism (no prayer or sacrifice), or pacifism (no killing)—are automatically tracked by the game and displayed via the #conduct command, offering score bonuses if upheld but increasing difficulty by limiting options. Breaking a conduct removes it from the list, with no penalty beyond lost achievement.[1] Most characters begin with a loyal pet—a little dog, kitten, or pony (the latter for mounted roles like Knight or Ranger)—which accompanies the player, assists in combat, and shares experience from kills to grow stronger over time. Pets evolve in capability as they gain levels; for example, a kitten may mature into a housecat or large cat, increasing damage output and hit points while retaining tameness to prevent betrayal. Additional pets or followers can be acquired by taming wild monsters with thrown food, using a magic whistle to summon allies, or attracting humanoid followers through high Charisma, offerings at altars, or leadership demonstrations, forming a retinue that aids exploration and fights but requires management to avoid starvation or abandonment.[1]Items and Equipment
In NetHack, items and equipment form the core of player strategy, enabling combat, exploration, and survival in the dungeon's procedurally generated levels. These objects are diverse, ranging from basic tools to powerful artifacts, and are essential for progressing through the game's challenges. Players must manage inventory space carefully, as encumbrance levels—from unencumbered to overloaded—affect movement speed and combat effectiveness.[1] Items are categorized by type, each with specific uses and commands for interaction. Weapons, represented by the ')' symbol, include melee options like swords and maces for close combat, as well as ranged ones such as arrows and spears that can be thrown or fired. Armor, shown as '[', provides protection via armor class (AC) values, with heavier pieces like plate mail offering better defense (base AC 5) than lighter leather armor (base AC 8); enchantments adjust these values further. Tools, marked '(', encompass utility items such as pick-axes for mining or grappling hooks for retrieving distant objects. Potions ('!') are quaffed for immediate effects, identified often by color (e.g., clear for water), while scrolls ('?') are read once for magical results, with randomized labels per game. Rings ('=') grant ongoing benefits when worn on fingers (limited to two), wands ('/') deliver directed magic via charges that can be zapped or broken, and spellbooks ('+') allow learning spells through repeated reading. Food ('%'), vital for preventing starvation, includes perishable rations and tins that provide nutrition. Artifacts represent unique, powerful items, such as the elven dagger Sting or the sword Excalibur, which possess special properties beyond standard gear.[1] Identification is a key mechanic, as most items appear unidentified upon discovery, with randomized appearances to encourage caution. Players can use price identification by inquiring about an item's cost in shops via the #chat command, revealing base value clues to narrow possibilities. Testing methods include quaffing potions or reading scrolls, though this risks unintended effects; dedicated tools like the scroll of identify provide safer revelation of properties, including remaining charges on wands. The #name command allows labeling for tracking, and items in shops or from generation start unknown, requiring systematic deduction.[1] Wielding equipment involves specific commands: 'w' to wield a primary weapon, 'X' for two-weapon combat (with limitations based on handedness and skill), and 'a' to apply tools or wands. Armor is worn with 'W' and removed via 'T' or 'A'. Artifacts often require invocation via #invoke, sometimes involving multi-step rituals, such as the sequence for the Bell of Opening. Gear can be erosionproofed to resist damage from monsters or environmental hazards, preserving durability through targeted applications. The 'x' command exchanges weapons, and '#enhance' improves weapon skills for better handling.[1] The economy revolves around shops, where players buy items with gold using 'p' to pay or sell by dropping objects near the shopkeeper, who appraises based on base prices adjusted for factors like enchantment. Theft provokes hostility, leading to combat or barred access; unpaid debts are tracked, and inquiring prices aids identification without commitment. Wishing for specific items is possible through rare mechanics like polydilution (polymorphing into forms that generate objects) or certain artifacts, but remains probabilistic and resource-intensive. The '$' command displays gold and debts.[1] Random generation ensures replayability, with items spawning unidentified in dungeons, their appearances, charges (for wands), and nutrition values (for food) varying per game. Bones levels—preserved from prior ascensions—may include artifacts or charged items, adding risk. Inventory management uses 'i' to list all items or 'I' for types, with autopickup options configurable to handle the influx.[1]Magical Effects
In NetHack, items and certain game elements possess a beatitude status—blessed, uncursed, or cursed—that profoundly influences their functionality and interaction with the player. Blessed items exhibit enhanced properties, such as increased damage output for weapons against specific foes like demons or improved success rates for scrolls and potions, while also facilitating easier identification through price checks or priestly appraisal.[1] Uncursed items operate at neutral baseline performance, whereas cursed items impose hindrances, including the inability to remove worn equipment (such as armor or rings that "weld" to the body) and negative enchantments that reduce efficacy, like lowered to-hit bonuses or reversed effects for consumables.[1] Priests and priestesses inherently detect an item's beatitude upon examination, aiding players in early identification without expending resources.[1] To alter beatitude, players employ holy or unholy water, produced by dipping a potion of water on a aligned altar, which blesses or curses the target item accordingly; direct dipping of items into such water achieves similar results, though with risks of destruction for fragile objects.[1] Removal of curses typically requires uncursing via holy water, successful prayer, or altar offerings, as cursed items resist ordinary unequipping and can lead to perilous situations if equipment fails during combat.[1] Levels themselves can become blessed through divine favor, granting protective effects like temporary alignment boosts or monster repulsion, but curses on levels are rarer and often tied to desecrated altars that spawn hostile forces.[1] Spellcasting forms a core magical system, where players learn incantations by reading spellbooks, which appear as unidentified tomes that may confuse or backfire if mishandled.[1] Upon successful reading, spells integrate into the player's spell slots, limited by intelligence and wisdom attributes, with certain roles like the Cleric starting with intrinsic knowledge of basic divine spells such as healing or protection.[1] Casting occurs via the 'Z' command, consuming power (mana) proportional to the spell's complexity and the caster's skill level—ranging from unskilled (high failure chance) to expert (maximal potency and reliability)—with costs scaling from 5-50 points per use, regenerating slowly over turns or faster with rest.[1] Skill advancement happens through repeated casting or enhancement commands, categorized by spell schools like attack, matter, or divination, and failure risks include fainting, power drain, or explosive backlash, particularly if the player's experience level is insufficient.[1] Divine intervention manifests through prayer and sacrifice, governed by the player's piety—a hidden meter reflecting alignment adherence and devotional acts.[1] The #pray command invokes aid at altars or in desperation, yielding effects scaled to piety: high piety might grant full healing, curse removal, or smiting bolts against nearby threats, while low piety risks divine anger, such as summoned minions or attribute penalties.[1] Prayers carry a cooldown of approximately 5000 turns to prevent abuse, and outcomes align with the player's role and deity, like chaotic favors for neutral or evil shifts.[1] Sacrificing corpses via #offer on aligned altars boosts piety, potentially rewarding artifacts, intrinsic protections, or alignment changes, though unsuitable offerings (e.g., wrong alignment) can desecrate the altar and spawn undead.[1] Beyond these, polymorph represents transformative magic, altering the player's form into monsters via spells, wands, or potions, conferring new intrinsics like breath weapons or flight but often complicating inventory access and risking stat loss upon reversion.[1] Monsters employ spells offensively, such as liches hurling magic missiles or clerics summoning elementals, which players counter through magic resistance gained via amulets or spells.[1] Elemental resistances—against fire, cold, shock, poison, and acid—arise magically from spell effects, role intrinsics (e.g., Wizards' innate magic resistance), or temporary buffs from divine pleas, mitigating damage by 50-100% depending on the source and stacking rules.[1]Death and Permadeath
NetHack enforces a strict permadeath system, where character death is irreversible and ends the current game session without the option to reload previous saves, emphasizing risk and consequence in gameplay.[1] This design prevents "save-scumming," a practice common in other games where players reload to avoid mistakes, forcing players to accept the finality of their decisions. Upon death, the game may generate a "bones file" that preserves the deceased character's corpse, inventory items, and the level state for potential discovery by subsequent characters in future games, adding a layer of persistence across playthroughs.[1] Characters can meet their end through various means, including quitting via the #quit command, which ends the game voluntarily without combat or hazards; escaping the dungeon prematurely, often resulting in a lower score; or fatal events such as being killed by monsters (including one's own pet turning hostile), poisoning from venomous attacks or traps, or starvation after prolonged hunger leads to fainting and eventual demise.[1] The sole path to victory is ascension, achieved by retrieving the Amulet of Yendor from the deepest dungeon levels, returning to the surface, and offering it to one's deity, granting immortality and concluding the game successfully.[1] A notable aspect of NetHack's death mechanics is the concept of "Yet Another Stupid Death" (YASD), a community-coined term for humorous or avoidable fatalities stemming from player errors, such as carelessly triggering traps, misidentifying items, or overlooking environmental dangers like a floating eye's gaze.[5] These incidents underscore the game's steep learning curve, where seemingly minor oversights can prove lethal. Following death, the game displays a tombstone screen allowing players to input a custom epitaph, which serves as a humorous or reflective engraving on the character's grave and may appear in bones files for others to encounter.[1] A score is then calculated based on factors like accumulated gold, experience level, dungeon depth reached, and achievements, with the results appended to a high-score listing in the record file; only the best non-winning score per player is retained for ranking.[1] Players can review a game logfile—enabled by default—to analyze events leading to death, fostering improvement through repeated playthroughs, as the permadeath mechanic encourages starting new characters to apply lessons learned.[1] While standard play upholds permadeath rigorously, exceptions exist in non-competitive modes: explore mode permits saving and restoring progress for testing purposes, though games do not qualify for high scores; wizard (debug) mode grants godlike abilities like unlimited wishes, effectively bypassing death's permanence but restricting access to developers and trusted users.[1] Self-imposed conducts, such as pacifism or illiteracy, add optional challenges but breaking them merely ends the conduct without altering the permadeath rule.[1]User Interfaces
NetHack's traditional user interface relies on an ASCII-based display, where the game world is represented using standard text characters on a terminal or console. The dungeon map occupies the central portion of the screen, with symbols denoting terrain, the player, monsters, and items; for example,@ represents the player character, $ indicates gold pieces, and > marks downward stairs. Monsters and objects are shown with uppercase and lowercase letters, respectively, often color-coded in supported terminals to distinguish types, such as red for hostile creatures. This text-only format emphasizes efficiency and portability, allowing play on minimal hardware since the game's inception.[1]
Input in the core interface is primarily keyboard-driven, using single-character commands for actions like movement. Directional movement employs the yuhjklbn keys, corresponding to the eight cardinal and ordinal directions on a grid (e.g., h for left, j for down), or numeric keypad alternatives if enabled via configuration. Extended commands, prefixed with #, access more complex functions through menus or prompts, such as #loot for searching containers. Mouse support, available in certain ports like the Qt and Windows GUI variants, allows clicking on distant map locations to invoke movement or targeting commands beyond adjacent cells.[1]
The interface includes dedicated areas for additional information: a status bar at the bottom displays key metrics like hit points (HP), magical power, armor class (AC), gold, and conditions such as hunger or encumbrance, updating in real-time (e.g., "HP:12(12) Pw:5(5) AC:10 Gld:0"). The top line shows recent messages, such as combat feedback ("The kobold hits!"), with a --More-- prompt for longer sequences; players can review history using ^P to repeat the last message or access a full log. Inventory management occurs through the i command, presenting a lettered list (a-z, A-Z) of carried items in a menu-style prompt, supporting actions like wielding (w) or dropping (d), with options for sorting and bulk operations.[1]
Graphical variants extend the traditional setup by replacing ASCII symbols with tilesets—small bitmap images for entities and terrain—in ports supporting libraries like SDL or X11. These include official Windows and X11 interfaces, as well as unofficial adaptations like glHack, which uses OpenGL for accelerated rendering, and web-based clients such as Tilehack that enable browser play with mouse-driven tiles. Menu styles are configurable (e.g., traditional text lists or full graphical pop-ups via extmenu), and some implementations add sound effects for events like item pickups, though core audio remains limited to user-defined files in select ports.[1][6]
Accessibility options cater to diverse needs, including support for screen readers and Braille displays in text mode, with configuration flags like symset:NHAccess for alternative symbol mappings. Color-blind modes can be enabled by disabling hues, and keybinds are customizable through the .nethackrc file or in-game Options menu, allowing remapping of directions or commands. These features ensure broad usability across console, GUI, and remote sessions.[1]
Since its 1987 origins as a text-only roguelike, NetHack's interface has evolved from pure ASCII in early versions to multimedia-capable builds in release 3.6.7 (2023), incorporating tiles, mouse input, and configurable visuals while preserving the command-line core for compatibility.[1]