A text-based murder mystery game where you play as a detective investigating a murder in a mansion. Each playthrough features a randomly selected killer, creating a different mystery to solve every time.
- Open
index.htmlin a web browser - Read the introduction and click "Begin Investigation"
- Explore rooms by clicking navigation buttons
- Search objects to find evidence
- Talk to suspects - use evidence to unlock new dialogue options
- When ready, click "Make Accusation" and choose the killer
- Win by correctly identifying the murderer!
- Randomized killer - Different culprit each playthrough
- Branching dialogue - Conversations change based on evidence found
- 3 unique suspects - Each with motive, alibi, and secrets
- 6 explorable rooms - Search for clues throughout the mansion
- 9 evidence items - Some implicate the killer, others are red herrings
Simply open index.html in any modern web browser. No server required.
For development with live reload, you can use any static server:
# Python
python -m http.server 8000
# Node.js
npx servemystery-mansion/
├── index.html # Main page
├── css/style.css # Styling
├── js/
│ ├── main.js # Entry point
│ ├── state.js # Game state management
│ ├── data.js # Data loading
│ ├── engine.js # Game logic
│ ├── dialogue.js # Conversation system
│ ├── clues.js # Clue/killer logic
│ └── ui.js # DOM rendering
├── data/
│ ├── mansion.json # Room definitions
│ ├── characters.json # Suspects & dialogue
│ ├── clues.json # Evidence items
│ └── scenarios.json # Story configuration
└── README.md
- New rooms: Edit
data/mansion.json - New suspects: Edit
data/characters.json - New clues: Edit
data/clues.json
No code changes needed for content additions.