How ryunumchon/monsterhunterturnbased works
Monster Hunt: Sacred Forest is a browser-based, turn-based hunting game. The player starts in the game runtime, moves through generated field areas, interacts with the world, and enters encounters; battle actions resolve through turn and status mechanics. Hunts feed quest rewards and persistent equipment, inventory, and crafting progression, while UI, pixel art, and synthesized audio present the experience. The graph follows documented imports and README capabilities; several unsampled subsystems are represented by their exact directories, and their internal links are omitted where evidence is unavailable.
Main entry points: input.js Input Router · main.js Startup · game.js Game Flow · field.js Field Movement
Components 27
Game Runtime
- Startup
src/main.js - Input Router
src/input.js - Game Flow
src/game.js - Game State
src/core/state.js
Field Exploration
- Field Movement
src/world/field.js - World Layout
src/data/world.js - Area Generation
src/world/mapgen.js - Monster Spawning
src/world/spawn.js - World Interaction
src/world/interact.js
Hunt and Battle
- Encounter Setup
src/battle/encounter.js - Battle Turns
src/battle/turn.js - Timing Meter
src/battle/meter.js - Status Effects
src/battle/status.js - Monster Data
src/data/monsters.js
Progression and Presentation
- Quest Rewards
src/quest/rewards.js - Inventory and Crafting
src/world/inventory.js - Smith Services
src/npc/smith.js - Gear Effects
src/core/gear.js - Persistent Save
src/core/save.js - NPC Dialogue
src/npc/dialogue.js - Menus and Dialog
src/ui/dialog.js - HUD
src/ui/hud.js - Map UI
src/ui/map.js - Field Renderer
src/ui/fieldRender.js - Pixel Art
src/art/index.js - Synth Audio
src/audio/audio8.js
Other components
- Player
Connections 41
- Player → Startup: opens game
- Startup → Input Router: registers input
src/main.js - Startup → Game Flow: starts flow
src/main.js - Startup → Game State: initializes
src/main.js - Input Router → Field Movement: routes movement
src/input.js - Input Router → World Interaction: routes actions
src/input.js - Input Router → Encounter Setup: starts encounter
src/input.js - Input Router → Battle Turns: dispatches battle
src/input.js - Input Router → Game Flow: dispatches commands
src/input.js - Field Movement → World Layout: reads layout
src/world/field.js - Field Movement → Area Generation: uses generated areas
src/world/field.js - Field Movement → Monster Spawning: requests spawns
src/world/field.js - Field Movement → Encounter Setup: starts hunt
src/world/field.js - World Interaction → NPC Dialogue: routes NPC talk
src/world/interact.js - World Interaction → Encounter Setup: starts encounter
src/world/interact.js - Area Generation → World Layout: reads area rules
src/world/mapgen.js - Monster Spawning → Monster Data: reads monster data
src/world/spawn.js - Encounter Setup → Monster Data: loads target data
src/battle/encounter.js - Encounter Setup → Battle Turns: starts battle
src/battle/turn.js - Battle Turns → Status Effects: applies effects
src/battle/turn.js - Battle Turns → Timing Meter: runs timing checks
src/battle/turn.js - Battle Turns → Field Movement: returns to field
src/battle/turn.js - Game Flow → Quest Rewards: awards hunt results
src/game.js - Game Flow → Monster Spawning: manages spawns
src/game.js - Game Flow → Map UI: opens map
src/game.js - Quest Rewards → Persistent Save: updates progress
src/quest/rewards.js - Inventory and Crafting → Persistent Save: persists changes
src/world/inventory.js - Inventory and Crafting → Gear Effects: equips armor
src/world/inventory.js - NPC Dialogue → Smith Services: offers smith services
src/npc/dialogue.js - Smith Services → Persistent Save: updates equipment
src/npc/smith.js - NPC Dialogue → Menus and Dialog: presents choices
src/npc/dialogue.js - Input Router → Inventory and Crafting: opens inventory
src/input.js - Startup → Field Renderer: starts rendering
src/main.js - Field Renderer → Area Generation: draws generated map
src/ui/fieldRender.js - Field Renderer → Pixel Art: uses sprites
src/ui/fieldRender.js - Startup → HUD: initializes HUD
src/main.js - Startup → Map UI: initializes map UI
src/main.js - Menus and Dialog → HUD: sets display mode
src/ui/dialog.js - Battle Turns → HUD: updates battle display
src/ui/hud.js - Input Router → Synth Audio: triggers sound
src/input.js - Game Flow → Synth Audio: controls music
src/game.js