🍉 Fruit Ninja Game 🗡️
A Unity-based fruit slicing game inspired by the classic Fruit Ninja, where players slice fruits while avoiding bombs using smooth mouse-based controls.
✨ Inspiration
The project draws inspiration from the beloved mobile game Fruit Ninja, aiming to recreate the satisfying mechanics of slicing virtual fruits while adding our own unique touch to the gameplay experience.
🎮 What it does
- 🎯 Players control a blade using mouse movements to slice through various fruits
- 🚀 Fruits spawn randomly from the bottom of the screen with varying trajectories
- ⭐ Successfully slicing fruits awards points
- 💣 Bombs appear occasionally as hazards that end the game if hit
- 💦 Features particle effects for juice splashes when fruits are cut
- 📊 Includes a scoring system to track player performance
🛠️ How we built it
The game was built using Unity Game Engine and C#, implementing several key components:
🗡️ Blade System
- Mouse-controlled blade movement with trail effects
- Velocity-based slice detection
- Smooth motion tracking for realistic slicing mechanics
🍎 Fruit System
- Dynamic fruit spawning with randomized trajectories
- Physics-based movement using Unity's Rigidbody system
- Slice detection and fruit splitting animations
- Particle effects for visual feedback
⚙️ Game Management
- Score tracking system
- Bomb hazards with game-over mechanics
- Dynamic difficulty scaling through spawn rates
💻 Technical Implementation
The project consists of four main C# scripts:
🗡️ Blade.cs: Handles player input and blade mechanics
- Mouse position tracking
- Slice velocity calculations
- Trail renderer for visual feedback
- Collision detection for slicing
🍊 Fruit.cs: Manages fruit behavior
- Split animation handling
- Physics-based movements
- Particle effect triggers
- Point scoring system
🎲 Spawner.cs: Controls object spawning
- Random fruit selection and spawning
- Bomb spawning with probability control
- Force and trajectory calculations
- Spawn timing management
💣 Bomb.cs: Implements hazard mechanics
- Collision detection with player
- Game over trigger system
🚧 Challenges we ran into
- Implementing realistic fruit slicing physics
- Ensuring smooth blade movement and accurate collision detection
- Balancing game difficulty through spawn rates and force parameters
- Optimizing performance with multiple physics objects and particle effects
🏆 Accomplishments that we're proud of
- Smooth and responsive blade controls
- Realistic fruit slicing mechanics with physics-based responses
- Engaging gameplay loop with risk-reward mechanics
- Polished visual effects including trail renderers and juice particles
📚 What we learned
- Advanced Unity physics system implementation
- Particle system optimization
- Game balance and difficulty scaling
- Mouse input handling and smooth motion tracking
- Object pooling and performance optimization
🚀 What's next
Future enhancements planned:
- 🍓 Additional fruit types with unique behaviors
- ⚡ Power-up systems
- 🎯 Multiple game modes
- 🏆 High score system with online leaderboard
- ✨ Enhanced visual effects and animations
- 🎵 Sound effects and background music
- 📱 Mobile touch input support
Built With
- c#
- game
Log in or sign up for Devpost to join the conversation.