How zakker111/roguelike_whit_world works
This is a browser-based, data-driven roguelike. The player enters through the game runtime, explores a seeded procedural overworld, and can enter towns, dungeons, encounters, or the local region map; gameplay includes NPC interactions, combat, shops, quests, and followers. Groups distinguish runtime orchestration and presentation from the world, encounter, and town domains, plus shared gameplay systems. The README documents the major capabilities; edges between unsampled subsystems are omitted where their specific callers were not shown.
Main entry points: world_runtime.js World runtime · town_runtime.js Town NPC runtime · game_loop.js Game engine · main.js Game entry
Components 19
Runtime and UI
- Game entry
game/src/main.js - Game engine
game/core/engine/game_loop.js - Rendering and UI
game/ui/ui.js
World and locations
- Overworld generation
game/world/world.js - World runtime
game/core/world_runtime.js - Dungeon gameplay
game/core/dungeon/runtime.js - Overworld encounters
game/core/encounter/runtime.js - Region map
game/region_map/region_map_runtime.js
Town simulation
- Town generation
game/worldgen/town_gen.js - Town NPC runtime
game/ai/town_runtime.js - NPC movement
game/ai/town_movement.js - Pathfinding
game/ai/pathfinding.js - Inn upstairs
game/ai/town_inn_upstairs.js
Gameplay systems
- Turn-based combat
game/combat/combat.js - Follower runtime
game/core/followers_runtime.js - Shop service
game/services/shop_service.js - Quest board
game/services/quest_service.js - Game state persistence
game/core/state/persistence.js
Other components
- Player
Connections 18
- Player → Game entry: starts game
- Game entry → Game engine: starts runtime
- Player → Game engine: provides input
- Game engine → Rendering and UI: renders state
- Overworld generation → World runtime: supplies world
- World runtime → Dungeon gameplay: enters dungeon
- World runtime → Overworld encounters: starts encounter
- World runtime → Region map: opens region
game/region_map/region_map_runtime.js - Town generation → Town NPC runtime: creates town
- Town NPC runtime → NPC movement: moves NPCs
game/ai/town_runtime.js - Town NPC runtime → Inn upstairs: routes upstairs
game/ai/town_runtime.js - NPC movement → Pathfinding: uses paths
game/ai/town_movement.js - Player → Turn-based combat: fights
- Player → Follower runtime: hires followers
- Player → Shop service: trades
- Player → Quest board: takes quests
game/services/quest_service.js - Region map → Follower runtime: syncs followers
game/region_map/region_map_runtime.js - Player → Game state persistence: saves progress