AI-driven text adventure engine built in C#.
The player types actions. The AI narrates the world and enforces rules.
- Second-person narrative
- No player action auto-completion
- Enforces world logic
- Tracks key facts to maintain consistency
- Allows consequences (including death)
GameState– stores story log and summarised key factsAiClient– wraps the AI provider API- Narrator system prompt – defines game rules
- Periodic fact summarisation to reduce token usage
See also: docs/Coding_Standards.md for coding style, testing expectations, and Git workflow conventions.
- Create
src/UI.Console/appsettings.Development.jsonwith your AI provider API key:
{
"AiClient": {
"ApiKey": "<your-api-key>"
}
}This file is git-ignored and must never be committed.
- Run:
dotnet run --project src/UI.ConsoleExperimenting with:
- AI as a rule-bound game engine
- State compression via summarisation
- Emergent narrative without hardcoded branching