A medieval low-poly village to explore.
A third-person action-adventure prototype with dialogue, quests, inventory and NPC AI.
|
A living village NPCs with daily routines, dialogue and quests. |
Favor economy A favor-token economy and an inventory. |
Runs in the browser A self-contained HTML preview, built on Unity 6 + URP. |
A medieval low-poly village prototype built on Unity 6 + URP + Input System, shipping as cross-platform PC + WebGL with a self-contained HTML preview that runs without the engine.
Start here: open
preview.htmlby double-click. No engine install required. The full 3D prototype requires Unity 6 LTS — seeSETUP.md.
A full prototype (not a vertical slice) of an action-adventure village game with:
The unique progression element is Favor Tokens — earned by completing villager quests and dialogue branches, spent at the shop for discounts or to unlock new quest lines.
| Action | Key (PC/WebGL) |
|---|---|
| Move | W A S D / Arrow keys |
| Look (camera) | Mouse |
| Jump | Space |
| Sprint | Left Shift |
| Interact (talk / collect / fight) | E |
| Attack (sword swing) | Left Mouse |
| Dodge | Left Ctrl |
| Inventory | I |
| Quest log | Tab |
| Pause | Esc |
| Dialogue advance | Space / E |
| Dialogue choice 1–4 | 1 2 3 4 |
Action maps switch automatically: Player → UI when modals open, Player → Dialogue when
talking to an NPC. Driven by InputManager listening to GameManager.OnStateChanged.
Games/Hearthwood/
├── preview.html ← opens in any browser, no engine needed
├── README.md ← this file
├── SETUP.md ← engine editor walkthrough
├── ARCHITECTURE.md ← binding contract (read before modifying code)
├── ASSETS.md ← asset pack list + licensing notes
├── Packages/
│ └── manifest.json ← Unity package manifest (URP, Input System, Cinemachine, etc.)
└── Assets/
├── Scripts/
│ ├── Core/ ← Hearthwood.Core — interfaces, singletons, ScriptableObject schemas
│ ├── Input/ ← Hearthwood.Input — InputManager
│ ├── Audio/ ← Hearthwood.Audio — AudioManager, AmbientAudioManager, FootstepPlayer, InteractionAudio
│ ├── Scene/ ← Hearthwood.Scene — SceneController
│ ├── Player/ ← Hearthwood.Player — PlayerController3D, CombatController, HealthComponent, InventoryComponent, PlayerCamera, PlayerPersistence
│ ├── Quest/ ← Hearthwood.Quest — QuestSystem, ItemDatabase, QuestGiver
│ ├── Dialogue/ ← Hearthwood.Dialogue — DialogueRunner, DialogueTrigger
│ ├── Collectible/ ← Hearthwood.Collectible — Collectible, CollectibleSpawner
│ ├── NPC/ ← Hearthwood.NPC — NPCController, NPCSpawner
│ ├── UI/ ← Hearthwood.UI — HUDController, DialogueUI, QuestLogUI, PauseMenuUI, InventoryUI, UIInputBinder, InteractPromptUI
│ └── Editor/ ← Hearthwood.EditorTools — custom inspectors + sample content bootstrap (Editor-only)
├── ScriptableObjects/ ← generated SO assets (run "Hearthwood/Generate Sample Content")
├── Scenes/ ← your Village scene goes here
├── Settings/ ← HearthwoodInputActions.inputactions
└── Resources/ ← fonts, audio banks, runtime-loaded assets
Each subsystem has its own .asmdef (assembly definition) so compile errors surface
clearly and dependencies stay one-directional.
Games/Hearthwood/.Packages/manifest.json).SETUP.md to wire a scene, drop in a player + 2 NPCs + 5 herbs,
and press Play.preview.html.The HTML preview demonstrates ALL gameplay systems without Unity: dialogue trees, quest
progression, inventory, save/load, combat (via wolves), favor rewards, full quest flow
ending in Iron Sword reward. State persists to localStorage across reloads.
SETUP.md for the editor-side validation steps.ASSETS.md. Primitive cube placeholders are
generated at runtime by CollectibleSpawner and NPCSpawner so the prototype runs
even with zero imported assets.SETUP.md.OnItemCollected /
OnObjectiveCompleted) and show that mirror. The source of truth is still
QuestSystem._objectiveProgress; the UI mirror can lag by one frame but converges
immediately after each event. A future revision could add
QuestSystem.GetObjectiveProgress(questId, objectiveId) if exact server-authoritative
reads become necessary.| Need to change… | Look at… |
|---|---|
| A quest’s objectives | QuestData SO asset → custom inspector under Hearthwood/Quests |
| An NPC’s dialogue | DialogueData SO asset → Hearthwood/Dialogues custom inspector |
| Movement speed / jump height | PlayerController3D.cs → serialized fields |
| Sword damage / range | CombatController.cs → Damage, Range, AttackDurationSeconds |
| Inventory capacity | InventoryComponent.cs → Capacity |
| Key bindings | Assets/Settings/HearthwoodInputActions.inputactions |
| Add a new event flow | ARCHITECTURE.md §4 (public API contract) and §8 (event flow) |
E on each herb → objective counter ticks up.E → dialogue opens → pick “I’ll deliver it” → quest
completes → +3 Favor Tokens → quest “The Bandit Problem” auto-starts (defeat 3 wolves).HealthComponent.OnChanged.PlayerCamera)GrantItem delegate in QuestSystem to actually push rewards into inventoryInteractionAudio clips are placeholder
AudioClip null-references — inspector-assign when you have assets)See ASSETS.md for the asset pipeline and SETUP.md for the
editor-side setup.
Released under the MIT License © 2026 Juwen Lie. Contributions are welcome under the same license; see the contributing guide and Code of Conduct.