A minimal Unity feasibility prototype for persistent NPC memory and budget-aware dialogue context selection.
This repository is a pre-project technical exploration for a possible University of London CM3070 Final Project. It is intended to answer a small set of feasibility questions before the formal project begins:
- Can a Unity client complete a reliable, cancellable dialogue request?
- Can structured memories created by RPG choices survive an application restart and influence later NPC dialogue?
- Can a deterministic context builder preserve important facts while enforcing a context budget?
This repository is not yet the assessed Final Project implementation, and results produced here are not final evaluation evidence.
The player selects constrained RPG dialogue choices. Trusted intents write compact semantic records, deterministic tags retrieve relevant memories, and Arthur responds through Mock or Gemini before the next three choices are generated.
The prototype is complete when this flow works with a mock provider, handles failure safely, and can be demonstrated without an API key. A remote provider is optional until the offline vertical slice is stable.
A complete Unity 2022.3.62f3 feasibility prototype now demonstrates memory-driven RPG dialogue. The scene contains three choice buttons instead of free-text input; Gemini can generate validated dynamic choices, while deterministic fallback choices keep the full flow playable offline. Arthur's replaceable character-state boundary currently uses deterministic trust, concern and anger values that influence both responses and subsequent choices.
The project remains offline by default. To test Gemini without committing a credential:
- Copy
Config/gemini-provider.example.jsontoConfig/gemini-provider.local.json. - Set
UseGeminitotrue. - Put your Gemini key in
ApiKeyand keep or replace theModelvalue. - Enter Play Mode and use the existing dialogue UI.
Files ending in .local.json are ignored by Git. Never place a real key in the example file, a scene, a prefab or source code. Invalid or absent local configuration safely selects the deterministic mock provider.
Pre-project exploration will be dated and disclosed to the future supervisor. Formal requirements, implementation history, experiments and evaluation data will be created during the assessed project in accordance with the current CM3070 guidance.