
Sync Draw Guess
A realtime multiplayer doodle guessing game
Sync Draw Guess
A real-time, multiplayer drawing and guessing game built using Node.js, Socket.IO, React, and TypeScript. Players join rooms, take turns drawing prompts, and compete to guess the drawings in a fun and interactive environment. With real-time canvas synchronization, timeouts for word selection, and smooth drawing experiences, this project captures the excitement of collaborative gameplay.
Tech Stack
Backend
The backend is developed using Node.js and Socket.IO. It handles real-time communication between clients and the server.
Server Events
-
Client Events:
- - Client connects to the server.code
connect - - Client disconnects from the server.code
disconnecting - - Client joins a room.code
joinRoom - - Client leaves a room.code
leaveRoom - - Client starts the game.code
startGame - - Client sends drawing data.code
draw - - Client sends a guess.code
guess - - Client changes game settings.code
changeSettings - - Client selects a word.code
wordSelect
-
Server Events:
- - Server confirms client has joined the room.code
joinedRoom - - Server notifies when a player joins.code
playerJoined - - Server notifies when a player leaves.code
playerLeft - - Server notifies when the game starts.code
gameStarted - - Server notifies when the game ends.code
gameEnded - - Server sends drawing data to clients.code
drawData - - Server notifies when a word is guessed.code
guessed - - Server notifies when a turn ends.code
turnEnded - - Server requests the drawer to choose a word.code
chooseWord - - Server sends the chosen word to clients.code
wordChosen - - Server notifies when settings are changed.code
settingsChanged - - Server notifies when a guess fails.code
guessFail
Room System
Players join a room using a unique room ID. If the drawer takes too long to choose a word, one is automatically assigned. Each turn has a time limit for guessing.
Frontend
The frontend is developed using React with TypeScript and Vite for a fast development experience.
Installation
Clone the repository
bashgit [object Object] https://github.com/DivyanshuLohani/SyncDrawGuess.git [object Object] SyncDrawGuess
Start a redis server
bashdocker run -d -p 6379:6379 redis
Start the server
bash[object Object] server npm install && npm run dev
Start the client
bash[object Object] client npm install && npm run dev
Playing
codehttp://localhost:5173