Live Game : escape.dwani.ai
Demo Video : https://youtu.be/uHD2E5JG4so
An exciting multiplayer educational escape room game featuring Among Us-style characters! Players must solve puzzles, answer quiz questions, and escape through 5 themed rooms. Create a game session and invite friends with a unique game code!
- 1-4 Players per game session
- Game Codes - Create and share 6-character codes to invite friends
- Real-time Sync - See other players move in real-time via WebSockets
- Chat System - Communicate with teammates during gameplay
- Live Map View - Track all players across rooms
- Leaderboard - Compare scores with other players
-
5 Themed Escape Rooms:
- 🏛️ Seven Wonders of the World
- ⚽ World Cup Football
- 🚀 Space Travel
- 🧮 Maths & Logic
- ⚛️ Science & Physics
-
Random Room Order - Each player gets a randomized room sequence
-
Interactive Items - Walk around and interact with objects
-
Quiz Questions - Answer correctly to unlock items
-
3 Strikes System - 3 wrong answers = EJECTED! 💀
-
Victory Dances - Fortnite-style celebration when you escape!
- Among Us Characters - 10 customizable colors
- 3D-Styled Rooms - Immersive environments
- Ejection Animation - Dramatic space ejection sequence
- Victory Celebration - Dance party with confetti!
- Node.js 20+
- npm or yarn
# Install dependencies
npm install
# Start the multiplayer server (includes Socket.io)
npm run dev
# Or use the standard Next.js dev server (no multiplayer)
npm run dev:nextOpen http://localhost:3000 in your browser!
npm run build
npm start# Build and start
docker-compose up -d
# View logs
docker-compose logs -f
# Stop
docker-compose down# Build the image
docker build -t escape-among-us .
# Run the container
docker run -p 3000:3000 escape-among-usThe game will be available at http://localhost:3000
# Set your project ID
export PROJECT_ID=your-gcp-project-id
# Build and push to Google Container Registry
docker build -t gcr.io/$PROJECT_ID/escape-among-us .
docker push gcr.io/$PROJECT_ID/escape-among-us
# Or use Cloud Build
gcloud builds submit --tag gcr.io/$PROJECT_ID/escape-among-us
# Deploy to Cloud Run
gcloud run deploy escape-among-us \
--image gcr.io/$PROJECT_ID/escape-among-us \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--port 3000 \
--memory 512Mi \
--cpu 1 \
--min-instances 0 \
--max-instances 10# SSH into your VM
gcloud compute ssh your-vm-name --zone=us-central1-a
# Pull and run the container
docker pull gcr.io/$PROJECT_ID/escape-among-us
docker run -d -p 80:3000 --restart=always gcr.io/$PROJECT_ID/escape-among-usNote: The server binds to 0.0.0.0 to accept external connections. Make sure your firewall rules allow traffic on port 3000 (or 80 if you're mapping ports).
- Click "Create Game"
- Enter your name and choose a color
- Share the 6-character game code with friends
- Wait for players to join (1-4 players)
- Click "Ready" and then "Start Game"
- Click "Join Game"
- Enter the game code from your friend
- Enter your name and choose an available color
- Click "Ready" when you're set to play
| Key | Action |
|---|---|
| W/↑ | Move Up |
| A/← | Move Left |
| S/↓ | Move Down |
| D/→ | Move Right |
| E/Space | Interact with items / Enter exit |
- Walk to glowing items and press E to interact
- Answer quiz questions correctly to unlock items
- Complete all 4 items in a room to unlock the exit door
- 3 wrong answers = EJECTED! 💀
- Each player has a randomized room order
- First to escape all 5 rooms wins!
When 2+ players are in the same room:
- Race Mode activates - first to complete wins!
- The winner proceeds to the next room
- All other players in that room are EJECTED!
Challenge other players in the same room to a Face-Off:
- Click on another player to initiate
- Select 3 Yes/No questions from a list of 10
- The challenged player must answer all 3 questions
- If they get any wrong → They're ejected! ✅
- If they answer all 3 correctly → YOU get ejected! 💀
| Face-Off Risk/Reward |
|---|
| High Risk: If they answer all correctly, you're out! |
| High Reward: Eliminate competitors instantly! |
Strategy Tips:
- Pick tricky questions to maximize your chances
- Use face-offs when you're behind in the race
- Be careful - smart players can turn your challenge against you!
Press the "🗺️ Map" button to see:
- All players' current rooms
- Who's escaped (🏆)
- Live leaderboard with scores
- Item progress per room
Click the "💬" button to open chat:
- Send messages to all players
- Coordinate strategies
- Celebrate victories!
├── server.js # Custom Node.js server with Socket.io
├── Dockerfile # Docker production build
├── docker-compose.yml # Docker Compose configuration
├── src/
│ ├── app/
│ │ ├── api/health/ # Health check endpoint
│ │ ├── globals.css # Animations & styles
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Main game page
│ ├── components/
│ │ ├── AmongUsCharacter.tsx # SVG character
│ │ ├── EjectionAnimation.tsx # Ejection sequence
│ │ ├── FaceOffSelectModal.tsx # Choose duel questions
│ │ ├── FaceOffQuestionModal.tsx # Answer Yes/No
│ │ ├── FaceOffResultModal.tsx # Duel outcome
│ │ ├── FaceOffWaitingModal.tsx # Spectator view
│ │ ├── GameCanvas.tsx # Game world
│ │ ├── Lobby.tsx # Create/Join screens
│ │ ├── MapView.tsx # Player map
│ │ ├── MultiplayerHUD.tsx # Game HUD
│ │ ├── QuizModal.tsx # Quiz interface
│ │ └── VictoryAnimation.tsx # Win celebration
│ ├── data/
│ │ ├── rooms.ts # Room data & questions
│ │ └── faceoffQuestions.ts # Yes/No duel questions
│ ├── hooks/
│ │ └── useSocket.ts # Socket.io hook
│ └── lib/
│ ├── gameStore.ts # Zustand state
│ ├── multiplayerTypes.ts # MP types
│ └── types.ts # Core types
- Framework: Next.js 16 with App Router
- Language: TypeScript
- Styling: Tailwind CSS 4
- State: Zustand
- Realtime: Socket.io
- Deployment: Docker
| Variable | Description | Default |
|---|---|---|
PORT |
Server port | 3000 |
NODE_ENV |
Environment | development |
HOSTNAME |
Server hostname | localhost |
create-game- Create new sessionjoin-game- Join existing sessionplayer-ready- Toggle ready statusstart-game- Start the game (host)player-move- Send position updatesitem-completed- Mark item donewrong-answer- Report wrong answerroom-completed- Move to next roomchat-message- Send chat messagefaceoff-challenge- Initiate face-off duelfaceoff-select-questions- Choose 3 questionsfaceoff-answer- Answer Yes/No question
game-created- Session createdgame-joined- Successfully joinedplayer-joined- New player arrivedsession-updated- State changedgame-started- Game beganplayer-moved- Other player movedplayer-ejected- Someone ejectedchat-message- New chat messageroom-competition-lost- Lost room racefaceoff-select-questions- Select questions UIfaceoff-challenge-received- Being challengedfaceoff-started- Face-off beginningfaceoff-question- Next question to answerfaceoff-answer-result- Answer feedbackfaceoff-completed- Face-off ended
Edit src/data/rooms.ts:
{
id: 'your-room-id',
name: 'Your Room Name',
theme: 'your-theme',
description: 'Room description',
backgroundGradient: 'from-color-900 to-color-700',
accentColor: '#hexcolor',
icon: '🎯',
exitDoor: { x: 85, y: 50 },
items: [...],
questions: [...],
clues: [...],
}Edit server.js:
const session = {
maxPlayers: 4, // Change this
minPlayers: 1,
// ...
};GET /api/health- Health check for Docker/Kubernetes
The app includes health checks compatible with orchestration platforms:
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3For production with multiple instances, consider:
- Redis for session storage (adapter included in Socket.io)
- Load balancer with sticky sessions
- Shared state management
MIT License - feel free to use for hackathons or personal projects!
Made with ❤️ for the Escape Room Hackathon
