Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/apursley2012/the-beach-mystery/llms.txt

Use this file to discover all available pages before exploring further.

Deep in The Beach Mystery’s island branch, your path is blocked by two silent guards. One carries a lantern; the other wears a brass key around his neck. The map in your hand gets you ashore — but to pass through the vine-covered gate and reach the island’s treasure, you must answer a riddle. There is no way around it, no time limit, and no wrong-answer penalty: the island does not open until you speak the correct word.

How to Reach the Riddle

The riddle node appears only on a specific path through the story. Both choices below must be made in sequence:
1

Open the chest

At the chestChoice node, answer Yes to open the pirate’s chest. This grants you both the jewel and the treasure map (hasMap: true). Without the map, the island path does not become available.
2

Follow the map

At the mapChoice node, answer Yes to sail toward the island. This routes you through the followMap narration node.
3

Arrive at the island

The followMap node describes the rough sea crossing and your arrival on a strip of white sand. Two guards greet you at a narrow path leading into thick brush.
4

Face the second guard

The first guard confirms your map grants you entry. The second guard steps forward and poses the riddle before you may pass.
The riddle is exclusive to the island path. Players who skip the chest, choose not to follow the map, or take the cave route instead will never encounter it. See the Storylines page for a full map of every branch.

The Riddle

Once you reach the riddleIntro node, the second guard speaks:
“I speak without a mouth and hear without ears. I have no body, but I come alive with the wind. What am I?”
Type your answer into the input field and submit. The comparison is case-insensitiveEcho, ECHO, and echo are all accepted.

The Hint System

You can guess as many times as you need. After two incorrect attempts, a hint automatically appears below the input field:
“It is a sound that repeats what you say, bouncing back from canyon walls and empty halls.”
If the riddle has you stuck, just submit two wrong guesses and the hint will appear — no page refresh or restart required. The attempt counter is local to the riddle node and resets if you replay the story.

What Happens After You Solve It

Answering correctly triggers the riddleSolved narration node. The story continues:
1

The guards react

The guards exchange a surprised smile. The man with the brass key unlocks the vine-covered gate, and both step aside without a word.
2

You follow the trail

A narrow trail leads through ferns taller than your shoulders. The marks on the map guide you past three carved stones and across a shallow stream.
3

Reach the treasure

The trail ends in a sunlit clearing dominated by a huge, gnarled oak tree — the same one drawn beside the X on your map. A beam of sunlight falls on a mound of old coins and golden objects nestled between the roots.
4

Meet the guardian

A beautiful animal (your favoriteAnimal) sleeps nearby wearing a tag bearing the same symbol as your jewel. It wakes without fear and nudges a wooden box from beneath a root — inside is a note explaining that the treasure belongs to whoever arrives with courage, wisdom, and respect.
5

islandTreasure ending

You take a single gold coin and depart. The story closes on the islandTreasure ending: “The Island’s Secret.”

There Is No Fail State

The riddle has no attempt limit and no penalty for wrong answers. You cannot be locked out of the ending by guessing incorrectly — the game simply waits for the right word.
The solveRiddle() function in useGameState.js advances the game to node.next (which is always riddleSolved) only when the submitted answer matches. Until then the node stays active and the input remains open.

The Riddle in Source

The riddle text, answer, and hint all live in a single constant in data/story.js, referenced by the riddleIntro story node:
const RIDDLE = {
  question:
    "I speak without a mouth and hear without ears.\nI have no body, but I come alive with the wind. What am I?",
  answer: "echo",
  hint: "It is a sound that repeats what you say, bouncing back from canyon walls and empty halls.",
};
The riddleIntro node spreads those values directly into the node definition:
riddleIntro: {
  id: "riddleIntro",
  type: "riddle",
  scene: "riddle",
  riddleText: RIDDLE.question,
  answer: RIDDLE.answer,
  hint: RIDDLE.hint,
  next: "riddleSolved",
},

The Riddle Node Type

The Beach Mystery has three story node types, each rendered differently:
TypeHow it rendersAdvances by
narrationText lines displayed one at a timeClicking Continue (auto-advance)
choiceA prompt with two or more labeled buttonsClicking a choice button
riddleA text input and Submit buttonSubmitting the correct answer
Unlike narration nodes (which advance automatically) and choice nodes (which present discrete buttons), a riddle node renders a freeform text input. The player types an answer, submits it, and the game checks it against node.answer using a case-insensitive string comparison before calling solveRiddle() to advance.

Build docs developers (and LLMs) love