| Link | Status |
|---|---|
| Live Demo | ๐ข Online |
| GitHub Repo | View Code |
| Report Issue | Bug Reports |
- ๐ฎ Real-time Multiplayer - Join rooms, play with others instantly
- ๐ฌ Live Chat - Text messaging in-game
- ๐น WebRTC Video Chat - Peer-to-peer video calls
- ๐จ Retro UI - Pixel art themed interface
- ๐ฑ Responsive - Works on desktop and mobile
- โก Fast - <2s load time
Frontend: Phaser 3 | Socket.IO | WebRTC | Vanilla JS
Backend: Node.js | Express | Socket.IO
# Clone repo
git clone https://github.com/kanhadewangan/town.git
cd town
# Install
npm install
# Run backend
npm start
# Run frontend (new terminal)
npx http-server -p 3000Open: http://localhost:3000
- Enter room name (or leave blank for random)
- Click Create/Join to start
- Use arrow keys to move
- Click ๐ฌ for chat
- Click ๐น for video call
| Key | Action |
|---|---|
| โโโโ | Move |
| ๐ฌ | Chat |
| ๐น | Video |
| Enter | Send msg |
git push origin main
# Connect to Vercel โ Auto deployLive at: https://syncarena.onrender.com
New Web Service โ Connect GitHub
Build: npm install
Start: node backend/index.js
Env: PORT=8080
Client โ Server
joinRoom- Enter roomplayerMove- Send positionchatMessage- Send messagewebrtc-offer- Video offerwebrtc-answer- Video answerwebrtc-ice-candidate- NAT traversal
Server โ Client
playerJoined- You joinednewPlayer- Player joinedplayerMoved- Player movedplayerLeft- Player leftchatMessage- New messageannounce- Join/leave notify
โ
Chrome 80+
โ
Firefox 75+
โ
Safari 14+
โ
Edge 80+
โ
Mobile (iOS/Android)
- Code: ~2000 lines
- Size: 60 KB (frontend)
- Assets: 500 KB
- Max Players: 999/room
- Latency: <100ms typical
Socket Won't Connect
- Check backend URL in
scene.js - Verify CORS in
backend/index.js
Video Not Working
- Allow camera/mic permissions
- Check browser support (Chrome/Firefox/Safari)
Lag Issues
- Close other apps
- Check bandwidth
- Reduce video quality
town/
โโโ index.html # Room selection & UI
โโโ styles.css # Styling & animations
โโโ main.js # Phaser config
โโโ scene.js # Game logic (1500 lines)
โโโ backend/index.js # Server
โโโ public/ # Assets
โโโ readme.md # This file
git checkout -b feature/your-feature
git commit -m "Add feature"
git push origin feature/your-feature
# Create Pull RequestMIT - Free to use
- Issues: GitHub Issues
- Email: workkanhadewangan@gmail.com
Made with โค๏ธ by Kanha Dewangan
V1.0.0 โข December 2025
