corridors (hallways)
The passages between rooms. A gray # on the terminal, white where lit.
Builtneeds review7 changes builtSeen all the timeLast touched December 3, 2026: a change of its own was written or changed. Commit e389534dd.
In the terminal
Gray '#'. Corridors are generated unlit; seen or remembered they stay gray '#'. Corridor squares in sight that are permanently lit, or any in sight with lit_corridor on, show as S_litcorr (white) and revert to S_corr when out of sight (with dark_room on).
White '#' in the tty: defsyms gives gray, but reset_glyphmap() recolors S_litcorr CLR_WHITE whenever its symbol equals the dark corridor's (the default), "to provide a visible difference". Shown for corridor squares in sight that are permanently lit (by a scroll, wand or spell of light, or a lit map region) and, with lit_corridor on (default off), for every corridor square in sight. Out of sight it reverts to the dark '#' (with dark_room on), so in default play it is rare.
Drawn as stone (blank) until found, then as an ordinary corridor; on arboreal levels drawn as a tree until found. Rogue-level corridors are secret one time in 50.
Quotes from NetHack
A corridor, or iron bars, or a tree, or the portcullis of a closed drawbridge.
3 more quotes
Show corridor squares seen by night vision or a light source held by your character as lit (default off). Persistent.
provide a visible difference if normal and lit corridor use the same symbol
You find a hidden passage.
Decisions
No terminal letters painted on floors. Lines only on real edges.
Codex draws itFull text
No terminal glyphs on floors. Outlines only on real edges and corners; surfaces procedural and natural.
Backlog decisions: D-12Caves are big and lumpy, not square.
Codex draws itThe 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 itFull 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-22In Codex
Rooms have a worn bedrock floor and corridors rougher, darker rubble, woven into one surface.
Builtneeds review3D form
Based on the real thing: A room's floor is worn bedrock with low swells and shallow joints, darker than the walls and a little cool, and a corridor's is rougher, darker rubble that eases into it with no gap.
Details
The ground (N-52, N-307, N-309): geometry, not texture, a function of world position (periodic), in an 8 by 8 grid a square. Corridors are rubble up to floor_stones high (Voronoi stones about half a square across with lumps on them), a hallway_floor_darker (0.2) darker vertex color. Rooms, doorways and the floor under walls are worn bedrock, room_floor_relief (0.35) of that height: broad low swells (value noise, three cells a period) and flat-topped slabs with shallow joints, in a color a quarter of the way from the walls' warm gray toward the DevTeam's slate floor tile (other.txt 19, (71, 108, 108)): (0.70, 0.71, 0.68). The squares are woven like the pools (N-221): every square's ground has a level (flat: ice, a lowered drawbridge, a cloud, a down flight's opening, a named room's laid floor; bedrock; rubble; nh-scene `level`, from the map alone), and near each lower neighbor (within 0.3 of their shared edge, `mesh::nearness`) it eases into that neighbor's ground, reaching it exactly on the edge, so two squares meet with no gap in any view (the director: "contiguous spaces should be woven together kind of like water was as a fabric"). The floor under a wall beside a corridor is rubble, so a hallway stays rough to its walls; the darker color eases the same way. A named room's flagstones and planks close their sides toward a square that is not laid. Objects rest on the ground; soft lights sit on it. floor_stones 0 gives a flat floor.
- Id
codex.cobbles- Exact state
- Built, not reviewed
- Playtests
journey-game,gallery-dark-corridor,gallery-ground- Settings
dungeon.floor_stones,dungeon.room_floor_relief,dungeon.hallway_floor_darker- Code
crates/nh-scene/src/mesh/ground.rs,crates/nh-scene/src/build/terrain.rs,crates/nh-scene/src/noise.rs,crates/codex-client/src/draw/world.rs
| N-52 | Done | Caves less square |
| N-307 | Done | The floor woven into one surface |
| N-309 | Done | The plain floor as worn bedrock |
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
Rock the game has shown beside a corridor is drawn as cave wall, like a room's walls.
Builtneeds review3D form
Based on the real thing: A corridor is a tunnel through rock, its walls the same rough stone as a room's, closer and lower.
Details
Hallways have walls (N-67, Danny: in a corridor "you can't see any walls"): solid rock the game has shown next to a square you can stand in or see across (3.7 sends S_stone apart from unexplored space, and maps the rock beside a corridor as the hero passes) is drawn as cave wall like a room's walls, in the walls' gray (the terminal draws rock blank); shown rock further from the open map is drawn as nothing, and mist hangs only over space never seen. Rock with a monster or object the map shows in it (a xorn, a monster sensed there) is not raised, so its letter stays in sight, and nothing standing in rock opens the rock around it (N-96). The behind camera treats shown rock as wall. With the player's !dark_room (off by default) the terminal blanks out-of-sight room floor the same way, and it would rise as wall. Off (hallway_walls = false), corridors stand in the mist as before.
- Id
codex.hallway_walls- Exact state
- Built, not reviewed
- Settings
dungeon.hallway_walls- Code
crates/nh-site/src/lib.rs,crates/nh-scene/src/build/terrain.rs
| N-67 | Done | Hallways have walls |
Unexplored space near the known map is dark drifting mist that the hero's light burns away.
In progressCamera or view
Details
Fog of war (D-11): every unexplored square (and solid rock shown as blank stone) within fog_of_war.depth squares of a known open square is a block of dark drifting mist a little taller than the walls, its faces only toward open squares, textured with wispy alpha that drifts slowly; the hero's light burns it off continuously (a shader: gone within fog_of_war.cleared_around_you, thickening over fog_of_war.clearing_edge_softness beyond), instead of each square opening on arrival (D-21). The unknown is dark paper (N-284): behind everything (the clear color), what far things fade into (the haze) and the mist's own color are one warm ink, light.darkness_color (0.045, 0.037, 0.030), at L* about 3 so the HUD keeps its contrast. It is the unknown, so no light reaches it (N-275: the light over the known map and the ambient used to reach it through the standard lighting, and it drew as a slate slab with stepped edges round every room seen from above): its own near-black color, tinted warm by the torch only close to the hero (torch_tints_it, fading out over torch_tint_reach squares and lower down more than up), and it casts and takes no shadow. Walking a dark corridor the unknown ahead deepens into darkness with distance instead of standing as a lit face that jumps a square at every step (N-276). From the high views it keeps from_above of its thickness, so the rooms beside it show. No line runs along its edge (D-75). On the known side the light dies away before the unknown (N-276): every wall and floor is drawn in the stone material (stone.wesl), which reads a texture of the map, one texel a square (stone.rs squares: known, which includes rock shown beside a corridor since its walls are built from it; how the map shows it; and how many squares it is from the unknown, a breadth-first search counting diagonals), blends the distance between squares' centers and, over the last light_dies_over_squares before the edge on an S-curve (0.7: the outer part of the last squares, so every square the map shows keeps its light at its middle and a dark room's floor around the hero stays in sight, N-708), takes the lit stone light_dies_before_the_unknown of the way into the unknown's own color (all the way by default, so the known ground meets the dark with no seam), evenly in stops rather than in linear light, so the lantern-bright floor a square ahead dims as the eye expects instead of staying a bright patch with an edge (N-276, after the orchestrator's first-person look: the corridor ended in a dark doorway a square ahead). Only the map decides where: nothing is lit or implied beyond a square it shows. Each square's distance from the unknown, as the shader reads it, eases toward the map's over fog_of_war.comes_out_of_the_dark_seconds a square (N-708, Danny: "I see a wall in front of me and then it disappears or a floor tile is missing in first person"): ground the map has just shown rises out of the dark and the dusk ahead moves on with the hero, instead of the whole front jumping a square at every step and darkening the wall just shown; a new level sets it at once. A passing symbol the core draws for a moment (a shield's sparkle, a dig beam, a boomerang, sent as terrain) stands over the ground and is never taken for it (N-708): the stairs or doorway under it are there again after it. Walking the stairs, all mist is cleared so the walk stays visible. Unknown space further out is plain darkness. A square where the map shows a monster or an object over ground it has never shown (a monster seen down a dark corridor or sensed by telepathy, a warning, gold detected in the rock) has no mist of its own: its letter stands on black as the terminal draws it, in a well whose sides are the mist around it, so it reads from the high views too; nothing is drawn under it and it opens no mist around it (N-96). It settles onto the floor only once the ground at or beside it has been shown (X-632, D-127: Codex never draws floor the game has not shown), or when it lies among things that what the map shows closes in on every side, one of them beside shown ground (a shop full of wares, seen for the first time). It does not stop the camera unless camera_avoids_fog. Light that isn't the hero's burns it off too, where the map shows lit squares (S-10, D-129): beside every square the map shows as lit floor in sight (a lit room seen through its door from a dark corridor, floor a lamp lights), the mist thins, fully at the lit square and less with each step away, gone fog_of_war.lit_floor_clears_it squares out (0 now: the mist is the unknown's own dark over the unknown, so its thinning cannot be seen until N-2530 gives it a look; 1.5 is the designed reach); it eases in and out over about a third of a second as squares come into and leave sight, so nothing pops. The map never says whose light lit a square, so this is the light field's room term (draw/sources/mist.rs, a reader of nh_plays::sources): Codex's own lights (the torch, a play's light, lava's glow past its own square) clear nothing, and the hero's own ring is left to the hero's light, so a dark room opens no wider round the hero. At 0 the mist is as before.
- Id
codex.mist- Exact state
- In progress
- Playtests
gallery-dark-corridor,journey-game,gallery-sensed- Settings
fog_of_war.show,fog_of_war.depth,fog_of_war.thickness,fog_of_war.drift_speed,fog_of_war.cleared_around_you,fog_of_war.clearing_edge_softness,fog_of_war.torch_tints_it,fog_of_war.torch_tint_reach,fog_of_war.from_above,fog_of_war.light_dies_before_the_unknown,fog_of_war.light_dies_over_squares,fog_of_war.comes_out_of_the_dark_seconds,fog_of_war.lit_floor_clears_it,light.darkness_color,camera.camera_avoids_fog,dungeon.wall_height- Code
crates/nh-scene/src/build/terrain.rs,crates/nh-site/src/lib.rs,crates/codex-client/src/draw/mist.rs,crates/nh-plays/src/picture/view/materials.rs,crates/codex-client/src/draw/materials.rs,assets/shaders/mist.wesl,crates/nh-site/src/sight.rs,crates/codex-client/src/draw/stone.rs,assets/shaders/stone.wesl,crates/codex-client/src/draw/sources/mist.rs,crates/nh-knobs/src/fog_of_war/mist.rs,crates/nh-plays/src/underway/squares.rs
| V-5 | Built, not reviewed | Mist is burned off around the hero (D-21), thick further out. |
Walls and floors show a fine grain of stone close by, so up close they read as rock, not clay.
Builtneeds review3D form
Based on the real thing: Stone seen at arm's length has grain: crystals a couple of centimeters across with a finer speckle on them.
Details
Stone up close (N-308): the stone shader (stone.wesl `grain`) adds two octaves of fine value noise (28 and 71 cells a square, in world space) to every wall and floor within fine_grain_within (3) squares of the eye, fading out over the far half of that: a speckle in the color (a nod to the DevTeam's dark floor tile, a speckle) and a small roughness in the normal from the grain's change across the pixel. It is 0.6 strong and fades out as the stone up close (codex.stone_up_close) rises to 1, so it shows only with dungeon.stone_up_close under 1; its own knob fine_grain was folded into that one (N-707). Beyond reach the broad texture alone, so nothing shimmers from the high views.
- Id
codex.stone_grain- Exact state
- Built, not reviewed
- Playtests
gallery-ground,gallery-dark-corridor- Settings
dungeon.fine_grain_within- Code
assets/shaders/stone.wesl,crates/codex-client/src/draw/stone.rs
| N-308 | Done | Rock that reads as rock up close |
Stone in sight looks painted in watercolor, warm where lit and cool where turned away.
Builtneeds review3D form
Based on the real thing: In a watercolor of stone the light changes the stone's hue as well as its value, warm where it falls and cool where the stone turns away, with the pigment settled in the stone's pits and the paper's tooth showing close up.
Details
Painted stone (N-750, N-771, D-49's ink-and-watercolor storybook), one wash for every stone: each stone's row in nh-scene (stone/*.rs) declares its `Wash`, the two hues it is painted in where the light falls and where it turns from the light, chosen for what the stone means (D-165: the DevTeam's tile is inspiration, never a measure). How pigment settles is a property of the texture a surface is cut as (`Settles::of`: into hollows, in clumps, pooled where a wall meets the floor, landed unevenly). The client gives each stone material its stone's wash and its texture's settling (draw/stone.rs `cut`; things of stone and named rooms' laid floors the Dungeons' hewn rock), and the stone shader (stone.wesl `painted`, after the light) reads them as numbers, naming no stone: how lit a face is (the lit color's luminance against the stone's own, in stops) leans its hue toward the lit or the shade hue at the same OKLab lightness, chroma capped. The Dungeons' worked stone in the storybook's raw sienna and violet-umber, the Mines' raw rock orange going umber, Gehennom's heat from below (brick ember-red where lit and oxblood in shade, and a glow of its own over the whole wall, as full at the foot as at the top, and on the floor there, least on faces turned up; a hot stone holds its fullness however dark it is), Sokoban's cool cut blocks (its own royal blue in the light, a deeper blue in shade) on a floor of packed earth with a wash of its own, warm in the lantern (a stone may declare its floor's wash, `Row::floor_wash`), Fort Ludios a hoard vault in the sea (gold where lit, a cold sea-green in shade) (goldens/washes.txt). Granulation from the close texture and clumps from a smooth noise fixed to the stone, read with the pixel's footprint; a soft darkening where the surface turns; a paper's tooth within two squares. Within a square and a quarter of a letter the paint may darken the ground and never lighten it, so every letter keeps at least its contrast. A picture on the stone (a cave painting's pigment, a sign's paint, a vertex color) is drawn over the wash: taken off, the stone painted, put back, and the wash recedes where pigment covers the stone (pigment known by its colorfulness, never its darkness: a gray shade is stone; and only on a wall or a thing: a floor's vertex color is its own weathering, a scorched or wet bank, and takes the wash); what is not stone (ice, a door's wood, a thing's part cut in earth or wood) takes no wash. The lantern's tinge (a moment's colored light, a trip's gel, exactly zero at rest) is carried in the trip's one buffer that every stone reads (no material rewritten) and given back over the wash. A pit's hollow takes its floor's wash by the same path (assets/shaders/wash.wesl). Remembered ground keeps its pencil gray (D-62). At 0 not one step runs, pixel for pixel; it ships at 1. NetHack gives stone no paint; the backing is D-49 and what each stone means (D-165).
- Id
codex.stone_paint- Exact state
- Built, not reviewed
- Playtests
stone-up-close- Settings
dungeon.stone_paint- Code
assets/shaders/stone.wesl,assets/shaders/wash.wesl,crates/nh-scene/src/stone.rs,assets/shaders/stone_light.wesl,crates/codex-client/src/draw/stone.rs
Floors are old flags in trodden earth, walls rock broken into faces the torch catches.
Builtneeds review3D form
Based on the real thing: Old dungeon stone at arm's length: floor flags half a square across laid in trodden earth, joints chipped and gritty, some flags gone, and wall rock broken into faces a third of a square across, each at its own slant, so a torch lights one face and leaves the next in shade, and in the Mines the floor is the same broken rock as the walls.
Details
The stone you could touch (N-751). The generated textures (nh-scene texture.rs, 512 px a texture, 4 squares a repeat, 128 px a square) had detail at the room's scale and the grain's and none between. Now, at dungeon.stone_relief (1; 0 gives each texture back pixel for pixel, the textures made again on a change, draw/world.rs stone_relief): Flags, the Dungeons' floors, lays flags half a square across near a grid, each worn hollow and tilted its own way, joints chipped wider where a noise runs high and filled with grit, lips eased so none catches the torch as a thread, one in five gone to earth, their tone within a step of the earth's (the floor's . is low contrast). Stone (the walls' rock, a boulder's, an altar's, a tomb's) is broken into faces a third of a square across, planes at their own slants eased to one height at their edges, so they meet at creases, never steps. Rock, the Mines' walls (N-757, after tile 199), is rock dug with picks: broad hollows stretched along the tile's diagonal bands with smaller chips in them, each the lowest of its neighbors' dishes, so they meet at hard ridges and never at a step, the tile's orange and brown in soft bands along its diagonal, a face turned to the upper left painted a little paler as the tile paints its crest; no veins and no drawn lines. Broken, the Mines' floor (N-757), is trodden dirt darker in its hollows with gravel and a few larger angular stones clumped unevenly, a stone a step lighter than the dirt, and at dungeon.stone_relief 0 the plain ground the Mines had before. Ground stays as it was for the wood of doors, tools, a shop's planks and the drawbridge, and the branches' floors. Every normal map keeps its height in alpha (0 lowest, 255 highest) for a later parallax. Hallways still share the rooms' floor texture (N-5620). The page draws Flags in its ground and Broken in its stone.
- Id
codex.stone_relief- Exact state
- Built, not reviewed
- Playtests
gallery-hallway,gallery-branches,gallery-lit-room- Settings
dungeon.stone_relief- Code
crates/nh-scene/src/texture.rs,crates/nh-scene/src/surface.rs,crates/nh-scene/src/stone/dungeons.rs,crates/nh-scene/src/stone/mines.rs,crates/codex-client/src/surface.rs,crates/codex-client/src/draw/world.rs,crates/codex-client/src/draw/standard.rs,crates/codex-page/src/surfaces.rs
| N-751 | Built, not reviewed | Stone you could touch (the director, 2026-12-01, the step-change wave): |
| N-757 | Built, not reviewed | The Mines look like a mine (Danny, 2026-12-02, on stone-relief's second round: |
| N-52 | Done | Caves less square |
Walls and floors close by show fine crystals, small pits and hairline veins.
Builtneeds review3D form
Based on the real thing: Stone at a hand's length has crystals a couple of millimeters across, small pits where grains fell out and hairline veins, matte, so a torch raking across it picks out each grain.
Details
The stone up close: one small texture made in code (nh-scene texture.rs `close`, 512 square: the slope of a height of crystals, sparse pits and veins, and its tone around the mean) laid twice on each wall's and floor's own uv in the stone shader (stone.wesl `close_at`), at 0.6 and 0.23 squares a repeat, turned 31 and -17 degrees so the two never line up, read with the pixel's true footprint (textureSampleGrad), so its mips (averaged plainly, going to flat and even) and 4x anisotropy fade whatever a pixel cannot show. It tilts the surface's facing by the chain rule from the texture's slope (no blocks of four pixels) and moves the stone's color a little either way around its own mean. Faded out by fine_grain_within, so from the high views it changes nothing; a thing hewn smooth (an altar, a headstone) keeps its own face. It ships on at 1 (N-707, Danny, 2026-11-28: "Yes"). Below 1 the older speckle (codex.stone_grain, whose world lattice shows as a regular pattern of dots half a square from a wall) comes back in its place, at 0.6 as its own knob fine_grain had it; that knob is folded into this one (an old codex.toml's fine_grain loads as stone_up_close). At 0 the stone is as it was before this treatment, pixel for pixel. NetHack gives stone no texture; the reference is real worn sandstone and granite seen at arm's length.
- Id
codex.stone_up_close- Exact state
- Built, not reviewed
- Playtests
stone-up-close- Settings
dungeon.stone_up_close,dungeon.fine_grain_within- Code
assets/shaders/stone.wesl,crates/codex-client/src/surface.rs,crates/codex-client/src/draw/stone.rs,crates/nh-plays/src/picture/view/materials.rs,crates/nh-scene/src/texture.rs
Applies to everything on the map (5)
- Floors are packed earth with small pebbles, running on across squares with no letters on them.
- The window port passes what the game chose for each glyph as the tty would show it, and no more.
- 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.
gallery-dark-corridor, dark corridor. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-hallway, step new square 1. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-dark-door, dark door. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-sensed, sensed. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-ground, room. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.Playtests: journey-game, gallery-dark-corridor, gallery-ground, gallery-sensed, stone-up-close, gallery-hallway, gallery-branches, gallery-lit-room
Planned and proposed
In progress Corridors narrow toward the middle of their square under a low, lumpy ceiling.
Asked for in these words: “Danny (N-61, the director): "varying ceiling and wall protuberances and heights"”
Left to do: The ceiling is low and rough over hallways. The rubble along a corridor does not yet narrow toward its middle.
Details for builders
Id: corridor. Lexicon subjects: terrain.corridor, terrain.corridor.lit, terrain.corridor.secret.
Design notes from NetHack
The '#' is also iron bars (cyan), a tree (green) and a raised drawbridge's portcullis (brown). Tile 22 (other.txt): a small ring on dark ground.
White '#' where the dark corridor is gray. Tile 23 (other.txt): a filled dot where the dark corridor's tile has a ring.
Finding it prints "You find a hidden passage."; with secret door detection the corridor glyph also flashes at the spot.
Backlog rows
| N-52 | Done | Caves less square |
| N-307 | Done | The floor woven into one surface |
| N-309 | Done | The plain floor as worn bedrock |
| N-67 | Done | Hallways have walls |
| V-5 | Built, not reviewed | Mist is burned off around the hero (D-21), thick further out. |
| N-308 | Done | Rock that reads as rock up close |
| N-751 | Built, not reviewed | Stone you could touch (the director, 2026-12-01, the step-change wave): |
| N-757 | Built, not reviewed | The Mines look like a mine (Danny, 2026-12-02, on stone-relief's second round: |
| N-61 | Built, not reviewed | Narrower hallways and ceilings |

















