This project is a real-time multiplayer drawing game that leverages advanced technologies like MongoDB Vector Search and AWS Rekognition. Players join a game session, receive a prompt, draw their interpretation, and have their drawings analyzed and scored based on similarity to the prompt.
- Real-time multiplayer gameplay using Socket.IO
- Drawing interface with undo and clear functionality
- Image analysis using AWS Rekognition
- Similarity scoring using MongoDB Vector Search
- Admin panel for game management
- Leaderboard system
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express
- Database: MongoDB
- Real-time Communication: Socket.IO
- Image Analysis: AWS Rekognition
- Vector Search: MongoDB Atlas Search
- Cloud Platform: AWS (for hosting Rekognition)
- Node.js (v14 or later)
- MongoDB Atlas account
- AWS account with Rekognition access
- Git
- Clone the repository:
git clone https://github.com/yourusername/multiplayer-drawing-game.git
cd multiplayer-drawing-game
- Install dependencies:
npm install
- Set up environment variables:
Create a
.envfile in the root directory and add the following:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=your_aws_region
ADMIN_PASSWORD=your_admin_password
- Start the server:
npm start
- Open a web browser and navigate to
http://localhost:5000 - Enter your name and join a game
- Wait for the game to start
- Draw based on the given prompt
- Submit your drawing and wait for results
- Navigate to
http://localhost:5000/admin - Enter the admin password
- Manage game sessions, start games, and end games
public/- Static files (HTML, CSS, client-side JS)src/- Server-side source codemodels/- MongoDB modelsroutes/- Express routesutils/- Utility functions and Socket.IO handlersapp.js- Main application fileconfig.js- Configuration file
- POST
/api/upload- Upload a drawing - GET
/api/prompts- Get all prompts (admin only) - POST
/api/saveScore- Save a game score
joinGame- Player joins a gamestartGame- Admin starts a gamesubmitDrawing- Player submits a drawinggameEnded- Game ends, results are sent
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- MongoDB Atlas for database and vector search capabilities
- AWS Rekognition for image analysis
- Socket.IO for real-time communication