the drawbridge

The Castle's drawbridge. Raised, it is a brown wall. Lowered, a brown floor.

Terminal
No picture of this is on the site yet.
Codex

Builtneeds review5 changes builtSeen rarelyLast touched November 28, 2026: a change of its own was written or changed. Commit 3e931bc63.

In the terminal

Brown: raised, the portcullis square shows '#' and the span square shows what lies under it (moat '}', lava, ice or floor); lowered, the span shows '.' and the portcullis square becomes a doorway '.' ("open drawbridge portcullis").

Quotes from NetHack

That drawbridge is up!
src/hack.c:1051

Decisions

Ideas are to be planned for the drawbridge, air, the plane's water and squares felt while blind.

Not decided
Full text

On the page of the backlog's questions, 2026-11-17, asked whether to keep them as the terminal shows them for now (walls, doors and bars, floors and ground, water and lava, stone, unexplored and remembered squares): "Plan ideas for them".

Backlog decisions: D-131

In Codex

A drawbridge is a deck of heavy planks over the moat, or standing in its gate.

Builtneeds review3D form

Based on the real thing: A drawbridge is a deck of heavy brown planks a square long and nearly as wide, a tenth of a square thick, laid across the way on two beams and nailed with iron, lying over the moat when lowered and standing in its gate when raised, matte dry wood with no light of its own.

Details

A square the game draws as a drawbridge is drawn as the thing it is (N-666, D-18, D-67). Lowered (S_vodbridge, S_hodbridge, a brown ., include/defsym.h:140-143), the span over the moat is a deck of seven heavy planks laid across the way of travel, 0.08 of a square thick, 0.94 of a square wide, one square long from its gate to the far bank, with thin dark gaps between the planks, a little lighter and darker in turn, each plank's ends set a little in or out (three looks, chosen by the square), on two beams running its length, and an iron nail head over each beam in every plank. Where the squares on both sides of the span show the same water or lava, the moat runs on under it as one pool with theirs, as the DevTeam's tiles show water at the deck's edges; where they do not agree, nothing is guessed (what lies under a lowered deck is not in its glyph). Raised (S_vcdbridge, S_hcdbridge, a brown #, defsym.h:144-147), the # is the gate in the wall line (DBWALL, rm.h:117), and the same deck stands on end in it, turned up a quarter turn about the hinge at the gate's edge, its beams and their nails toward the moat, closing the gate's lower part: the gate of a drawbridge, raised or lowered, is drawn as any doorway is, so from the high views a lowered bridge's gate reads open as the map shows it, and nothing of the gate's stone differs between the two states. Which way the deck runs is read from the squares beside it (memory.rs deck_way). Its wood is the game's brown moved half way to weathered wood, as a door's, rough and dry (0.94): the torch makes no sheen on it, and it has no light of its own. The DevTeam's tiles (win/share/other.txt, # tile 47 (horizontal open drawbridge) and # tile 48 (vertical closed drawbridge)) are nodded to by the planks side by side with dark gaps, the two rows of iron nail heads and the water at the deck's edges. What stands on a lowered deck stands on its planks, its letter above them in its own color. Its . and # are not drawn while the deck stands for them; the minimap and the terminal view still show them. The camera, the minimap and the regions still count the raised gate as wall. Off (drawbridge_strength 0, or drawbridge_thickness 0): a raised drawbridge is a solid wall shell of brown-tinted stone and a lowered one a smooth flat floor with its brown dot, as before.

Id
codex.drawbridge
Exact state
Built, not reviewed
Playtests
gallery-drawbridge
Settings
dungeon.drawbridge_strength, dungeon.drawbridge_thickness
Code
crates/nh-scene/src/things/drawbridge.rs, crates/nh-knobs/src/dungeon/drawbridge.rs, crates/nh-scene/src/build/terrain.rs
N-666Built, not reviewedThe drawbridge is a plank deck

A drawbridge destroyed over its moat falls into the water and sinks.

Builtneeds reviewTransition

Details

N-5190. When the hero sees a drawbridge destroyed over its moat or lava (destroy_drawbridge: a force bolt or a wand of striking at its gate or lowered span), the game says "The portcullis of the drawbridge falls into the moat!" (dbridge.c:913, the raised one) or "The drawbridge collapses into the moat!" (dbridge.c:919, the lowered one), with no square, and redraws the gate as a doorway and the span as the moat. The drawbridge watch pairs the words with that change, in the look of the words or the next: the raised one's gate, shown raised, now a doorway beside the moat it stood over; the lowered one's span, shown lowered, now the moat beside its open gate. No deck is drawn after the look, so a copy of the deck as the square drew it, in its own material, falls where it stood: the raised deck topples outward about its hinge onto the water, faster and faster, as the swing down would carry it, then tips at its free end and goes under; the lowered one tips at its free end, then goes under; shrinking away once well under the water's face, gone in drawbridge_fall_seconds (1.2). The gate's stone over a raised deck draws up into the lintel as for a swing. No flash and no shake. Look-alikes play nothing: "The drawbridge disintegrates!" (dbridge.c:934, nothing under it to fall into), the words heard only ("You hear a loud *SPLASH*!"), the fall's words with a bridge only opened or raised, and a bridge whose gate a scattered chain covers (the terminal shows the chain there, not the doorway; the map does not say the gate opened). Off (drawbridge_fall_strength 0): the deck is gone in one frame, as on the terminal.

Id
codex.drawbridge_fall
Exact state
Built, not reviewed
Playtests
drawbridge-fall, drawbridge-fall-far
Settings
animations.drawbridge_fall_strength, animations.drawbridge_fall_seconds
Code
crates/nh-moments/src/catalog/happened/drawbridge.rs, crates/nh-moments/src/drawbridge.rs, crates/nh-plays/src/drawbridge.rs, crates/nh-plays/src/underway/squares.rs, crates/nh-plays/src/underway/plays.rs, crates/codex-client/src/draw/plays.rs, crates/codex-client/src/draw/settling.rs, crates/nh-knobs/src/animations/drawbridge_fall.rs
N-5190Built, not reviewedThe drawbridge falls into the moat (from N-668, not built with it):
N-668Built, not reviewedThe drawbridge swings and falls

A drawbridge the hero sees raised or lowered swings on its hinge to its new place.

Builtneeds reviewTransition

Details

N-668. When the game says "You see a drawbridge coming up!" or "... going up!" (close_drawbridge, dbridge.c:788) or "You see a drawbridge going down!" or "... coming down!" (open_drawbridge, dbridge.c:853), printed only while the hero sees the span or its gate and before the two squares are redrawn, the bridge it means is the one whose squares the map shows change that way in the look of the words, the look before or the next, never past the next command: lowered, its gate shown raised and now a doorway, or its span shown as water, lava, ice or floor and now the lowered deck; raised, the reverse. Either square is enough, since one may be under a letter or come into sight only as the gate opens. The deck drawn where it now rests (codex.drawbridge) turns on its hinge, the edge its span shares with its gate, a quarter turn from the other pose into its rest, over drawbridge_swing_seconds (1 second), slow to start as a heavy thing is and settling at the end with no bounce; a key pressed meanwhile hurries it to rest (D-81), so it is finished before the next move is drawn. It has no light of its own, no flash and no shake: the game reports no impact. Look-alikes play nothing: a bridge first seen, a remembered one seen again changed, magic mapping, the words heard only ("You hear chains rattling and gears turning.", dbridge.c:795, :857), a bridge broken ("The portcullis of the drawbridge falls into the moat!", "The drawbridge collapses into the moat!", "The drawbridge disintegrates!", dbridge.c:913-934: the fall is its own row), the moat freezing under a raised bridge, the words the other way, and two bridges changed for one line (the Bell of Opening: which the words meant is not said). Off (drawbridge_swing_strength 0, or drawbridge_swing_seconds 0): the deck changes in one frame, as on the terminal.

Id
codex.drawbridge_swing
Exact state
Built, not reviewed
Settings
animations.drawbridge_swing_strength, animations.drawbridge_swing_seconds
Code
crates/nh-moments/src/catalog/happened/drawbridge.rs, crates/nh-moments/src/drawbridge.rs, crates/nh-plays/src/drawbridge.rs, crates/nh-knobs/src/animations/drawbridge_swing.rs
N-668Built, not reviewedThe drawbridge swings and falls

The terminal's own floor characters are painted flat on the floor in their colors.

BuiltLetter

Details

Off by default (D-12): the terminal's own floor character ('.', '#', '}', the engraving's backtick) painted flat on the floor in its color, self-lit at terminal_dots_brightness, dimmer for a dark part of a room. The only way the 3D world shows an engraving's glyph or tells lit from dark floor.

Id
codex.floor_glyphs
Exact state
Built
Settings
dungeon.terminal_dots_on_floor, dungeon.terminal_dots_brightness
Code
crates/nh-scene/src/build.rs, crates/codex-client/src/draw/world.rs

Walls bulge and recede and their tops rise and fall, so rooms and corridors look like caves.

Builtneeds review3D form

Based on the real thing: Cave rock bulges and recedes by hand-widths and its tops rise and fall, nothing flat or square.

Details

Lumpy caves (N-52): every solid shell is subdivided and pushed by a world-space value-noise field (two octaves, periodic every 8 squares) so faces bulge and recede by up to wall_bumps and tops rise and fall by up to wall_top_bumps, faceted like rock; neighbors move together and stay joined, the foot stays on the floor, and a floor is laid under each wall so receding rock leaves ground, not a gap. Faithful to the grid: lumps decorate a square, never move it. 0 and 0 bring back the flat blocks.

Id
codex.lumpy_caves
Exact state
Built, not reviewed
Playtests
journey-game, gallery-dark-corridor
Settings
dungeon.wall_bumps, dungeon.wall_top_bumps
Code
crates/nh-scene/src/mesh/shell.rs, crates/nh-scene/src/noise.rs
N-52DoneCaves less square
Applies to everything on the map (4)
  • Ice, clouds and a lowered drawbridge are smooth flat floor without the usual stones.
  • 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

Playtests: gallery-drawbridge, drawbridge-fall, drawbridge-fall-far, journey-game, gallery-dark-corridor

Details for builders

Id: drawbridge. Lexicon subjects: terrain.drawbridge.

Design notes from NetHack

Heard when unseen: chains rattling, gears turning. It crushes what is under it. Tiles 46-49 (other.txt): planks over blue water (down), a wooden grid (up).

Seen: "You see a drawbridge coming up!" or "going up!", depending on the hero's side. Unseen: "You hear chains rattling and gears turning."

Tile 46 (other.txt): brown planks over blue water. Destroyed, it collapses into the moat (unseen: "a loud *SPLASH*!") or disintegrates, scattering up to five iron chains.

Backlog rows

N-666Built, not reviewedThe drawbridge is a plank deck
N-5190Built, not reviewedThe drawbridge falls into the moat (from N-668, not built with it):
N-668Built, not reviewedThe drawbridge swings and falls
N-52DoneCaves less square