Paladins of Pi

A text-driven fantasy adventure powered by local LLM inference.
Enter commands like a classic text adventure — watch the story unfold as a living narrative.

Inspiration

We wanted to recreate the feeling of old-school text adventure RPGs, where imagination was the graphics engine and every decision shaped the journey. At the same time, we wanted to modernise the experience by allowing players to explore open-ended worlds generated dynamically by an LLM running locally on a Raspberry Pi.

What it does

Paladins of Pi turns user text prompts into an evolving medieval fantasy story.
You type what your character does, the dungeon master responds.

Features:

  • Real-time narrative generation through a local LLM (via Ollama)
  • Classic text adventure style input/output system
  • A simplistic design with an easy to use UI.
  • Fully offline story creation — no cloud required

How we built it

  • Frontend: A web-based UI that allows the player to enter choices and view the story as it unfolds.
  • Backend: A server layer that handles message passing between the user and the language model.
  • LLM Engine: We use Ollama running locally to process story prompts and generate narrative responses.

The flow:

Frontend Input → Backend API → Ollama LLM → Response → Displayed in UI

Challenges we ran into

  • Running an LLM with meaningful story complexity on local hardware without lag.
  • Prompt tuning to ensure the narrative remained coherent over long interactions.
  • Using Raspberry Pi, a hardware which we had no experience with.
  • Synchronising story context between prompt rounds while avoiding memory bloat.

Accomplishments we're proud of

  • A fully offline, self-contained narrative game system.
  • Smooth and natural story flow with minimal prompting.
  • A cohesive visual identity tying together UI and narrative tone.
  • Making the Raspberry Pi feel like a retro RPG storytelling console.

What we learned

  • Prompt structure dramatically affects efficacy of the model.
  • How to build a full stack application.
  • Running LLMs locally requires thoughtful optimisation of model selection and context handling.
  • Using hardware like Raspberry Pi for generating output.

What will you do?

> Draw your sword
> Speak to the king
> Open the ancient book
> Wander into the fog

Your story begins now.

Built With

Share this project:

Updates