Course project

StoryWeaver: generative interactive mystery game

An Android mystery game that generates a map, characters and a consistent story for every playthrough. 1st prize, ISTD Information Systems & Programming Project.

Context
Information Systems & Programming (50.001), SUTD
Kind
Course project
Role
Prompt engineering, RAG integration and narrative engine
Period
Feb – May 2026
Stack
  • Java
  • Android
  • LLM API
  • RAG
  • Wave Function Collapse
StoryWeaver showcase poster: playable mystery games on the go, with phone screenshots and how-to-play steps
StoryWeaver project showcase poster

The problem

The brief for Information Systems & Programming (SUTD CSD Term 4) was a mainly-Java Android prototype that could serve as a new feature in the fictional YouTwitFace mega-app, showing good object-oriented design and at least one suitable data structure or algorithm.

What I built

We built a complete Android interactive-fiction game combining Wave Function Collapse map generation, a GenAI narrative engine, RAG-assisted thematic retrieval and an investigation gameplay loop.

My part was prompt engineering, RAG integration and the narrative engine: making generated stories agree with the map, the characters and the player’s context.

Phone screen with a tile-based map of rooms and a grid of character portraits to choose from
Procedurally generated map with selectable characters
Phone screen with character portraits above a generated mystery synopsis
Generated mystery synopsis aligned with the game state

Result

1st prize in the ISTD Information Systems & Programming Project (S$400). SUTD retained the game for future Open Houses, and we were invited to present it to juniors choosing their pillars.

What I learned

Integration is the hard part. Procedural generation, AI output and UI state all have to agree on one shared game world.