How iain-crowe/rougelike works
This is a terminal-style Python roguelike, launched through main.py. The core loop turns player input into actions, runs enemy turns, updates visibility, and renders the resulting dungeon state. Its domain stages include procedural floor generation, entity and item creation, exploration and combat, inventory and consumable effects, and character progression. The graph also shows the engine and rendering layer. Some links rely on the SOURCE INDEX or README rather than inspected implementations; those evidence limits are reflected in the citations.
Main entry points: actions.py Player actions · entity.py Actors and items · engine.py Game engine · game_map.py Dungeon map
Components 19
Game runtime
- Game launch
main.py - Game setup
util/setup_game.py - Input handlers
util/input_handlers.py - Game engine
util/engine.py
Dungeon world
- Floor generation
map/procgen.py - Dungeon map
map/game_map.py - Tile definitions
map/tile_types.py
Gameplay systems
- Entity factories
entity/entity_factories.py - Actors and items
entity/entity.py - Enemy AI
components/ai.py - Player actions
util/actions.py - Combat and health
components/fighter.py - Inventory
components/inventory.py - Consumables
components/consumable.py - Character progression
components/level.py
Interface and rendering
- Message log
util/message_log.py - Rendering helpers
util/render/render_functions.py - Color definitions
util/render/color.py
Other components
- Player
Connections 31
- Player → Game launch: starts game
README.md - Game launch → Game setup: initializes
main.py - Game setup → Entity factories: uses entities
util/setup_game.py - Game setup → Dungeon map: sets up map
util/setup_game.py - Game setup → Input handlers: starts handler
util/setup_game.py - Input handlers → Player actions: dispatches actions
util/input_handlers.py - Input handlers → Game engine: runs turns
util/input_handlers.py - Game engine → Enemy AI: runs enemy turns
util/engine.py - Enemy AI → Player actions: performs actions
components/ai.py - Player actions → Dungeon map: checks map
util/actions.py - Player actions → Actors and items: targets entities
util/actions.py - Player actions → Consumables: activates item
util/actions.py - Player actions → Inventory: moves items
util/actions.py - Player actions → Combat and health: uses combat stats
util/actions.py - Player actions → Game engine: generates floor
util/actions.py - Game engine → Dungeon map: updates visibility
util/engine.py - Game engine → Message log: renders log
util/engine.py - Game engine → Rendering helpers: renders status
util/engine.py - Dungeon map → Floor generation: requests generation
map/game_map.py - Floor generation → Dungeon map: creates floor
map/procgen.py - Floor generation → Tile definitions: uses tiles
map/procgen.py - Floor generation → Entity factories: places entities
map/procgen.py - Dungeon map → Tile definitions: renders tiles
map/game_map.py - Entity factories → Actors and items: builds actors
entity/entity_factories.py - Actors and items → Combat and health: owns component
entity/entity.py - Actors and items → Inventory: owns component
entity/entity.py - Actors and items → Character progression: owns component
entity/entity.py - Actors and items → Consumables: owns component
entity/entity.py - Actors and items → Enemy AI: uses AI
entity/entity.py - Message log → Color definitions: uses colors
util/message_log.py - Rendering helpers → Color definitions: uses colors
util/render/render_functions.py