altars

A gray _. The three aligned altars look alike. Moloch's is red and the high altars are bright magenta.

Terminal
altars in Codex, first person
Codex: first person

Builtneeds review2 changes builtSeen on some levelsLast touched December 2, 2026: a change of its own was written or changed. Commit 4c77e6c98.

In the terminal

'_'. The tty colors only two of the five glyphs apart: aligned altars (lawful, neutral, chaotic) are all gray, unaligned altars are red, and high altars (AM_SANCTUM) bright magenta. USE_GENERAL_ALTAR_COLORS, a compile-time option off by default, would make lawful white, neutral gray and chaotic black. A mimic posing as an altar shows the neutral glyph (cmap_to_glyph).

Quotes from NetHack

The stone top will have grooves for blood, and the whole will be covered with _dry brown stains of a troubling kind_ from former Sacrifices.
dat/data.base:100, The Tough Guide to Fantasyland (the entry for *altar)
2 more quotes
Since the colors have specific associations (with the unicorns matched with each alignment), we shouldn't use scrambled colors and we don't have sufficient information to handle platform-specific color variations.
include/display.h:298, why USE_GENERAL_ALTAR_COLORS is off: aligned altars are all gray by default
Sprintf(altbuf, "%saltar to %s (%s)",
src/invent.c:4076, "There is an altar to Anhur (chaotic) here."; "high altar" in the Sanctum

In Codex

An altar is a stone slab on a round stone, in its alignment's stone, softly lit from above.

Builtneeds review3D form

Based on the real thing: An altar is a waist-high slab of stone 0.7 long on a narrower block, its top worn smooth, standing on a round foundation stone nearly a square across, in its alignment's stone with the red marks the DevTeam's tiles draw on its top, softly lit from above.

Details

An altar is drawn as the thing it is (N-227, D-18, D-60): a slab of stone waist-high to the @ (0.35 of a square), 0.72 long east-west and 0.46 deep, its top edges worn round, resting on a narrower block, hewn from the walls' procedural stone with a smoother top (worn by use). Its stone is its alignment's, as the DevTeam's altar tiles draw them (win/share/other.txt, tiles 33-37) and as the glyph the core chose names it (protocol 4, Glyph.altar): near black for Moloch's, as the tile's black, with only a trace of the tty's red and matte so the torch does not lift it to brown (N-239, N-258), dark gray for a chaotic one, blue-gray for a neutral one, pale for a lawful one (never white, which would blow out), and the tty's bright magenta for a high altar. The underscore itself is not drawn: the form stands for the glyph, as the boulder's stone does; the minimap and the terminal view still show it. Whatever the map shows on the altar (the hero, a monster, an object) stands on its top, and in first person the eye rises with it, as on a flight of stairs (D-63). It stands on a round foundation stone (N-486, Dad: "Or have a circular foundation stone. And maybe some runes..."): a low plain drum 0.92 across and 0.05 high, its rim worn as the slab's, in the same stone, the slab lifted onto it so its top stays at 0.35. On the slab's top lie the red marks the DevTeam's tiles draw there (N-258, tiles 33 to 36, rows 9 and 10, the top's far and near edges), cell for cell from each alignment's own tile, in the tty's red dried a third of the way to a dark brown-red; the high altar has none, as tile 37 has none. The port's field gives the altar's alignment to its shape as its state. A soft light hangs 0.4 over its top at rest (0.4 of a beam's light, a pale warm white, under the hero's torch), so its top and the floor about a square round it take a light from above, its reach ending under the ceiling so nothing over it is lit; on the Astral Plane each high altar takes instead the player's one gold as a light (lifted a third toward white, so it reads gold beside the torch's amber) from straight above (N-653, D-138), hung 2.4 high since the Astral Plane has no ceiling, so it lies as one pool on the altar's square and about a square round it, seen from above, the three alike, keyed on the high altar's glyph and the status line saying Astral Plane together, so Moloch's high altar in the Sanctum and a mimic posing as an altar get the soft light, never the gold. Both lights follow light.spells_light_the_walls. Neither the altar nor the floor under it has a copy in the remembered level through the rock, which showed the round stone through the slab and laid a pale wash over its top from above. The game's own altar moments (dropping on it, sacrificing) are N-97 and N-115 and need the game's words. A mimic posing as an altar arrives neutral from the core and is drawn neutral, as the tiles draw it. Off (altars_as_slabs = false, or altar_height 0), the letter as before. With the room's light on things on (light.room_light_on_things, N-2310) it is drawn in the walls' stone material, lit by a lit room as the walls are, read from the squares beside it and blended between them; its faces stay smooth stone, without the walls' fine grain (N-680).

Id
codex.altar_slab
Exact state
Built, not reviewed
Playtests
altars-dais, altars-astral, altars-sanctum
Settings
dungeon.wear, dungeon.altars_as_slabs, dungeon.altar_height, light.room_light_on_things, light.spells_light_the_walls
Code
crates/nh-scene/src/things.rs, crates/nh-scene/src/build.rs, crates/nh-scene/src/tint.rs, crates/codex-client/src/draw/things.rs, crates/codex-client/src/palette.rs, crates/nh-plays/src/picture/squares.rs, crates/nh-scene/src/build/terrain.rs, crates/nh-scene/src/mesh/things.rs, crates/codex-client/src/draw/world.rs, crates/nh-scene/src/ground.rs, crates/nh-plays/src/hero/motion.rs, crates/nh-plays/src/shot/pose.rs, crates/nh-scene/src/things/altar.rs, crates/nh-scene/src/surface.rs
N-227DoneBeauty and realism by the Pareto principle
N-97DoneAltars
N-486Built, not reviewedAltars: lit, a round foundation stone, runes
N-258Built, not reviewedAltars: Moloch near black, red marks on every top as the tiles draw them
N-653Built, not reviewedGold light on the high altars

Fountains, altars and boulders drawn as carved stone made ahead of time, finer than the game builds.

Built3D form

Based on the real thing: An altar is a hewn stone slab overhanging a narrower block on a low step worn hollow by feet, its arrises chipped and rubbed round, and a boulder is a rounded rock with broad broken faces, chips and cracks, flattened where it rests, both matte and darker in their hollows.

Details

The authored kit (N-765): forms made offline by the tool codex-kit and read by nh-scene beside the procedural ones (nh_scene::kit). A piece is a sculpt written as a distance field, meshed (surface nets, its vertices pulled onto the surface), brought to a budget of triangles where the form allows it (quadric error, each step folding a vertex into a neighbor so every vertex stays on the surface), and baked: how open each vertex is to the light (a crevice, the foot on the floor, the underside of the slab's overhang darker) and how sharp its edge is (an arris lighter, a hollow darker) in its vertex color, which the material's color is multiplied by, so the stone stays the game's stone. The tool also takes a sculptor's glTF through the same bake. The files are compiled into the game (crates/nh-scene/kit/: altar.kit 119 KB, 7000 triangles, fresh and worn on one topology; four boulders of 46 KB, 4000 triangles each). With dungeon.authored_altar on (as by default): an altar is the DevTeam's tiles 33 to 37 (other.txt) made stone, an overhanging slab with its top where the procedural slab's is, a narrower block and a low step as wide as the slab, in its alignment's stone with the red marks on its top as before; its height knob stretches the block and keeps the slab's thickness, and the wear knob blends the fresh bake toward the worn one (edges two and a half centimeters round, chips softened, the step's hollows deeper at 2). A boulder is tile 477 (objects.txt) made stone, in the edge's boulder's frame (its flats at BOULDER_FLATS, its round side within the edge's lump), so it stands, rolls, lands and leaves the squeeze as the edge's stone does, one of four by its lump; the tile's nod: its fresh-broken faces a little paler and warmer (the tile's C flecks) and its cracks darker and browner (its J). The fountain (the director, 2026-12-02: "really stretch ourselves on something complex to set a gold standard for authoring"), from tile 41 (other.txt: a round basin of blue-gray stone with pale molded bands, a white column with water arcing from its top): a basin turned and carved as a mason would, a molded foot sunk a little in the floor, a rounded band, a body of sixteen gadroons, a thick rolled lip with a few soft knocks, hollowed to a bowl under the water; and a column, a baluster with rings carrying a shallow tazza with a lobed underside and a knob in its middle where the jet rises. Both are made to the usual fountain (dungeon.basin_height 0.25, the column 0.5 over the water): the water's disc ends in the basin's stone all the way round (its bulge with the caves' field set to nothing, since the carved stone is round), the bowl's water ends in the bowl's stone, the jet rises from the knob and the overflow falls clear of the baluster into the basin; a fountain set to other heights keeps the game's forms. The bake weathers them: wet and dark just over the water, a pale line of lime at the water line, green-dark under it, the bowl dark inside and streaked pale with lime under its rim, the moldings a little paler and the lobed body a little darker, as the tile's bands. Each piece has its switch (N-5720): dungeon.authored_fountain and dungeon.authored_altar on, dungeon.authored_boulders off until the boulder's material lets its weathered skin show (N-5725); since its third round the boulder is low and broad with big broken faces on its flanks, a few on its crown, round-bottomed cracks and grime low. Off: that piece as the game builds it, bit for bit.

Id
codex.authored_forms
Exact state
Built
Playtests
gallery-authored-kit
Settings
dungeon.authored_fountain, dungeon.authored_altar, dungeon.authored_boulders
Code
crates/codex-kit/src/lib.rs, crates/codex-kit/src/pieces.rs, crates/nh-scene/src/kit.rs, crates/nh-scene/src/model.rs, crates/nh-scene/src/things/altar.rs, crates/nh-knobs/src/dungeon/authored_forms.rs, crates/nh-scene/src/kit_tests.rs
Applies to everything on the map (5)
  • The window port passes what the game chose for each glyph as the tty would show it, and no more.
  • Altars, thrones, graves, sinks and traps stay letters that stand upright on the floor.
  • 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.

  • altars in Codex, first personfirst person
Gallery scene gallery-furniture, altar. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.
  • altars in Codex, first personfirst person
  • altars in Codex, close third personclose third person
  • altars in Codex, director's viewdirector's view
  • altars in Codex, map viewmap view
Gallery scene gallery-lava-altar-engraving, lava altar engraving. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.
  • altars in Codex, first personfirst person
  • altars in Codex, close third personclose third person
  • altars in Codex, director's viewdirector's view
  • altars in Codex, map viewmap view
Gallery scene gallery-named-rooms, temple. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.
  • altars in Codex, first personfirst person
  • altars in Codex, close third personclose third person
  • altars in Codex, director's viewdirector's view
  • altars in Codex, map viewmap view
Gallery scene gallery-furniture-shadow, basin. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.

Playtests: altars-dais, altars-astral, altars-sanctum, gallery-authored-kit

Planned and proposed

Planned A player's own forms for the hero, objects and features, not only monsters.

Details for builders

Id: altar. Lexicon subjects: feature.altar.

Design notes from NetHack

The unused altar colors match the unicorns: lawful white, neutral gray, chaotic black. An amber or black flash shows when a blessed or cursed object is dropped on one.

White in the unused altar colors (the white unicorn's color) and in tile 36 (other.txt), a pale stone.

Gray in the unused altar colors (the gray unicorn's color). Tile 35 (other.txt): a blue-gray stone.

Black in the unused altar colors (the black unicorn's color). Tile 34 (other.txt): a dark gray stone.

Red in the default display, the only alignment it shows. Tile 33 (other.txt): black stone streaked red.

Tile 37 (other.txt): a magenta altar topped with white sparkles.

Backlog rows

N-227DoneBeauty and realism by the Pareto principle
N-97DoneAltars
N-486Built, not reviewedAltars: lit, a round foundation stone, runes
N-258Built, not reviewedAltars: Moloch near black, red marks on every top as the tiles draw them
N-653Built, not reviewedGold light on the high altars
N-353To doOwn forms for the hero, objects and features