https://github.com/no-tone/fruit-slicer
ML5 game that uses the camera to force the player to exercise by trying to grab as many fruits as he can as the time goes on, uses the p5.js framework.
https://github.com/no-tone/fruit-slicer
camera github-pages ml5js p5js posenet
Last synced: about 1 month ago
JSON representation
ML5 game that uses the camera to force the player to exercise by trying to grab as many fruits as he can as the time goes on, uses the p5.js framework.
- Host: GitHub
- URL: https://github.com/no-tone/fruit-slicer
- Owner: no-tone
- Created: 2025-02-27T10:56:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-31T00:09:19.000Z (4 months ago)
- Last Synced: 2026-04-19T21:21:54.794Z (about 2 months ago)
- Topics: camera, github-pages, ml5js, p5js, posenet
- Language: JavaScript
- Homepage: https://gh.no-tone.com/fruit-slicer/
- Size: 8.16 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fruit Slicer 🍎
A gesture-controlled fruit catching game built with p5.js and ml5.js where players use hand movements to grab falling fruits and place them in a basket. Test your reflexes and coordination in this engaging interactive experience!
You can now also use your voice to switch between screens. Only works in portuguese.
## 📍 Website
- Play the game at: https://gh.no-tone.com/fruit-slicer
## 🌟 Features
- **Gesture Recognition**: Advanced hand tracking using ml5.js
- **Dynamic Gameplay**: Catch falling fruits with natural hand movements
- **Difficulty Levels**: Three challenge levels (Easy, Medium, Hard) with adjustable parameters
- **Interactive UI**: Intuitive menu system with visual feedback
- **Progress System**: Local leaderboard that tracks your best scores with difficulty indicators
- **Audio System**: Dynamic sound effects and background music with adjustable volumes
- **Pause System**: Fully functional pause menu activated with ESC key
## 🎯 Gameplay
- Use your hand to catch falling fruits (camera required)
- Close your hand to grab a fruit
- Open your hand over the basket to release and score
- Meet your quota before the timer runs out
- Beat your previous high scores
- Adjust difficulty to match your skill level
## 🛠️ Technical Features
- Built with p5.js for rendering and ml5.js for hand tracking
- Real-time hand gesture recognition
- Local storage for leaderboards and settings
- Custom audio management system with volume controls
- Responsive UI design with visual feedback
- State management for different game screens
## 🎨 Game Screens
- **Loading Screen**: Handles initial asset loading
- **Main Menu**: Game options and navigation
- **Instructions Screen**: Explains game controls
- **Objectives Screen**: Shows current goals based on difficulty
- **Options Screen**: Customize game settings
- **Gameplay Screen**: Main interactive environment
- **Pause Screen**: In-game pause menu
- **Game Over/Win Screens**: End game states with leaderboard display
## 🎵 Audio
The game features multiple audio elements:
- Menu background music
- Gameplay background music
- Sound effects for interactions (grab, drop, score)
- Win and lose sound effects
- Button click sounds
- Pause/resume sounds
## ⚙️ Requirements
- Modern browser with JavaScript enabled
- Webcam access (for hand tracking)
- p5.js and ml5.js libraries
- p5.sound library for audio features
## 🎮 Controls
- **Hand Gestures**: Close hand to grab, open hand to release
- **ESC Key**: Pause/resume game
- **Mouse**: Navigate menus and UI elements
## 🔧 Configuration
The game includes several configurable options:
- Difficulty levels (Easy, Medium, Hard)
- Adjustable music and sound effect volumes
- Leaderboard management
## 🌐 Browser Support
Tested and working on:
- Chrome (recommended)
- Firefox
- Edge
## 📱 Access Requirements
- Desktop or laptop with webcam
- Good lighting conditions for optimal hand tracking
- Browser permissions for camera access
## 🙋♂️ Authors
no-tone/cyzuko - 2025