A customizable face smasher game where users upload their own image and choose a tool to smash it!
- Upload any image as the smash target (or use default emoji face)
- Generate shareable links to play the game
- Multiple arena themes: Candy, Neon, SUST Gate, Tong
- Tool options: Punch, Slap, Hammer, Spank, Rose
- Realistic bruise effects with multiple layers
- Screen shake on hit
- Sound effects
- Mobile responsive with touch support
- Commentary system with tool-specific phrases
- Previous games history
- Open
index.htmlin a browser - Upload a face photo OR skip to use default emoji
- Choose an arena background (optional)
- Pick your smash tool
- Click "Generate Smash Link" to share
- Open the shared link in a browser
- Click/tap on the face to smash it!
- Use the tool toggle to switch tools
- Commentary can be toggled ON/OFF
Simply open index.html in any modern browser. No server required!
For link generation, copy js/config.example.js to js/config.js and add your Firebase config.
- Vanilla JavaScript (ES6 modules)
- HTML5 Canvas
- Firebase Realtime Database
- No build tools required
This project is created for learning and fun purposes only. We are not responsible for any misuse of this software.
face-smasher/
├── index.html # Creator page (create & share games)
├── play.html # Player page (play shared games)
├── style.css # Styling
├── js/
│ ├── creator.js # Creator page logic
│ ├── play.js # Player page logic
│ ├── firebase.js # Firebase database
│ ├── face.js # Face/image handling
│ ├── tool.js # Tool loading
│ ├── marks.js # Bruise effects
│ ├── game.js # Main game loop
│ ├── audio.js # Sound effects
│ ├── config.js # Firebase config (gitignored)
│ ├── config.example.js # Config template
│ ├── components/ # UI components
│ │ ├── game-engine.js
│ │ ├── image-processor.js
│ │ ├── game-history.js
│ │ └── share-links.js
│ ├── managers/ # Game managers
│ │ ├── gameSessionManager.js
│ │ ├── inputManager.js
│ │ ├── controlManager.js
│ │ ├── runtimeManager.js
│ │ ├── arenaManager.js
│ │ └── commentaryManager.js
│ ├── arena/ # Arena themes
│ │ └── arena.js
│ └── commentary/ # Commentary engine
│ ├── commentary.js
│ ├── commentaryText.js
│ └── config.js
├── tools/ # Tool images
│ ├── punch.png
│ ├── slap.png
│ ├── hammer.png
│ └── whip-icon.svg
└── firebase-rules.json # Firebase rules (review before deploy)
- Clone the repository
- Create a feature branch
- Make your changes
- Test locally
- Submit a pull request
This project uses Husky hooks to protect the main branch:
- Direct commits to
mainare blocked (.husky/pre-commit) - Direct pushes to
mainare blocked (.husky/pre-push)
Work on a feature branch and open a pull request to merge into main.
MIT