How kunal0040/text-adventure-game-python works
This is a terminal-based, data-driven noir mystery adventure. The player receives the case, explores locations, questions characters, gathers and inspects evidence, then reaches an ending based on their evidence and choices. The README also documents visited-room fast travel, lock validation, animated pacing, and changing room states; these are represented at the level supported by the excerpts. Source excerpts are partial, so uncertain internal wiring is omitted.
Main entry points: main.py Command dispatch · world_map.py Locations and rules
Components 16
Game engine
- Terminal commands
main.py - Command dispatch
main.py - Room navigation
main.py - Room presentation
main.py - Text pacing
main.py - Help and controls
main.py
Investigation
- Character dialogue
main.py - Room actions
main.py - Evidence handling
main.py - Clue inspection
main.py - Case inventory
main.py - Ending evaluation
main.py
Story data
- Locations and rules
world_map.py - Characters and dialogue
world_map.py - Case resolutions
world_map.py
Other components
- Detective player
Connections 26
- Detective player → Terminal commands: enters commands
- Terminal commands → Command dispatch: parses and dispatches
- Command dispatch → Room navigation: routes movement
- Command dispatch → Character dialogue: routes talk
- Command dispatch → Room actions: routes actions
- Command dispatch → Evidence handling: routes pickup
- Command dispatch → Clue inspection: routes inspection
- Command dispatch → Case inventory: routes inventory
- Command dispatch → Help and controls: routes help
- Room navigation → Locations and rules: reads exits and rules
- Room navigation → Room presentation: displays destination
- Room presentation → Locations and rules: reads room details
- Character dialogue → Locations and rules: reads dialogue and actions
- Character dialogue → Room actions: dispatches matching action
- Character dialogue → Ending evaluation: checks case readiness
- Room actions → Locations and rules: reads and changes room state
- Room actions → Evidence handling: collects spawned clues
- Evidence handling → Locations and rules: reads and removes items
- Evidence handling → Case inventory: adds collected clues
- Evidence handling → Clue inspection: offers inspection
- Clue inspection → Locations and rules: reads examination text
- Clue inspection → Case inventory: checks held clues
- Ending evaluation → Case inventory: checks evidence
- Ending evaluation → Case resolutions: selects ending
- Room presentation → Text pacing: prints paced text
- Help and controls → Locations and rules: reads available actions