Pure rename, no behavior change; the full suite (RNG goldens,
generation invariants, scripted sessions, save round trip) is
unchanged and green.
- Creature flags: IsHuh→Confused, IsHalu→Hallucinating,
CanHuh→CanConfuse, CanSee→CanSeeInvisible, IsRun→Awake,
SeeMonst→SenseMonsters, IsCanc→Cancelled, IsLevit→Levitating,
IsBlind/IsGreed/IsHaste/IsTarget/IsHeld/IsInvis/IsMean/IsRegen/
IsFly/IsSlow → Blind/Greedy/Hasted/Targeted/Held/Invisible/Mean/
Regenerates/Flying/Slowed, IsFound→Found
- Object flags: IsCursed→Cursed, IsKnow→Known, IsMissl→Missile,
IsMany→Stackable, ObjIsFound→WasFound, IsProt→Protected
- Room flags: IsDark/IsGone/IsMaze → Dark/Gone/Maze; place flags:
FPass→FPassage, FPNum→FPassNum, FTMask→FTrapMask
- Trap types: TDoor→TrapDoor ... TMyst→TrapMystery
- Item subtypes: P*→Potion* (PLSD→PotionLSD, PMFind→
PotionDetectMonsters, ...), S*→Scroll* (SIDRorS→
ScrollIdentifyRingOrStick, ...), R*→Ring* (RAddHit→RingDexterity,
RNop→RingAdornment, ...), Ws*→Wand* (WsElect→WandLightning, ...),
weapons (TwoSword→WeaponTwoHandedSword, Shiraken→WeaponShuriken,
...), armor (RingMail→ArmorRingMail, ...)
- Counts: Max{Potions,Scrolls,Rings,Sticks,Weapons,Armors} →
Num{Potion,Scroll,Ring,Wand,Weapon,Armor}Types; NTraps→NumTrapTypes
- Level.NTraps field → TrapCount (also in the save snapshot)
- Original C constant names preserved as comment breadcrumbs in
types.go so the lineage stays greppable
TODO.md: step 1 moved to Completed, step 2 (typed kinds) promoted to
Next Step.
Rogue: Exploring the Dungeons of Doom (Go port)
Rogue is the original dungeon-crawling adventure game that spawned an entire genre. This branch is a faithful Go port of Rogue 5.4.4: explore procedurally generated dungeons, fight monsters, collect treasure, and attempt to retrieve the Amulet of Yendor.
Original authors: Michael Toy, Ken Arnold, and Glenn Wichman (1980–1983, 1985, 1999).
The port is function-by-function faithful to the classic C sources — same
dungeon generation (seed-compatible RNG), same combat math, same item
tables, same messages. The C reference implementation lives on the
master and modern-rogue branches; ARCHITECTURE.md
documents both the original program structure and the design of this port.
Building and running
Requires Go 1.25 or later and a terminal at least 80x24.
go build ./cmd/rogue
./rogue
# Restore a saved game
./rogue ~/rogue.save
# View high scores
./rogue -s
# Test the death screen (demo mode)
./rogue -d
In-game commands
Press ? in game for the full list.
- arrows or h/j/k/l/y/u/b/n — move (shift to run, ctrl to run until adjacent)
.rest,ssearch for hidden doors and trapsiinventory,,pick up,ddropqquaff potion,rread scroll,eeat foodwwield weapon,Wwear armor,P/Rput on / remove ringtthrow,zzap a wand,f/Ffight>/<take the stairsSsave,Qquit
Environment
# Game options, as in the original
export ROGUEOPTS="name=YourName,terse,jump,fruit=mango"
# Wizard (debug) mode, with a reproducible dungeon
ROGUE_WIZARD=1 SEED=12345 ./rogue
The scoreboard is kept in ~/.rogue.scores. Save files are Go gob
snapshots and, as in the original, are deleted when restored.
Code layout
game/ the game engine: one Go file per original C file,
function-by-function (see ARCHITECTURE.md for the mapping)
term/ tcell-backed terminal, replacing curses
cmd/rogue/ the executable
The engine package is fully headless-testable: go test ./game/ runs
scripted game sessions, dungeon-generation golden checks, and an RNG
compatibility test against the original C generator.
License
BSD-style; see LICENSE.TXT.
Copyright (C) 1980-1983, 1985, 1999 Michael Toy, Ken Arnold and Glenn Wichman. All rights reserved.