A modern reimagining of the classic Karel robot game โ now playable with hand gestures using your webcam! ๐ Built with HTML, CSS, and JavaScript, powered by MediaPipe Hands for real-time gesture recognition.
- ๐ Hand Gesture Commands via webcam (powered by MediaPipe Hands)
- โจ๏ธ Keyboard Controls for traditional gameplay
- ๐จ Responsive, animated UI with custom CSS
- ๐ Beeper pickup/drop system
- ๐ฎ Grid-based movement and real-time direction feedback
| Gesture | Action |
|---|---|
| ๐ Point up | move() |
| โ Open hand (left) | turnLeft() |
| โ Open hand (right) | turnRight() |
| ๐ Thumbs up | pickBeeper() |
| โ Fist | putBeeper() |
๐ค Tip: Hold your hand in front of the webcam and perform one gesture at a time. Gesture input is debounced to prevent repeated execution.
| Key | Action |
|---|---|
W / โ |
move() |
A / โ |
turnLeft() |
D / โ |
turnRight() |
S / โ |
pickBeeper() |
Space |
putBeeper() |
can go to https://karel-cv.vercel.app or :
-
Clone the Repository
git clone https://github.com/yourusername/karel-gesture-game.git cd karel-gesture-game -
Open
index.htmlin a Browserโ Preferably use Chrome or Edge โ MediaPipe works best there.
-
Click "Enable Gesture Control"
- Allow camera access when prompted
- Show your hand in front of the camera
- Start issuing gestures and have fun!
- HTML5/CSS3 โ modern responsive UI
- JavaScript โ game logic & gesture handling
- MediaPipe Hands โ real-time hand tracking
- CameraUtils & DrawingUtils โ WebRTC + overlay tools
/
โโโ index.html # Main game file
โโโ README.md # You're reading it!
- Only detects one hand at a time
- Gesture recognition depends on lighting & hand visibility
This app requires webcam access for gesture detection. No camera data is stored or sent anywhere โ everything runs locally in the browser.
- Hand tracking: MediaPipe by Google
- Inspired by Karel the Robot (Stanford CS Education)
MIT License โ feel free to modify, share, and improve!