The Beach Mystery stores everything — your current node, inventory state, personalization variables, choice history, and discovered endings — directly in your browser usingDocumentation 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.
localStorage. There is no account, no server, and no data ever leaves your device. You can close the tab, come back days later, and pick up exactly where you left off.
What Gets Stored
Three separatelocalStorage keys handle different concerns:
beach-mystery-save
Your current game session. Contains the active node, all variables, inventory state, your full choice history, and whether an ending has been reached.
beach-mystery-achievements
An array of ending IDs collected across all sessions (e.g.
["islandTreasure", "hiddenChamber"]). Persists independently — resetting a session never erases it.beach-mystery-settings
Your accessibility and display preferences: sound on/off, text size, and high contrast mode. Applied on every visit automatically.
Saving Your Progress
Click 💾 Save Progress in the story sidebar at any point during gameplay. This callssaveGame(), which serializes the entire current gameState object to beach-mystery-save.
Continuing a Saved Game
When you return to the title screen, the game callshasSave() to check whether beach-mystery-save contains a valid in-progress session (i.e. started: true and currentNode is not null). If the check passes:
- A “Continue Saved Game” button appears on the title screen.
- Clicking it calls
loadGame(), which parses the stored JSON and restores all state. - The story resumes at exactly the node where you saved.
Restarting and Replaying
↻ Restart (during play)
Click ↻ Restart in the gameplay sidebar. This calls
resetGame(), which returns all game state to its initial values and routes back to the title screen. Your achievements are kept.Play Again (after an ending)
On the ending screen, click Play Again. This also calls
resetGame() and returns to the title screen, letting you begin a fresh run — useful for chasing a different ending.resetGame() resets the in-memory gameState to initial values, but it never touches beach-mystery-save, beach-mystery-achievements, or beach-mystery-settings. All the endings you have already discovered remain recorded. To remove a saved game from storage, call clearSave() separately.Achievement Tracking
Every time you reach an ending, its ID is appended to thebeach-mystery-achievements array (duplicates are ignored). The four collectible ending IDs are:
| ID | Ending Name | Icon |
|---|---|---|
islandTreasure | The Island’s Secret | 🏝️ |
hiddenChamber | The Hidden Treasure Chamber | 💎 |
animalDen | The Guardian’s Den | 🐾 |
peacefulWalk | The Peaceful Shore | 🌅 |
Settings That Persist
Settings saved tobeach-mystery-settings are applied automatically on every page load:
Sound
Toggle ambient audio and sound effects on or off. Default: on.
Text Size
Choose your preferred reading size. Default: medium.
High Contrast
Enable high-contrast mode for improved legibility. Default: off.
resetGame() or clearSave().
Save Function Reference
saveGame()
saveGame()
Serializes the current
gameState to localStorage under the key beach-mystery-save. Call this at any point during gameplay. Safe to call multiple times — each call overwrites the previous save.loadGame()
loadGame()
Parses
beach-mystery-save from localStorage, restores the full game state in memory, and returns true if successful. Returns false (and leaves state unchanged) if no valid save is found or if the JSON cannot be parsed.hasSave()
hasSave()
Returns
true if beach-mystery-save exists and contains started: true with a non-null currentNode. Used by the title screen to decide whether to show the “Continue Saved Game” button.clearSave()
clearSave()
Removes the
beach-mystery-save key from localStorage. Does not affect achievements or settings.resetGame()
resetGame()
Resets in-memory game state to initial values (
started: false, currentNode: null, empty variables and history). Does not remove beach-mystery-save or touch beach-mystery-achievements or beach-mystery-settings. Call clearSave() separately if you also want to wipe the stored save.Important Limitations
Achievement data is stored separately from the save file. Even if you clear your save — or your save is lost — your discovered endings remain intact in
beach-mystery-achievements as long as the browser’s localStorage for the site is preserved.