A real-time multiplayer web-based party game where players try to identify who the imposter is!
โจ Smooth Gameplay
- Real-time synchronization between all players
- Beautiful, modern UI with animations
- Dynamic sound effects using Web Audio API
- Responsive design for all devices
๐ฎ Game Mechanics
- 30 word categories with 50 words each
- Customizable number of players (2-8)
- Configurable game rounds
- 3-turn gameplay per round
- Voting system to identify the imposter
- Dynamic scoring and leaderboard
๐จ Customization
- Select specific categories or play with all
- Adjust number of rounds
- Choose player count
- Rotating starting player each round
- PHP 7.0+
- Modern web browser with JavaScript enabled
- Local server (Apache, Nginx, or PHP built-in server)
- Clone the repository or download the files
- Place the project folder in your web server's root directory
- No database setup needed - uses JSON file storage
cd /path/to/imposter
php -S localhost:8000Then open your browser to http://localhost:8000
- Place the folder in
htdocs(XAMPP/WAMP) or document root (Apache) - Access via
http://localhost/imposter
Configure as needed and access the application
- Click "Create Game" on the menu
- Enter your name
- Choose number of rounds (1-10)
- Select number of players (2-8)
- Choose categories (or select "All Categories")
- Click "Create" to generate a game code
- Click "Join Game" on the menu
- Enter the 5-character game code
- Enter your name
- Click "Join"
- Lobby Phase: Wait for initiator to start the game
- Word Assignment: All players see the secret word, imposter only sees the category
- Rounds: 3 turns per round where players say related words
- Voting: All players vote on who they think is the imposter
- Results: See who was the imposter, scoring, and leaderboard
- Catch the Imposter: +10 points for everyone except imposter
- Imposter Escapes: +20 points for imposter
- New Round: Starting player rotates
imposter/
โโโ index.html # Main HTML file
โโโ api/
โ โโโ GameManager.php # Core game logic
โ โโโ create_game.php # Create game endpoint
โ โโโ join_game.php # Join game endpoint
โ โโโ get_game_state.php # Sync game state
โ โโโ start_game.php # Start game endpoint
โ โโโ submit_word.php # Submit word endpoint
โ โโโ submit_vote.php # Submit vote endpoint
โ โโโ start_round.php # Start next round endpoint
โโโ assets/
โ โโโ css/
โ โ โโโ style.css # Main stylesheet
โ โโโ js/
โ โโโ audio.js # Dynamic sound effects
โ โโโ app.js # Game application logic
โโโ data/
โ โโโ words.js # 30 categories ร 50 words
โ โโโ games.json # Game state storage
โโโ README.md # This file
- Animals
- Food
- Sports
- Movies
- Countries
- Music
- Technology
- Weather
- Body Parts
- Colors
- Professions
- Vehicles
- Clothes
- Furniture
- Emotions
- Geography
- Fantasy
- Nature
- Heroes
- History
- Science
- Literature
- Games
- Universe
- Holidays
- Cooking
- Drinks
- ... and more!
The game includes dynamic sound effects for:
- Click: Button interactions
- Join: Player joins game
- Reveal: Word reveal
- Vote: Voting
- Caught: Imposter caught
- Notification: Game events
- Clients poll the server every 500ms for game state updates
- All players see updates simultaneously
- No WebSocket required - works with simple HTTP polling
- Uses Web Audio API for dynamic sound synthesis
- No audio files needed - all sounds generated in real-time
- Works in all modern browsers
- JSON-based storage in
data/games.json - Auto-cleanup of old games
- Support for multiple concurrent games
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Opera 76+
- Check PHP file permissions on the
/datadirectory - Ensure
/data/directory exists and is writable
- Ensure browser allows audio playback
- Check browser's audio permissions
- Try in incognito/private mode
- Check browser console for CORS issues
- Verify PHP headers are set correctly
- Ensure server supports JSON responses
- WebSocket support for faster synchronization
- User accounts and persistent statistics
- Custom word lists
- Difficulty levels
- Spectator mode
- Mobile app version
This game is free to use and modify for personal or educational purposes.
For issues or suggestions, please check the game code or modify as needed.
Enjoy the game! May the best imposter win! ๐ญ