Skip to content

04

AI Text-Based Game

Side Project — In Development2025 →

TypeScriptAINode.js

Problem

Text-based adventure games have always fascinated me, but the classic ones are rigid — every path is pre-authored. I wanted to explore what happens when the narrative engine is generative, adapting to player choices in real time.

Approach

Building a Node.js backend that manages game state and feeds context to an LLM for narrative generation. The challenge is maintaining coherence — the AI needs to remember what happened three rooms ago without re-reading the entire history. Experimenting with structured context windows and state summarization.

Outcome

Work in progress. Early prototypes show that the hardest design problem isn't generating text — it's deciding how much agency to give the player before the story loses coherence. Finding the right constraints is the game design, not the AI.