A real-time multiplayer drawing battle game. Two teams draw simultaneously and try to guess each other's words.
- Real-time drawing sync between players
- Team vs team battle (Red vs Blue)
- Timer-based rounds with scoring
- Delayed Guessing Mode — guessing only opens after both teams submit their drawings
- Drawing tools: pen, eraser, color palette, brush size
drawbattle/
├── server/ ← Socket.io backend (deploy to Railway)
└── client/ ← Next.js frontend (deploy to Vercel)
- Go to railway.app and sign up (free)
- Click New Project → Deploy from GitHub repo
- Push the
server/folder to a GitHub repo (or use Railway's CLI) - Set the root directory to
server - Railway auto-detects Node.js and runs
npm start - Once deployed, copy your Railway URL — it looks like:
https://drawbattle-server-production.up.railway.app
Alternative: Deploy server manually via CLI
npm install -g @railway/cli
cd server
railway login
railway init
railway up- Push the
client/folder to a GitHub repo - Go to vercel.com and import the repo
- Set the root directory to
client - Add this Environment Variable in Vercel project settings:
(Replace with your actual Railway URL from Step 1)
NEXT_PUBLIC_SOCKET_URL=https://your-railway-url.up.railway.app - Click Deploy!
cd server
npm install
npm run dev # starts on port 3001cd client
npm install
npm run dev # starts on port 3000The client auto-connects to http://localhost:3001 when NEXT_PUBLIC_SOCKET_URL is not set.
- Share the Vercel URL with your friends
- Everyone enters a name, a room code (make one up), and picks a team
- The host configures settings (rounds, delayed guessing mode) and hits Start Game
- Each team sees their own secret word and draws simultaneously
- In normal mode: teammates guess in real-time while drawing happens
- In Delayed Guessing Mode: guessing only opens after both teams submit/timer ends
- Teams score points by correctly guessing the other team's word
- Most points after all rounds wins!