How davidslv/rogue works
Rogue is a terminal dungeon-crawling game: the player starts or restores a run, issues commands, explores generated dungeon levels, fights monsters, uses and collects items, and ultimately dies or escapes; scores record the outcome. The runtime is organized around the main game loop, with separate modules for world generation, movement, combat, item effects, and persistence. The README documents major gameplay and save/score capabilities, but most implementation excerpts are absent, so uncertain internal links are omitted rather than inferred.
Main entry points: things.c Item Handling · main.c Game Entry · command.c Command Loop · new_level.c Level Setup
Components 22
Game Runtime
- Game Entry
main.c - Command Loop
command.c - Game State
extern.c
Dungeon World
- Level Setup
new_level.c - Room Generation
rooms.c - Passage Generation
passages.c
Gameplay
- Movement
move.c - Monster Pursuit
chase.c - Combat
fight.c - Monster Catalog
monsters.c - Item Handling
things.c - Potions
potions.c - Scrolls
scrolls.c - Wands and Staves
sticks.c - Weapons
weapons.c - Armor
armor.c
Persistence and Records
- Save and Restore
save.c - State Serialization
state.c - Scoreboard
rip.c
Terminal Platform
- Terminal Portability
mdport.c
Other components
- Player
- Curses Terminal
Connections 21
- Player → Game Entry: starts game
README.md - Game Entry → Terminal Portability: initializes port
main.c - Game Entry → Scoreboard: opens scores
main.c - Game Entry → Level Setup: sets up game
main.c - Game Entry → Command Loop: runs commands
main.c - Player → Command Loop: issues commands
README.md - Command Loop → Movement: moves hero
- Command Loop → Combat: attacks monsters
- Command Loop → Item Handling: uses items
- Level Setup → Room Generation: generates rooms
- Level Setup → Passage Generation: generates passages
- Monster Pursuit → Combat: engages hero
- Item Handling → Potions: handles potions
- Item Handling → Scrolls: handles scrolls
- Item Handling → Wands and Staves: handles wands
- Item Handling → Weapons: handles weapons
- Item Handling → Armor: handles armor
- Player → Save and Restore: restores save
README.md - Save and Restore → State Serialization: serializes state
- Player → Scoreboard: views scores
README.md - Terminal Portability → Curses Terminal: uses terminal UI
README.md