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
- Write the world bible: places, rules, a goal.
- Build a page that sends the story so far to the model.
- Make the model return narration plus game state as JSON.
- Show choices as buttons and an inventory panel.
- 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.