# ferrdxd/hearthwood-rimba architecture

> Architecture diagram of the GitHub repository ferrdxd/hearthwood-rimba, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ferrdxd/hearthwood-rimba
- Repository: https://github.com/ferrdxd/hearthwood-rimba

## Overview

This is a Godot game project, apparently centered on a player exploring a world, interacting with NPCs, and using a warung’s cooking and shop systems. The tree also shows social-affection, dialogue, inventory, and time features. The groups below separate runtime orchestration, world and characters, game systems, player-facing UI, and content data. No README text or source excerpts were provided, so relationships shown are dashed and unverified; filenames and scene names alone do not establish call direction.

Main entry points: [`scripts/player/Player.gd`](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/player/Player.gd) (Player), [`scripts/world/World.gd`](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/world/World.gd) (World Logic), [`scripts/npc/NPC.gd`](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/npc/NPC.gd) (NPC Interaction), [`scripts/Main.gd`](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/Main.gd) (Game Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_state["Game State<br/>[GameState.gd]"]
  node_main["Game Entry<br/>[Main.gd]"]
end

subgraph group_world["World and Characters"]
  node_player["Player<br/>[Player.gd]"]
  node_world_logic["World Logic<br/>[World.gd]"]
  node_pickup["Item Pickup<br/>[ItemPickup.gd]"]
  node_npc["NPC Interaction<br/>[NPC.gd]"]
  node_shop_npc["Shop NPC<br/>[ShopNPC.gd]"]
end

subgraph group_systems["Game Systems"]
  node_time["Time System<br/>[TimeSystem.gd]"]
  node_affection["Affection System<br/>[AffectionSystem.gd]"]
  node_cooking["Cooking System<br/>[CookingSystem.gd]"]
end

subgraph group_ui["Player UI"]
  node_dialog_ui["Dialogue UI<br/>[DialogUI.gd]"]
  node_gift_ui["Gift UI<br/>[GiftUI.gd]"]
  node_inventory_ui["Inventory UI<br/>[InventoryUI.gd]"]
  node_cooking_ui["Cooking UI<br/>[CookingUI.gd]"]
  node_shop_ui["Shop UI<br/>[ShopUI.gd]"]
  node_touch_controls["Touch Controls<br/>[TouchControls.gd]"]
end

subgraph group_content["Content Data"]
  node_items["Item Definitions<br/>[items.json]"]
  node_npcs["NPC Definitions"]
  node_recipes["Recipe Definitions"]
  node_schedules["Schedules<br/>[schedules.json]"]
  node_shops["Shop Definitions<br/>[shops.json]"]
end

node_player_actor(("Player"))

node_player_actor -.->|"controls"| node_player
node_main -.->|"starts"| node_world_logic
node_world_logic -.->|"places"| node_player
node_world_logic -.->|"places"| node_npc
node_world_logic -.->|"places"| node_shop_npc
node_world_logic -.->|"places"| node_pickup
node_player -.->|"interacts"| node_npc
node_player -.->|"interacts"| node_shop_npc
node_npc -.->|"shows dialogue"| node_dialog_ui
node_npc -.->|"affects rapport"| node_affection
node_player -.->|"offers gifts"| node_gift_ui
node_player -.->|"views inventory"| node_inventory_ui
node_player -.->|"opens cooking"| node_cooking_ui
node_cooking_ui -.->|"requests cooking"| node_cooking
node_shop_npc -.->|"opens shop"| node_shop_ui
node_player -.->|"uses controls"| node_touch_controls
node_main -.->|"uses time"| node_time
node_main -.->|"uses state"| node_state
node_cooking -.->|"uses recipes"| node_recipes
node_inventory_ui -.->|"displays items"| node_items
node_npc -.->|"uses character data"| node_npcs
node_world_logic -.->|"uses schedules"| node_schedules
node_shop_ui -.->|"uses shop data"| node_shops

click node_player "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/player/Player.gd"
click node_world_logic "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/world/World.gd"
click node_pickup "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/world/ItemPickup.gd"
click node_npc "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/npc/NPC.gd"
click node_shop_npc "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/npc/ShopNPC.gd"
click node_state "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/autoload/GameState.gd"
click node_main "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/Main.gd"
click node_time "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/systems/TimeSystem.gd"
click node_affection "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/systems/AffectionSystem.gd"
click node_cooking "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/systems/CookingSystem.gd"
click node_dialog_ui "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/DialogUI.gd"
click node_gift_ui "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/GiftUI.gd"
click node_inventory_ui "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/InventoryUI.gd"
click node_cooking_ui "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/CookingUI.gd"
click node_shop_ui "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/ShopUI.gd"
click node_touch_controls "https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/TouchControls.gd"
click node_items "https://github.com/ferrdxd/hearthwood-rimba/blob/main/data/items/items.json"
click node_npcs "https://github.com/ferrdxd/hearthwood-rimba/tree/main/data/npcs"
click node_recipes "https://github.com/ferrdxd/hearthwood-rimba/tree/main/data/recipes"
click node_schedules "https://github.com/ferrdxd/hearthwood-rimba/blob/main/data/schedules.json"
click node_shops "https://github.com/ferrdxd/hearthwood-rimba/blob/main/data/shops.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_state,node_main toneBlue
class node_player,node_world_logic,node_pickup,node_npc,node_shop_npc toneAmber
class node_time,node_affection,node_cooking toneMint
class node_dialog_ui,node_gift_ui,node_inventory_ui,node_cooking_ui,node_shop_ui,node_touch_controls toneRose
class node_items,node_npcs,node_recipes,node_schedules,node_shops,node_player_actor toneIndigo
```

## Components

### Runtime

- [Game State](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/autoload/GameState.gd): `scripts/autoload/GameState.gd`
- [Game Entry](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/Main.gd): `scripts/Main.gd`

### World and Characters

- [Player](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/player/Player.gd): `scripts/player/Player.gd`
- [World Logic](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/world/World.gd): `scripts/world/World.gd`
- [Item Pickup](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/world/ItemPickup.gd): `scripts/world/ItemPickup.gd`
- [NPC Interaction](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/npc/NPC.gd): `scripts/npc/NPC.gd`
- [Shop NPC](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/npc/ShopNPC.gd): `scripts/npc/ShopNPC.gd`

### Game Systems

- [Time System](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/systems/TimeSystem.gd): `scripts/systems/TimeSystem.gd`
- [Affection System](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/systems/AffectionSystem.gd): `scripts/systems/AffectionSystem.gd`
- [Cooking System](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/systems/CookingSystem.gd): `scripts/systems/CookingSystem.gd`

### Player UI

- [Dialogue UI](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/DialogUI.gd): `scripts/ui/DialogUI.gd`
- [Gift UI](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/GiftUI.gd): `scripts/ui/GiftUI.gd`
- [Inventory UI](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/InventoryUI.gd): `scripts/ui/InventoryUI.gd`
- [Cooking UI](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/CookingUI.gd): `scripts/ui/CookingUI.gd`
- [Shop UI](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/ShopUI.gd): `scripts/ui/ShopUI.gd`
- [Touch Controls](https://github.com/ferrdxd/hearthwood-rimba/blob/main/scripts/ui/TouchControls.gd): `scripts/ui/TouchControls.gd`

### Content Data

- [Item Definitions](https://github.com/ferrdxd/hearthwood-rimba/blob/main/data/items/items.json): `data/items/items.json`
- [NPC Definitions](https://github.com/ferrdxd/hearthwood-rimba/tree/main/data/npcs): `data/npcs`
- [Recipe Definitions](https://github.com/ferrdxd/hearthwood-rimba/tree/main/data/recipes): `data/recipes`
- [Schedules](https://github.com/ferrdxd/hearthwood-rimba/blob/main/data/schedules.json): `data/schedules.json`
- [Shop Definitions](https://github.com/ferrdxd/hearthwood-rimba/blob/main/data/shops.json): `data/shops.json`

### Other components

- **Player**

## Connections

- Player → Player: controls
- Game Entry → World Logic: starts
- World Logic → Player: places
- World Logic → NPC Interaction: places
- World Logic → Shop NPC: places
- World Logic → Item Pickup: places
- Player → NPC Interaction: interacts
- Player → Shop NPC: interacts
- NPC Interaction → Dialogue UI: shows dialogue
- NPC Interaction → Affection System: affects rapport
- Player → Gift UI: offers gifts
- Player → Inventory UI: views inventory
- Player → Cooking UI: opens cooking
- Cooking UI → Cooking System: requests cooking
- Shop NPC → Shop UI: opens shop
- Player → Touch Controls: uses controls
- Game Entry → Time System: uses time
- Game Entry → Game State: uses state
- Cooking System → Recipe Definitions: uses recipes
- Inventory UI → Item Definitions: displays items
- NPC Interaction → NPC Definitions: uses character data
- World Logic → Schedules: uses schedules
- Shop UI → Shop Definitions: uses shop data
