Step 5 of 6

Build

Five rooms. Two characters. Time to make it playable.

Generate the game

Tell your agent
"Use txtscape's snapshot tool to read all pages at once. Then build a text adventure game in index.html — a single HTML file with inline CSS and JavaScript. Show the room description, list exits as clickable links, and let the player interact with characters when they're in the same room. Use a dark theme with a monospace font. Start the player in the Entrance Hall."

Watch what the agent does:

  1. Calls snapshot to load all seven pages in one request
  2. Reads the room descriptions, exits, notable features
  3. Reads the character descriptions, locations, dialogue
  4. Generates index.html with a working game

Open it

Open index.html in your browser. You should be able to:

The exact layout and interactions depend on your agent's choices. That's fine — the important thing is that every room, character, and connection came from your txtscape pages.

The key insight

The AI didn't invent your labyrinth. It read your pages and built the game from them. The room descriptions, the character dialogue, the map of connections — all sourced from txtscape.

Your pages are the source of truth. The code is derived from them.

💡
Knowledge-first development. Most AI workflows go: explain in chat → generate code → pray it's consistent. With txtscape: record knowledge → read it programmatically → generate code from the source of truth. Every agent, every session, starts from the same facts.

Without txtscape, you'd describe the entire game in chat, the agent would generate code, and next session it would forget everything. With txtscape, the knowledge persists. Every session, every agent, starts from the same source.

💡
Snapshot vs. individual reads. snapshot loads all pages in one call — ideal when the agent needs the full picture. get_page reads one page at a time — better for targeted lookups. The agent picks the right tool based on what you ask.

Commit your progress

git add .txtscape index.html
git commit -m "generate text adventure from labyrinth pages"