Draw. Guess. Compete. All in real time.
Features โข Screenshots โข Architecture โข Installation โข Socket Events โข Roadmap
Scribble is a real-time multiplayer drawing and guessing game inspired by Scribbl.io, where one player draws a secret word while everyone else races to guess it before the clock runs out.
The project is built as a deep dive into real-time synchronization, multiplayer game-state management, and Socket.IO event architecture โ going beyond a simple CRUD app into the trickier territory of live, shared, ephemeral state.
|
|
|
- Stroke-based canvas synchronization
- Snapshot sync for late joiners
- WebSocket communication via Socket.IO
- Optimized canvas rendering
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Frontend (React + Tailwind) โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ Socket.IO
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Backend (Node.js + Express) โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ In-Memory Room State
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Game Engine โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Layer | Technologies |
|---|---|
| Frontend | React ยท Vite ยท Tailwind CSS ยท Socket.IO Client |
| Backend | Node.js ยท Express.js ยท Socket.IO ยท CORS |
| Deployment | Netlify (frontend) ยท Render (backend) |
scribble-game/
โ
โโโ client/
โ โโโ src/
โ โ โโโ components/
โ โ โ โโโ CanvasBoard.jsx
โ โ โ โโโ ToolBar.jsx
โ โ โ โโโ ChatBox.jsx
โ โ โ โโโ PlayerList.jsx
โ โ โ โโโ GameBar.jsx
โ โ โ โโโ WordChooser.jsx
โ โ โโโ socket.js
โ โ โโโ App.jsx
โ โ โโโ main.jsx
โ โโโ package.json
โ
โโโ server/
โ โโโ index.js
โ โโโ package.json
โ
โโโ README.md
git clone https://github.com/YOUR_USERNAME/scribble-game.git
cd scribble-gamecd server
npm installCreate a .env file:
PORT=3001Run the server:
npm startServer runs at
http://localhost:3001
Open a new terminal:
cd client
npm installCreate a .env file:
VITE_BACKEND_URL=http://localhost:3001Run the client:
npm run devFrontend runs at
http://localhost:5173
| Frontend | Backend |
|---|---|
VITE_BACKEND_URL=https://your-render-backend.onrender.com |
PORT=3001 |
|
Client โ Server |
Server โ Client |
Create Room
โ
โผ
Invite Players
โ
โผ
Drawer Chooses Word
โ
โผ
Drawing Starts โโโโโโโบ Players Guess
โ โ
โผ โ
Timer Ends / Everyone Guesses โ
โ
โผ
Drawer Rotates โโโบ Next Round
โ
โผ
Game Ends โโโบ Winner Announced
- โ Real-time multiplayer synchronization
- โ Canvas state management
- โ Undo/redo synchronization
- โ Late-join synchronization
- โ Drawer rotation logic
- โ Role-based gameplay permissions
- โ Socket event architecture
- โ Room state management
- Avatar system
- Spectator mode
- AI word generation
- Private rooms with passwords
- Drawing replay system
- Mobile responsive UI
- Persistent leaderboard
- Redis for horizontal scaling
- Docker deployment
- Kubernetes support
Contributions are welcome! To get started:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
Dev Jain
โญ If you liked this project, consider giving it a star! โญ



