Skip to content

SIMITClub/karel-cv

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Karel Robot Game โ€” Hand Gesture Control

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.


๐Ÿ•น๏ธ Features

  • ๐Ÿ‘† 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

โœ‹ Supported Hand Gestures

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.


๐Ÿง  Keyboard Shortcuts

Key Action
W / โ†‘ move()
A / โ† turnLeft()
D / โ†’ turnRight()
S / โ†“ pickBeeper()
Space putBeeper()

๐Ÿ“ฆ How to Use

can go to https://karel-cv.vercel.app or :

  1. Clone the Repository

    git clone https://github.com/yourusername/karel-gesture-game.git
    cd karel-gesture-game
  2. Open index.html in a Browser

    โœ… Preferably use Chrome or Edge โ€” MediaPipe works best there.

  3. Click "Enable Gesture Control"

    • Allow camera access when prompted
    • Show your hand in front of the camera
    • Start issuing gestures and have fun!

๐Ÿงช Technologies Used

  • HTML5/CSS3 โ€” modern responsive UI
  • JavaScript โ€” game logic & gesture handling
  • MediaPipe Hands โ€” real-time hand tracking
  • CameraUtils & DrawingUtils โ€” WebRTC + overlay tools

๐Ÿ“ Folder Structure

/
โ”œโ”€โ”€ index.html      # Main game file
โ”œโ”€โ”€ README.md       # You're reading it!

๐Ÿšง Known Limitations

  • Only detects one hand at a time
  • Gesture recognition depends on lighting & hand visibility

๐Ÿ“ธ Permissions

This app requires webcam access for gesture detection. No camera data is stored or sent anywhere โ€” everything runs locally in the browser.


๐Ÿ™Œ Credits


๐Ÿงฉ License

MIT License โ€” feel free to modify, share, and improve!


Releases

No releases published

Packages

No packages published

Languages

  • HTML 100.0%