doors

Open and closed doors. A locked door looks like a closed one.

Terminal
doors in Codex, first person
Codex: first person

Builtneeds review9 changes builtSeen on every levelLast touched December 2, 2026: a change of its own was written or changed. Commit 1f6ad3fb8.

In the terminal

Doorless and broken doorways are gray '.'; open doors are brown '-' in a vertical wall and brown '|' in a horizontal one (drawn across the opening, as the door stands); closed and locked doors are brown '+' in either wall. On the Rogue level every door is doorless and all three doorway symbols are '+', colorless.

Brown '-' in a vertical wall and brown '|' in a horizontal wall: the letter is perpendicular to the wall. It cannot be entered or left diagonally.

Brown '+' in either orientation, the same letter as a spellbook. It blocks sight. Locked and unlocked closed doors look the same; a detected door trap shows as an orange '^' (trap.trapped_door) until the door is seen again.

Quotes from NetHack

Doorways connect rooms and corridors. Some doorways have no doors; you can walk right through. Others have doors in them, which may be open, closed, or locked.
doc/Guidebook.mn:2079
6 more quotes
Through me you pass into the city of woe:
dat/data.base:1426, the encyclopedia entry for *door and doorway (Dante, Inferno)
The door opens.
src/lock.c:906
Open doors cannot be entered diagonally; you must approach them straight on, horizontally or vertically.
doc/Guidebook.mn:2093
This door%s.
src/lock.c:875, "This door is locked." (also " is broken", "way has no door", " is already open")
Closed doors can be useful for shutting out monsters.
doc/Guidebook.mn:2124
Some closed doors are booby-trapped and will explode if an attempt is made to open (when unlocked) or unlock (when locked) or kick down.
doc/Guidebook.mn:2114

Decisions

The 3D view exists for three things. How far away things are down a corridor, which way a door faces, and which way you came.

Codex draws it
Full text

What the 3D view is for. It serves three decisions a player makes better there than on the terminal: depth down a corridor (a line of monsters reads as a line), door orientation and what is through it, and facing as memory of where you came from. Camera and world are designed to make those three legible; everything else is atmosphere. New presentation work is judged against this.

Backlog decisions: D-22

In Codex

Seen from high up, walls, doors and mist shrink toward the floor so you can see into rooms.

Builtneeds reviewCamera or view

Details

Seen from high up (the map view, the director's wide shot; N-57), walls, doorway lintels, doors, bars and mist shrink toward the floor together by how high the camera is, to walls_from_above of their height, so rooms can be seen into; a falling door is cut too; the fog thins to haze_from_above and the ambient light rises to faint_light_everywhere_from_above. Flights of stairs keep their full height (the hero stands on their steps; N-64). N-2790: a lumpy cave wall cut lower is not squashed about its foot (which moved its bumps and left a ledge up to a tenth of a square along the edge it shares with a whole neighbor): it is drawn with a shell built to the cut's height from the same field of bumps, in lumpy_walls_cut_in_steps steps of its height (32; 0 squashes it as before), stretched the little rest of the way (`draw/walls.rs` `Lumpy`). Its top's rise is lowered by the same share, so a wall cut low keeps no ridge standing over the letters beyond it (batch 12: a `(` in gallery-hallucination's map view was cut in half).

Id
codex.cutaway
Exact state
Built, not reviewed
Playtests
journey-game, gallery-forms
Settings
views.walls_from_above, light.haze_from_above, light.faint_light_everywhere_from_above, views.lumpy_walls_cut_in_steps
Code
crates/codex-client/src/draw/view/cutaway.rs, crates/codex-client/src/draw/things.rs, crates/nh-plays/src/shot/pose.rs, crates/codex-client/src/pov.rs
N-57DoneA high diagonal overview camera

A broken door topples away from whoever broke it, lies a moment, then sinks away.

Builtneeds reviewTransition

Details

A closed door that the map now shows broken or gone (kicked in, forced, blasted) falls over away from whoever broke it, the kicker's side when the last kick was at it, else away from the hero: a door the hero's own kick broke stands until the boot lands (0.2 s, N-71), as a door that held shudders from there; then it topples about its foot, gathering speed over 0.55 s, lies a moment, then sinks and shrinks away; it is cut low with the walls from high up. The doorway's frame stays. A door a monster in sight smashes down falls as "<Mon> smashes down a door." is said (N-2870, monmove.c:1609): the monster stands in the doorway and the core keeps sending plain floor under it, so nh-state draws the doorway (S_ndoor) under the one monster standing in a remembered-closed door at the words (two such monsters: neither, and that door falls when the map first shows it, as the monster steps out); "You see a door crash open." is drawn by the core itself.

Id
codex.door_fall
Exact state
Built, not reviewed
Playtests
journey-game, monster-smash
Code
crates/nh-moments/src/kick.rs, crates/codex-client/src/draw/world.rs, crates/codex-client/src/draw/things.rs, crates/nh-plays/src/fall.rs, crates/codex-client/src/draw/doors.rs, crates/codex-client/src/draw/view/cutaway.rs, crates/nh-state/src/level.rs
V-2Built, not reviewedDoor shudders on WHAMM, falls away and sinks when broken.

An open door struck by a wand or spell of locking swings shut on its hinge instead of jumping.

Builtneeds reviewTransition

Details

N-205 (D-129: "Yes, where the words say it moves"). When the game says "The door swings shut, and locks!" (lock.c:1176, printed only while the hero sees the door, lock.c:1258), the door it means is the one open door along the direction the player answered at "In what direction?" that the map shows shut, in the look of the words, the look before (lock.c draws the door before it prints) or the next, never past the next command; the zap stops at the door it shut (zap.c:4076). That door swings shut as a door shut by a hand does (codex.door_swing, Moment::DoorSwung with no one beside it), turning back from the side it stood open on: nobody stands at it, so it closes the way it opened. Two doors shut along the line, none, a line that ends at a wall first, a confused or stunned hero (getdir's confdir may turn the zap, cmd.c:4117) or a zap at the hero's own square: nothing swings and the door jumps, as on the terminal. "The door locks!" (lock.c:1173) and "The door unlocks!" (lock.c:1196) move nothing and play nothing. A drawbridge ("You see a drawbridge coming up!", dbridge.c:788) is not a door, and a door a monster closes has no words in 3.7: neither swings. door_swing_seconds sets its time; 0 makes it jump.

Id
codex.door_locked_shut
Exact state
Built, not reviewed
Settings
animations.door_swing_seconds
Code
crates/nh-moments/src/catalog/happened/locking.rs, crates/nh-moments/src/locking.rs, crates/nh-plays/src/swing.rs
N-205Built, not reviewedDoors the game moves by magic don't swing
N-90DoneDoors swing open and shut, and a locked door rattles

A locked door jolts twice, rocking on its hinge, its handle twisting. A stuck door strains once.

Builtneeds reviewReaction to an event

Details

N-90, idea 22. "This door is locked.": the closed slab jolts twice in its frame in half a second, each jolt eased in and out: toward the hero by locked_door_rattle (2.5 cm; the director, 2026-10-31: "0.025"), up by half that as it knocks against its bolt, and rocked on its hinge so the latch edge comes toward the hero by twice that, so it reads from behind the hero and from above as well as from the side; toward its latch only as far as the gap in the doorway allows (1 cm); the handle twists back and forth as it is tried. Force, not light (D-51). It hurries while keys are queued. "The door resists!": a stuck closed door strains once toward the hero and back over 0.4 s; an open door that resists closing turns a few degrees toward shut and back (its edge moving four times the rattle). The door is the one in the direction of the last move key or of the answer to "In what direction?", or else the one door beside the hero: the game gives no position with the message. Confused or stunned (the status line shows it), only the one door beside the hero, since the game may turn the direction (cmd.c's confdir); never for the hero's own square (`.`). The handle is on one face only, so from the other side the slab and its rock carry it. Not on "This door is broken.", "This door is already open.", "This doorway has no door." (the same format), "This door is already closed.", "That door is closed." or a bump. 0: still.

Id
codex.door_rattle
Exact state
Built, not reviewed
Playtests
journey-game
Settings
animations.locked_door_rattle
Code
crates/nh-moments/src/catalog.rs, crates/nh-moments/src/doors.rs, crates/nh-plays/src/shudder.rs, crates/nh-plays/src/swing.rs, crates/nh-plays/src/compose.rs, crates/codex-client/src/draw/in_flight.rs, crates/codex-client/src/draw/doors.rs
N-90DoneDoors swing open and shut, and a locked door rattles

A kick at a closed door makes its slab shudder and settle.

Builtneeds reviewReaction to an event

Details

A kicked door that holds shakes its slab: a fifth of a second for the kick to land, then a quick decaying shudder along the door's face, settled by 0.6 s. It plays when the game says the door held, "Whammm!!" or "Thwack!!" (dokick.c:966), at the square kicked (N-71); a door the kick breaks falls instead (codex.door_fall), and a kick at anything else shakes no door.

Id
codex.door_shudder
Exact state
Built, not reviewed
Playtests
journey-game
Code
crates/nh-moments/src/catalog/happened/kicked.rs, crates/nh-plays/src/starts.rs, crates/nh-plays/src/lib.rs, crates/nh-plays/src/shudder.rs, crates/nh-plays/src/compose.rs, crates/codex-client/src/draw/in_flight.rs, crates/codex-client/src/draw/doors.rs
V-2Built, not reviewedDoor shudders on WHAMM, falls away and sinks when broken.
N-71Built, not reviewedA kicked door's WHAMM is never detected

A door the game says was opened or shut turns on its hinge, away from whoever opened it.

Builtneeds reviewTransition

Details

N-90, idea 22 (the director, 2026-10-31: "The door should swing away from the hero.", which D-139 reads as the doors the hero opens: "any other door interactions should open up naturally, including into the room/toward the hero as needed"). When the map shows a closed door open, or an open door closed, and the game's words point to that door (the hero's come before lock.c redraws it and wait a look for it; a monster's come after monmove.c redraws it, so the last look's changes count), the slab turns a quarter turn on its jamb: open, it turns away from whoever opened it, onto the far side of the wall's line, and stays open on that side (remembered per level, nh-scene's `Memory`; a door never seen opening stands open on the side the square's parity gives); shut, it turns back from that side. It eases out over door_swing_seconds, faster while keys are queued (a step straight through is not held up), meets its stop still moving a little, gives back a few degrees and settles, so the wood has weight (D-18); the handle turns with it. It never turns past open or shut and narrows from the doorway's width to the open door's as it turns, so no corner reaches into the wall beside it (a unit test checks every turn on both sides). Which door: the hero's "The door opens." or "The door closes." is the door beside the hero that changed, the one the keys pointed at when that one did (confused or stunned, the game may turn the direction, so the keys name none: one door beside that changed swings, two swing neither, X-41); "You see a door open." is the only door the map shows opening, turning to its parity side (the opener is unseen); "The gnome opens a door." swings as it is said (N-204): the monster stands in the doorway and the core keeps sending plain floor under it, so nh-state draws the door open under the one monster standing in a remembered-closed door when the words come (two such monsters: neither, and that door swings when the map first shows it open, as the monster steps out); it swings away from the square the monster glided from, or, coming out of sight from beyond the door, to its parity side for now: D-139 turns it into the room, toward the hero, as its opener pushed it (N-2871, to build). Words that could mean two doors swing neither. A door that changed with no such words, earlier than its words, or after the next command, changed out of sight and jumps, as on the terminal; so does a door broken open (codex.door_fall). 0 seconds: every door jumps. A door the game opens or closes again before its swing has finished jumps to fully open or shut and turns from there; with door_turns_back_midway on it turns back from where it had got to (X-112, D-128 question 66: on since its film, tests/films/door-midway-as-now.json and door-midway-eases-back.json).

Id
codex.door_swing
Exact state
Built, not reviewed
Playtests
journey-game, door-midway-as-now, door-midway-eases-back
Settings
animations.door_swing_seconds, animations.door_turns_back_midway
Code
crates/nh-moments/src/catalog.rs, crates/nh-moments/src/doors.rs, crates/nh-scene/src/doors.rs, crates/nh-plays/src/swing.rs, crates/codex-client/src/draw/in_flight.rs, crates/codex-client/src/draw/doors.rs, crates/nh-moments/src/remember.rs, crates/nh-state/src/remembered.rs, crates/nh-state/src/level.rs, crates/nh-scene/src/memory.rs
N-90DoneDoors swing open and shut, and a locked door rattles

A basin, a door or a boulder darkens where it meets the floor, with the floor at its foot.

Builtneeds reviewCamera or view

Details

N-319, the rest of the director's 'contact shadow everywhere' (N-317, 2026-11-03). A fountain's basin, a door's leaf and its handle, a boulder and a tool's form are the world's surfaces on the standard material, and Bevy's contact shadow closes in only their faint light, so their own sides stood bright beside the floor that darkened at their foot. They are drawn in the grounded material (draw/grounded.rs, assets/shaders/grounded.wesl): the same standard material, its lamplight closed in by the contact shadow as the walls' and floors' stone has it (stone.wesl): the stone's share, contact_shadow_in_lamplight, times contact_shadow_on_forms (1), above the stone's contact_shadow_threshold, so their open faces keep their light and only the joins darken. A form's side meets the floor at a shallower occlusion than the stone's corners (0.5 to 0.7 at a basin's foot, measured on the GTX 1660), so on a form the shadow is full where the occlusion reaches contact_shadow_on_forms_depth (0.6) of where it begins, on an S-curve that starts flat: at the stone's own curve the foot moved by two or three levels in eight bits and could not be seen. Only at the foot of a tall form (N-694, the director, 2026-11-28: "Only the bottom of tall things"): the shadow fades out going up the form's side, full to half of contact_shadow_on_forms_reaches_up (0.35 squares over the floor, about a sixth of a door) and none past it, and the faint light Bevy closes in by itself is lifted on the same curve, so an open door's leaf, one of the things the eye should find first, is lit above its foot as with no contact shadow at all (gallery-shop's first person, measured against the shadow off: all the brightness it had lost comes back from chest height up, half of it just over the foot); a basin or a boulder is short enough to be all foot and is grounded as before. Their own glow is never closed in. An altar and a thing with lore are already the stone's (N-2310) and take it there; with light.room_light_on_things 0 they are drawn on the standard material and take it here. A statue stays a letter of stone on the standard material (its letter is played on by a throw and a melt). With the contact shadow off (low quality) or the knob at 0 every form keeps the standard material, as before. Nothing new is inferred: it reads only the depth and normals of what is drawn.

Id
codex.grounded_forms
Exact state
Built, not reviewed
Playtests
gallery-furniture-shadow
Settings
light.contact_shadow_on_forms, light.contact_shadow_on_forms_depth, light.contact_shadow_on_forms_reaches_up
Code
crates/codex-client/src/draw/grounded.rs, assets/shaders/grounded.wesl, crates/codex-client/src/draw/things.rs

Once a shopkeeper greets you at the door, a painted sign of the trade hangs over it.

Builtneeds review3D form

Based on the real thing: A shop's sign is a small painted board about half a square wide, hung flat against the stone over the shop's door in front of the doorway's head on the side the hero came from, a warm wooden frame around pale cream paint with the trade on it in ink and a wash of color, the general store's a full sack tied at the neck in burnt orange after the DevTeam's sack.

Details

N-733's study (docs/studies/loving-additions.md), answered yes by Danny on 2026-11-28 (N-5476), and its place by Danny on 2026-11-29: "Over the doorway": the sign hangs on the stone over the shop door, as an inn sign hangs (the wall beside a door faces rock). Only after the greeting by the shop's name, never before it and never of what is in stock: "Hello, Danny! Welcome[ again] to Asidonhopo's general store!" (src/shk.c:844) or a deaf hero's "You enter Asidonhopo's general store!" (shk.c:848), filed by nh-moments at the hero's square with the square stepped from (Moment::RoomNamed, nh-state NamedRoom). nh-site's signs.rs works out the door: the greeting's square is a door the map shows open or closed (a shop's own door is never doorless, stock_room, src/shknam.c:737-740; a hole dug into a shop is, src/dig.c:499, and carries none), and the square stepped from lies across the door's wall line, the side the sign faces. A hero greeted inside after a teleport (shk.c:854), a greeting heard while hallucinating (no words filed, shknam.c:873), a deserted or untended shop (shk.c:745), "Invisible customers are not welcome!" (shk.c:803), an angry, surcharging or robbed keeper (shk.c:816-839) and a vault's guard hang none. The emblem says what the shop's name says it sells (shknam.c:210-333): the general store sells anything (RANDOM_CLASS), and its emblem is a sack after the DevTeam's tile (win/share/objects.txt, tile 219: K burnt orange, J brown shading on the right, O pale cord at the neck). The other eleven emblems wait on N-5570; a shop without one hangs no board. Most shop doors open onto a corridor, whose tunnel ceiling comes down to about 1.95 squares at the door's face, so the board hangs in front of the doorway's head from 1.94 down to 1.6, well above the @; it is in the walls' own stone and material so the room's light reaches it as it reaches the wall, its paint a vertex color on that stone, the cream ground and the sack up to half again paler than the bare stone and the frame no darker than the sack, giving no light of its own (no gold: D-75), so it stays below the door and the hero in brightness (D-76). It is placed and scaled as its lintel is and has no face lying flat, so where close third and the high views put the lintel away (D-22) the board goes with it whole and leaves nothing (N-5572). A blind hero is greeted too (shk.c:842 checks only Deaf) and the sign hangs: the words were said, and the sign pictures the words. A shop door kicked in shows doorless and loses its sign (N-5571). Codex keeps nothing in the save file: after a restore the sign hangs again at the next greeting. shop_signs_strength 0 hangs none, as the terminal.

Id
codex.shop_signs
Exact state
Built, not reviewed
Playtests
gallery-shop-sign, shop-sign-corridors
Settings
dungeon.shop_signs_strength
Code
crates/nh-site/src/signs.rs, crates/nh-scene/src/sign.rs, crates/nh-scene/src/mesh/sign.rs, crates/nh-scene/src/notes.rs, crates/nh-knobs/src/dungeon/shop_signs.rs

Stepping diagonally into a wall or door, the hero slides sideways to the open side instead.

BuiltCamera or view

Details

Sliding along walls (D-20): up pressed while facing diagonally into something the map shows you cannot enter diagonally (a wall, a door, or out of an open door) sends the sideways step toward whichever side is open instead, and keeps the diagonal facing. It reads the terminal's own rule that doors are not entered or left diagonally from the map, and only changes which key the arrow sends.

Id
codex.slide_along_walls
Exact state
Built
Playtests
journey-game
Settings
controls.slide_along_walls
Code
crates/nh-site/src/lib.rs, crates/codex-client/src/input.rs
V-12DoneSlide along walls.
Applies to everything on the map (4)
  • A door is a leaf of dark old wood, carved or bound with iron, swung on one hinge when open.
  • Every symbol is a plain keyboard character, even when the player's symbol set draws lines.
  • What the game showed on a square stays drawn under a monster or object that now stands there.
  • The map is drawn as a 3D world of walls and floors, lit by the hero's torch and a faint glow.

Accepted pictures and playtests

A change to how this looks is compared with these pictures before it is accepted.

  • doors in Codex, first personfirst person
  • doors in Codex, close third personclose third person
  • doors in Codex, director's viewdirector's view
  • doors in Codex, map viewmap view
Gallery scene gallery-dark-door, dark door. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.
  • doors in Codex, first personfirst person
  • doors in Codex, close third personclose third person
  • doors in Codex, director's viewdirector's view
  • doors in Codex, map viewmap view
Gallery scene gallery-doors, doors. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.
  • doors in Codex, door swing 1door swing 1
Gallery scene gallery-doors, door swing 1. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.
  • doors in Codex, door swing 2door swing 2
Gallery scene gallery-doors, door swing 2. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.
  • doors in Codex, first personfirst person
  • doors in Codex, close third personclose third person
  • doors in Codex, director's viewdirector's view
  • doors in Codex, map viewmap view
Gallery scene gallery-furniture-shadow, door. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.
  • doors in Codex, first personfirst person
  • doors in Codex, close third personclose third person
  • doors in Codex, director's viewdirector's view
  • doors in Codex, map viewmap view
Gallery scene gallery-ground, broken door. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.

Playtests: journey-game, gallery-forms, monster-smash, door-midway-as-now, door-midway-eases-back, gallery-furniture-shadow, gallery-shop-sign, shop-sign-corridors

Planned and proposed

In progress Doors of stone, or dark with old carvings.

Asked for in these words: “Dad, 2026-11-10 (N-480): "I'd like to see the doors look more like stone. Or very dark with ancient looking carvings."”

Left to do: A stone door that cracks and settles as it falls when a door is broken, behind a knob that is off.

Details for builders

Id: door. Lexicon subjects: terrain.door, terrain.door.open, terrain.door.closed.

Design notes from NetHack

Messages for opening, closing, locking, failed kicks ("Whammm!!", "Thwack!!"), crashing open, exploding and razing. Tiles 13-16 (other.txt): brown planks edge-on (open), banded brown planks (closed).

A gap in the wall line. Tile 12 (other.txt): a dark frame around open floor.

Breaking messages: "As you kick the door, it crashes open!", "The door crashes open!" (force bolt), "KABOOM!!" (door trap), "The door is razed!" (digging beam).

The brown '-' or '|' crosses the doorway at right angles to the wall; no diagonal moves through it. Tile 13 (other.txt): brown planks edge-on.

Messages for resisting, opening, closing, locking, crashing open, exploding and being razed. Brown, NetHack's color for wood (HI_WOOD). Tile 15 (other.txt): banded planks.

Found by secret door detection, the door flashes six times at its square (flash_glyph_at). The message is "You find a hidden door."

Backlog rows

N-57DoneA high diagonal overview camera
V-2Built, not reviewedDoor shudders on WHAMM, falls away and sinks when broken.
N-205Built, not reviewedDoors the game moves by magic don't swing
N-90DoneDoors swing open and shut, and a locked door rattles
N-71Built, not reviewedA kicked door's WHAMM is never detected
V-12DoneSlide along walls.
N-480Built, not reviewedDoors of stone, or dark with old carvings