How rasmuslc1/kobold_clash works
This is a Python/Pygame dungeon-crawler roguelike with systems for biome-based world generation, combat and enemy AI, loot and inventory progression, lighting, and persistence. The principal gameplay loop takes the player through generated rooms and encounters, with enemies navigating and attacking, and items supporting further progression. The README documents several performance and architecture features; source excerpts are partial, and some modules it names are absent from the supplied tree, so uncertain runtime wiring is omitted.
Main entry points: save_load_manager.py Save and Load · tilemap.py Tilemap and Queries · item_handler.py Items and Drops · trap_handler.py Traps
Components 20
Game Runtime
- Save and Load
scripts/game/save_load_manager.py - Game Entry Loop
main.py
World Systems
- Awakening Director
scripts/engine/awakening/awakening.py - Biome Enemy Spawners
scripts/entities/moving_entities/enemies/crypt/crypt_spawn.py - Room Initialization
scripts/entities/rooms/crypt_room_initialiser.py - Tilemap and Queries
scripts/engine/tilemap/tilemap.py - Decorations
scripts/entities/decoration/decoration_handler.py - Traps
scripts/entities/traps/trap_handler.py
Combat and AI
- Player
scripts/entities/moving_entities/player/player.py - Enemies
scripts/entities/moving_entities/enemies/enemy_handler.py - Enemy Intent and AI
scripts/entities/moving_entities/enemies/behavior/intent_manager.py - Status Effects
scripts/entities/moving_entities/effects/effects_handler.py
Items and Progression
- Items and Drops
scripts/entities/items/item_handler.py - Inventory
scripts/interface/inventory/inventory_handler.py - Runes
scripts/entities/items/runes/rune_handler.py
Engine Services
- Pathfinding Queue
scripts/entities/moving_entities/enemies/enemy_pathfinding_handler.py - A* Pathfinding
scripts/engine/a_star.py - Lighting and Fog
scripts/engine/ray_caster.py - Particles
scripts/engine/particles/particle_handler.py
Other components
- Player
Connections 26
- Player → Game Entry Loop: starts game
- Game Entry Loop → Save and Load: creates manager
- Save and Load → Tilemap and Queries: captures and restores
- Save and Load → Player: captures and restores
- Save and Load → Items and Drops: captures and restores
- Save and Load → Enemies: captures and restores
- Save and Load → Traps: captures and restores
- Save and Load → Inventory: captures and restores
- Save and Load → Decorations: captures and restores
- Save and Load → Lighting and Fog: captures and restores
- Enemies → Enemy Intent and AI: updates intent
- Enemy Intent and AI → Pathfinding Queue: requests paths
- Pathfinding Queue → A* Pathfinding: processes requests
- Enemy Intent and AI → Player: targets player
- Awakening Director → Biome Enemy Spawners: dispatches spawns
- Room Initialization → Biome Enemy Spawners: selects biome spawns
- Room Initialization → Tilemap and Queries: initializes room
- Decorations → Tilemap and Queries: updates tile entities
- Traps → Tilemap and Queries: queries nearby tiles
- Items and Drops → Tilemap and Queries: queries nearby items
- Items and Drops → Inventory: adds pickups
- Items and Drops → Runes: updates runes
- Runes → Inventory: replaces active runes
- Player → Status Effects: manages effects
- Traps → Lighting and Fog: removes trap lights
- Particles → Game Entry Loop: renders effects