Fruit Ninja - Classic Fruit Slicing Game

Seele01-Flash
By
Fruit Ninja is the ultimate fruit-slicing arcade game where precision meets fun. Swipe through flying fruits, build epic combos, and avoid deadly bombs in this addictive classic that's perfect for quick gaming sessions.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Fruit Slicing Arcade Action**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Vibrant, semi-realistic arcade style. Use a warm, wood-grain texture (Dojo style) for the background plane to ensure colorful fruits pop against it. * **Fruit Models:** Create low-poly 3D primitives (Sphere/Capsule) textured to look like Watermelons, Apples, and Bananas. * **Optimization Technique:** Do *not* use real-time CSG (Constructive Solid Geometry) for slicing, as it is too heavy for mobile browsers. Instead, use a **Pre-Fractured Asset Swap** method: When a "Whole Fruit" is hit, hide it and instantly spawn two "Fruit Halves" at the same position with opposing velocity. * **The Bomb:** A distinct, dark spherical model with a glowing red fuse/spark particle effect to differentiate it from fruits. * **VFX:** * **Blade Trail:** A glowing white/blue ribbon mesh that follows the cursor/touch path, fading out over time (approx 0.3s lifespan). * **Splatter:** 2D sprites of juice splashes appearing on the background wall when fruit is cut. * **Particles:** Small droplets/chunks emitting from the slice point. ### 2. Audio Requirements * **BGM:** Upbeat, traditional Japanese-inspired track featuring Koto or Flute, with a fast tempo to maintain tension. * **Sound Effects (SFX):** * **Swipe:** A sharp "Whoosh" or air-cutting sound when the player swipes rapidly. * **Impact:** Wet, squishy "Splat" sounds for slicing fruit. * **Bomb:** A sizzling fuse sound (proximity loop) and a loud explosion for Game Over. * **Combo:** A harmonious chime or escalating pitch when 3+ fruits are sliced in a single stroke. ### 3. Gameplay Loop * **Spawning Mechanics:** "Fruits" and "Bombs" are instantiated at the bottom of the screen (y < -5) and thrown upwards with a random X/Y velocity and random rotational torque (simulating a toss). Gravity pulls them back down. * **The Slice:** The player creates a "Cut Line" by swiping. If the line intersects a fruit's collider: 1. The fruit is destroyed (swapped for halves). 2. Score increases by 1. 3. If 3+ fruits are hit in one continuous swipe (within <200ms), trigger "COMBO" text and award double points. * **Fail States:** * **Bomb Hit:** Slicing a bomb triggers an immediate explosion VFX and a "Game Over" screen. * **Missed Fruit:** If a whole fruit falls off the bottom of the screen without being sliced, the player loses a "Life" (start with 3 Lives). * **Progression:** As time passes, spawn rates increase, and fruits are thrown faster/higher. ### 4. Mobile Controls & Interaction * **Touch Input:** Use `touchmove` and `mousemove` events to update the "Blade" position. The collision detection should be based on Raycasting from the 2D screen coordinates to the 3D world plane. * **Sensitivity:** The blade trail must have zero perceived latency. The swipe must register only if the velocity is above a certain threshold (preventing accidental clicks from cutting). * **Orientation:** Set the camera to a fixed Orthographic perspective (looking straight at the "wall"). The game should be responsive, but optimize the Field of View (FOV) for **Landscape** orientation if possible, or scale the spawn area narrower for Portrait. * **UI/UX:** * Score display in the top-left (large, legible font). * "Lives" (X icons) in the top-right. * Restart button must be large (min 44x44px) and placed away from the swipe zone to prevent accidental touches. * **Haptic Feedback:** Trigger `navigator.vibrate(50)` on every successful fruit slice for tactile satisfaction. ### 5. Technical Implementation Note * Use `requestAnimationFrame` for the game loop. * Implement an **Object Pool** system for fruits, halves, and particles to prevent Garbage Collection stutters on mobile devices. Do not `new` and `delete` objects repeatedly; reuse them. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Fruit Ninja is the iconic arcade game that revolutionized mobile gaming with its simple yet addictive fruit-slicing gameplay. In this thrilling adventure, you become a skilled ninja warrior armed with razor-sharp reflexes, tasked with slicing through a colorful array of flying fruits while avoiding dangerous bombs that could end your run instantly.

The game combines fast-paced action with strategic thinking, as you must carefully time your swipes to maximize points while staying alert for explosive threats. With its vibrant graphics, satisfying slicing mechanics, and competitive scoring system, Fruit Ninja offers endless entertainment for players of all ages.

Core Features

Addictive Fruit Slicing Action

Experience the satisfaction of perfectly timed swipes as you slice through juicy fruits including apples, pears, coconuts, bananas, watermelons, and many more. Each fruit offers a unique slicing experience with realistic physics and splashing effects.

Combo System & High Scores

Build impressive combos by slicing multiple fruits in a single swipe. The more fruits you cut simultaneously, the higher your score multiplier becomes. Master the art of combo building to achieve legendary high scores and compete with players worldwide.

Critical Strike Mechanics

Time your slices perfectly to achieve critical strikes, which award massive bonus points. Strategic swiping and precise timing can dramatically boost your final score, making every game session a potential record-breaker.

Bomb Avoidance Challenge

Stay sharp and avoid the deadly bombs mixed in with the fruits. One accidental slice of a bomb will instantly end your run, adding an element of risk and excitement to every swipe. The tension builds as bomb frequency increases with higher scores.

Cross-Platform Gaming

Enjoy seamless gameplay across all devices. Whether you're on a desktop computer, smartphone, or tablet, Fruit Ninja adapts perfectly to your screen size and input method for optimal gaming experience.

Gameplay Mechanics

The core gameplay revolves around precision timing and quick reflexes. Fruits are launched into the air from the bottom of the screen, and you must slice them before they fall off the screen. Missing three fruits will end your session, so accuracy is crucial.

Different fruits have varying point values, with some rare fruits offering bonus scores. The game features multiple modes and challenges that keep the experience fresh and engaging, from classic arcade mode to time-limited challenges.

Operation Guide

Desktop Controls

  • Mouse : Click and drag across fruits to slice them
  • Swiping Motion : Move your mouse in fluid slicing motions for optimal results
  • Precision Clicks : Use precise movements for critical strikes and combo building

Mobile Controls

  • Touch Screen : Simply swipe your finger across the screen to slice fruits
  • Multi-touch : Use multiple fingers for complex slicing patterns
  • Gesture Control : Natural swiping motions provide intuitive gameplay

Pro Tips for High Scores

  • Focus on slicing multiple fruits in single swipes to build combos
  • Watch for critical strike opportunities (perfect timing moments)
  • Avoid hasty swipes near bombs - patience leads to higher scores
  • Practice smooth, controlled movements rather than frantic swiping

Why Play Fruit Ninja

Perfect for All Ages : The simple concept makes it accessible to children while the scoring system provides depth for competitive players. It's an ideal family-friendly game that everyone can enjoy.

Quick Gaming Sessions : Each round lasts just a few minutes, making it perfect for short breaks, commutes, or whenever you need a quick gaming fix.

Skill Development : Improves hand-eye coordination, reaction time, and strategic thinking. The game rewards both speed and precision, helping develop valuable motor skills.

Completely Free : Enjoy the full Fruit Ninja experience without any cost. No hidden fees, no pay-to-win mechanics - just pure gaming fun accessible to everyone.

No Downloads Required : Play instantly in your browser without installing anything. The game loads quickly and runs smoothly on any modern device.

Competitive Element : Challenge yourself to beat the world record of 37,144 points, or simply try to improve your personal best. The competitive aspect keeps you coming back for 'just one more game.'

Whether you're a casual gamer looking for fun or a competitive player aiming for high scores, Fruit Ninja delivers an engaging experience that has captivated millions of players worldwide. The combination of simple controls, satisfying gameplay, and endless replayability makes it a timeless classic that never gets old.

Frequently Asked Questions (FAQ)