DRAWABLE / README.md
VISHAL18for4's picture
Update README.md
806f43a verified
|
Raw
History Blame Contribute Delete
2.58 kB
---
title: Drawable
sdk: docker
emoji: ๐Ÿš€
colorFrom: blue
colorTo: pink
---
# ๐ŸŽจ Drawable
> The ultimate Draw & Guess game โ€” skribbl.io clone with superpowers.
## ๐Ÿš€ Features (beyond skribbl.io)
| Feature | Drawable | skribbl.io |
|---|---|---|
| Power-ups (Reveal, Time Warp, Bomb) | โœ… | โŒ |
| Emoji reactions (floating) | โœ… | โŒ |
| Drawing replay after each round | โœ… | โŒ |
| Live score graph timeline | โœ… | โŒ |
| Team mode (Red vs Blue) | โœ… | โŒ |
| Sudden Death (wrong = lose points) | โœ… | โŒ |
| Quick Draw mode (20s) | โœ… | โŒ |
| 10 word categories | โœ… | โŒ |
| Custom words | โœ… | โœ… |
| Achievements system | โœ… | โŒ |
| Streak bonuses | โœ… | โŒ |
| Host kick player | โœ… | โœ… |
| Spectator mode | โœ… | โŒ |
| Undo stroke | โœ… | โŒ |
| Shape tools (line, rect, circle) | โœ… | โŒ |
| Bucket fill tool | โœ… | โœ… |
| Close-guess detection | โœ… | โŒ |
## ๐Ÿ“ File Structure
```
drawable/
โ”œโ”€โ”€ server.js # Node.js + Socket.IO backend
โ”œโ”€โ”€ words.js # 300+ words across 10 categories
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ .dockerignore
โ””โ”€โ”€ public/
โ”œโ”€โ”€ index.html # Lobby
โ”œโ”€โ”€ game.html # Game screen
โ”œโ”€โ”€ css/style.css
โ””โ”€โ”€ js/
โ”œโ”€โ”€ lobby.js
โ””โ”€โ”€ game.js
```
## ๐Ÿ  Run Locally
```bash
npm install
npm start
# Open http://localhost:7860
```
## ๐Ÿค— Deploy to Hugging Face Spaces
1. Go to https://huggingface.co/new-space
2. Name: `drawable` | SDK: **Docker** | Visibility: Public
3. Clone the Space repo:
```bash
git clone https://huggingface.co/spaces/YOUR_USERNAME/drawable
```
4. Copy all project files into the cloned folder
5. Push:
```bash
git add . && git commit -m "init" && git push
```
6. Wait ~2 min for build. Your game is live! ๐ŸŽ‰
> **Note:** Hugging Face Spaces expose port 7860 automatically โ€” no config needed.
## โ“ Do I need a database?
**No!** All game state is stored in-memory on the server.
- Rooms exist while players are connected
- Scores reset each game
- No user accounts needed โ€” just pick a name and play
If you want persistent leaderboards later, add Supabase (free tier) and a `/leaderboard` endpoint.
## ๐ŸŽฎ How Rooms Work
```
Player โ†’ click "Quick Play"
Server: any open room? โ†’ YES โ†’ join it
โ†’ NO โ†’ create new room, wait for others
Player โ†’ click "Create Room" โ†’ get 6-char code โ†’ share with friends
Player โ†’ click "Join Room" โ†’ enter code โ†’ join instantly
```