doors: opening, closing, breaking

What happens to a door. Opened, closed, locked, kicked, held, broken, blasted.

The terminal shows this in words, not as a letter.
Terminal
doors: opening, closing, breaking in Codex, first person
Codex: first person

Builtneeds review7 changes builtSeen on every levelLast touched November 29, 2026: a backlog row it names changed (N-514). Commit bfd1a5180.

In the terminal

Doors are terrain glyphs: a closed door '+' (brown), an open one '|' or '-' (brown), a doorway '.' or a broken door '.'. Every change shows as a glyph change at the door's square plus a message. The tty does not say whether a closed door is locked until the hero tries it.

"There is <a large box> here; force its lock? [ynq] (q)", "You force your dagger into a crack and pry." (blade) or "You start bashing it with your mace." (blunt), then over turns "You succeed in forcing the lock."; a blade may snap: "Your dagger broke!"; bashing may wreck it: "In fact, you've totally destroyed the large box." with contents breaking ("You see a <potion bottle> shatter!", "A scroll is torn to shreds!", "A <wooden thing> splinters to fragments!"). "You give up your attempt to force the lock."

Quotes from NetHack

You force %s into a crack and pry.
src/lock.c:740
2 more quotes
In fact, you've totally destroyed %s.
src/lock.c:182
%s %s!
src/lock.c:1317, chest_shatter_msg: "is torn to shreds" (paper), "is crushed" (wax), "is pulped" (veggy), "is mashed" (flesh), "shatters" (glass), "splinters to fragments" (wood), "is destroyed"

Decisions

Notable moments animate, from the player's keys and the map alone.

Codex draws it
Full text

Notable moments animate (stairs, kicks, doors, corners, squeezes), derived only from the player's keys and what the map shows.

Backlog decisions: D-13

In Codex

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

On a kick the hero's whole letter lurches toward what was kicked, tips back and returns.

Builtneeds reviewReaction to an event

Details

A kick, from the kick command and the direction given (^D, #kick, or k under number_pad): the hero's letter lurches toward what was kicked and tips back as one piece, its foot toward it (0.3 rad at its fullest, `gesture::KICK_TIP`), resting on its lowest corner, and returns, in half a second. It was once cut in two, its bottom half swinging out; a letter cut by a gesture is not the terminal's letter (V-2's review). In first person, where the letter is not drawn, the eye goes with the lurch: half of it, as a lunge carries the eye, 0.09 squares toward what was kicked at its fullest and back in the same half second (`gesture::KICK_EYE`, N-21); the views behind and above take none of it. A squeeze refused ("You are carrying too much to get through.", hack.c:1163) gets the message alone (the director, N-21). A kick at an altar, a fountain or a throne ("You kick the altar.") is this swing alone: no blow's lunge follows it (X-574).

Id
codex.kick
Exact state
Built, not reviewed
Playtests
journey-game
Code
crates/nh-moments/src/kick.rs, crates/nh-plays/src/hero/gesture.rs, crates/codex-client/src/moments.rs, crates/codex-client/src/pov.rs, crates/codex-client/src/pov/letter.rs
V-1DoneKick:
V-2Built, not reviewedDoor shudders on WHAMM, falls away and sinks when broken.
N-21Built, not reviewedFirst-person mode:

When two animations meet on one thing, a move catches up to the game and a reaction plays on top.

Builtneeds reviewTransition

Details

D-81 (X-81): every animation either changes a thing (a monster's walk, a door swinging, a door falling, the tombstone rising, the mist's fade, a thrown thing's flight, a kill's fall) or reacts on it and comes back to rest (a flinch, a kick's shudder, a rattle, a strain, a tug, the light, the washes). When a new one reaches a monster or a door while a change is still moving it, that change hurries to where the game now has it over catch_up_seconds (0.1), along its own curve, never jumping, and the new one starts at once on top of it: a blow on a monster still sliding lands as it arrives, the flinch riding on the last of its slide; a kick on a door still closing slams it home before the boot lands (0.2 s), then shakes it in its shut place (the director, 2026-11-08: "whatever is the most realistic in terms of interaction is the way to go", X-99). A reaction is an offset from wherever the changes have the thing, so a shudder shakes a door where its swing has it and the cut from high up cuts a shaking door as every other (X-101). Two reactions of one kind add up as far as reaction_stack (2) times one: a second blow during a flinch flinches again and both read; ten do not throw the letter across the room. A monster that flinches and then steps keeps flinching as it walks. Two changes on one thing play one after the other in the game's order, only the last two kept. The game's later word in one look still takes the place of its earlier one (two blows in one look flinch once). Each altar keeps its own light: a second altar's flash in one look no longer puts out the first (Danny, 2026-11-09). Only what the game showed starts any of it; the drawing is what the game says now or on its way there, never moving away from it.

Id
codex.plays_meet
Exact state
Built, not reviewed
Playtests
journey-game, plays-meet
Settings
animations.catch_up_seconds, animations.reaction_stack
Code
crates/nh-plays/src/lib.rs, crates/nh-plays/src/compose.rs, crates/nh-plays/src/flash.rs, crates/nh-plays/src/light.rs, crates/codex-client/src/draw/in_flight.rs, crates/codex-client/src/draw/doors.rs
X-81Built, not reviewedWhen plays meet, built
X-99Built, not reviewedWhen plays meet on a door, today's rules to look at with X-81
X-101Built, not reviewedA shaking door writes all of where it is

Accepted pictures and playtests

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

  • doors: opening, closing, breaking in Codex, first personfirst person
  • doors: opening, closing, breaking in Codex, close third personclose third person
  • doors: opening, closing, breaking in Codex, director's viewdirector's view
  • doors: opening, closing, breaking in Codex, map viewmap view
Gallery scene gallery-doors, doors. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.
  • doors: opening, closing, breaking 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: opening, closing, breaking in Codex, door swing 2door swing 2
Gallery scene gallery-doors, door swing 2. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.

Playtests: journey-game, monster-smash, door-midway-as-now, door-midway-eases-back, plays-meet

Planned and proposed

In progress A door locked or opened by a wand or spell swings, on the line of the zap.

Left to do: Knock, a drawbridge and a monster closing a door, which move no door or have no words in 3.7

Idea Dust gathers into a door, and the hero rematerializes from a cloud.

Asked for in these words: “Danny, 2026-11-14 (D-102, N-514): "Yes, I'd like to work on the animation primitives for these purposes, as well as backlog them."”

In progress A swing that dies, gathering speed and arriving, and an envelope that can be held.

Asked for in these words: “Danny, 2026-11-14 (D-102, N-512, X-339): "I really want us to discern these from first principles so they're useful for the whole backlog's animation needs."”

Left to do: A swing that dies, moved onto when a kind is next changed, and an envelope in seconds that can be held.

In progress A thing's motion as steps on the parts of its pose, with landmarks another play can start at.

Asked for in these words: “Danny, 2026-11-14 (D-102, N-512, X-341): "I really want us to discern these from first principles so they're useful for the whole backlog's animation needs."”

Left to do: A step that names a piece of a thing, such as a door's handle or a kicking hero's lower half.

Details for builders

Id: doors. Lexicon subjects: moment.door, moment.force.

Design notes from NetHack

Sound words in the door messages: 'Whammm!!' or 'Thwack!!' when a kicked door holds, 'KABOOM!!' when a booby trap goes off.

'The door opens.' and the + becomes - or |, drawn perpendicular to its wall; or 'The door resists!'

'The door closes.' and the open door's glyph becomes +; or 'The door resists!'

Several turns with no change on the map, then 'You succeed in unlocking the door.' (or locking it, picking the lock).

A broken door that 'reassembles and locks', a cloud of dust that 'assembles itself into a door', a door that appears in a wall, a door that 'crashes open'.

See moment.door.whamm and moment.door.break.

'Whammm!!' two times in three, else 'Thwack!!' (always when deaf); the + stays.

The door 'crashes open' (broken, drawn like a doorway) or 'shatters to pieces' (no door left).

'KABOOM!! The door was booby-trapped!', Stun on the status line, and the door becomes an empty doorway.

A blade pries, a blunt weapon bashes; broken contents get a verb by material: 'shatters' (glass), 'is torn to shreds' (paper), 'splinters to fragments' (wood).

Backlog rows

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-1DoneKick:
N-21Built, not reviewedFirst-person mode:
X-81Built, not reviewedWhen plays meet, built
X-99Built, not reviewedWhen plays meet on a door, today's rules to look at with X-81
X-101Built, not reviewedA shaking door writes all of where it is
N-514To doDust that assembles
X-339Built, not reviewedThe missing curves
X-341Built, not reviewedA thing's phrase and its landmarks