Skip to content

Story

Text adventure with an AI game master

A choose-your-path story where a model narrates, tracks your inventory and keeps the world consistent.

Build time
4 hours
Difficulty
Intermediate
Built with
Any chat model through an API, with Replit Agent
Play it
Demo coming soon

Build it

  1. Write the world bible: places, rules, a goal.
  2. Build a page that sends the story so far to the model.
  3. Make the model return narration plus game state as JSON.
  4. Show choices as buttons and an inventory panel.
  5. Add a save slot.

Starter prompt

You are the game master of a text adventure. World bible: {{world}}.
Game state: {{state_json}}
Player action: {{action}}

Narrate what happens in under 120 words, in second person. Keep every rule in the world bible; the player cannot do impossible things. Return JSON: {"narration": "...", "state": {updated state with location, inventory, health, flags}, "choices": [3 short options]}.

Full prompt pack

Every follow-up prompt for levels, sound, scoring, polish and publishing, in order.

The full pack is part of Blaze School.

See Blaze School plans Log in

Was this useful?