How mhollink/runemark works
Runemark is an incremental fantasy-game runtime and web client. The intended player journey is to choose an activity or destination, have commands update game state, simulate travel and activity progress, then inspect character and world state in the client. The excerpts directly verify command dispatch, simulation branches, route finding, content assembly, and save validation; most web feature wiring is unsampled, so those capabilities are represented without guessed call edges.
Main entry points: simulation.ts Game simulation · execute-command.ts Command dispatch · game-content.ts Content registry · save-repository.ts Save repository
Components 23
Web client
- Game interface
apps/web/src/app/App.tsx - Activities and combat
apps/web/src/features/activities - World and travel
apps/web/src/features/world - Character and skills
apps/web/src/features/equipment - Inventory and bank
apps/web/src/features/inventory - Offline progress
apps/web/src/features/offline-progress
Game runtime
- Command dispatch
packages/engine/src/commands/execute-command.ts - Game simulation
packages/engine/src/simulation.ts - Activity simulation
packages/engine/src/activities - Combat simulation
packages/engine/src/activities/combat.ts - Travel simulation
packages/engine/src/navigation/standalone-travel.ts - Route finding
packages/engine/src/navigation/find-route.ts - Activity sessions
packages/engine/src/activities/shared/activity-session.ts
Domain rules
- Game state model
packages/domain/src/character/character.ts - Inventory rules
packages/domain/src/inventory/inventory.ts - Equipment rules
packages/domain/src/equipment/equipment.ts
Game content
- Content registry
packages/content/src/game-content.ts - Activity definitions
packages/content/src/activities/index.ts - Item definitions
packages/content/src/items/index.ts
Save persistence
- Save manager
apps/web/src/game/persistence/save-manager.ts - Save repository
apps/web/src/game/persistence/save-repository.ts - Browser save store
apps/web/src/game/persistence/indexed-db-save-repository.ts
Other components
- Player
Connections 17
- Command dispatch → Game simulation: simulates first
packages/engine/src/commands/execute-command.ts - Command dispatch → Activity sessions: transitions session
packages/engine/src/commands/execute-command.ts - Command dispatch → Route finding: finds route
packages/engine/src/commands/execute-command.ts - Command dispatch → Travel simulation: creates travel
packages/engine/src/commands/execute-command.ts - Game simulation → Combat simulation: dispatches combat
packages/engine/src/simulation.ts - Game simulation → Activity simulation: dispatches gathering and production
packages/engine/src/simulation.ts - Game simulation → Travel simulation: simulates travel
packages/engine/src/simulation.ts - Game simulation → Content registry: uses content
- Activity sessions → Route finding: finds activity and bank routes
packages/engine/src/activities/shared/activity-session.ts - Content registry → Activity definitions: registers activities
packages/content/src/game-content.ts - Content registry → Item definitions: registers items
packages/content/src/game-content.ts - Save manager → Save repository: loads and saves
apps/web/src/game/persistence/save-manager.ts - Save manager → Save repository: validates loaded save
apps/web/src/game/persistence/save-manager.ts - Browser save store → Save repository: implements contract
apps/web/src/game/persistence/indexed-db-save-repository.ts - Inventory rules → Game state model: models backpack state
packages/domain/src/character/character.ts - Equipment rules → Inventory rules: moves items
packages/domain/src/equipment/equipment.ts - Player → Game interface: uses