Skip to main content
Back to Resume

AI Text Adventure Game

Developed a text adventure game that uses LLMs to generate dynamic storylines based on the Helldivers 2 universe and respond to player input, creating a unique experience for each playthrough.

Node.jsTypeScriptLLM IntegrationNLPRAGVector Embeddings
Challenge

Create a text adventure game based on the Helldivers 2 universe with dynamic storylines.

Approach
  • Built a corpus of Helldivers 2 lore to provide context for the LLMs.
  • Used vector embeddings to store and retrieve relevant lore based on player input.
  • Separated the state tracking and narration generation into different LLM calls to improve performance and reduce context size.
  • Implemented compaction to prevent context rot in long running games.
Outcomes
  • Created a text adventure game with dynamic storylines that adapt to player choices.
  • Players can experience a unique story each time they play.
  • Demonstrated the potential of LLMs in interactive storytelling.