Falling Candy - Match 3 Puzzle Game

Seele01-Flash
By
Falling Candy is a delightful match 3 puzzle game that combines Tetris-style gameplay with colorful candy matching. Stack falling candies and create rows or columns of 3+ matching pieces to score points across 25 challenging levels.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Falling Candy". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Camera & Perspective**: Use an **Orthographic Camera** to simulate a 2D puzzle feel within a 3D space. The view should be fixed, framing the game board centrally. * **Candy Models (The "Blocks")**: * Create 3 distinct candy types using `THREE.SphereGeometry` (low-poly, approx 16-32 segments to save performance). * **Material**: Use `MeshPhysicalMaterial` to achieve a glossy, sugary look (high roughness, clearcoat enabled). * **Textures/Patterns**: 1. **Cyan**: Procedural texture with white swirl/wave patterns. 2. **Orange**: Solid, vibrant amber color, high gloss (gumdrop style). 3. **Pink**: White and pink diagonal stripes (peppermint style). * **Background**: A static 2D plane behind the board featuring a "Witch's Home" interior—warm colors, blurry wooden shelves, and magical particle hints (purple/gold ambient dust). * **Game Board**: A semi-transparent, vertical rectangular container (grid size approx 6 columns x 12 rows). Use a faint grid overlay. * **Performance**: Use **InstancedMesh** for the candies if possible, or merge geometries for static settled blocks to reduce draw calls on mobile devices. ### 2. Audio Requirements * **BGM**: A whimsical, relaxing track featuring celesta, pizzicato strings, and light bells. It should loop seamlessly and evoke a "cute magic" vibe. * **Sound Effects (SFX)**: * *Rotation/Move*: Soft "whoosh" or clicking sound. * *Landing*: A soft, non-abrasive "thud" or "clack" (plastic/hard candy collision). * *Matching/Clear*: A magical, high-pitched "chime" or "pop" sound. * *Game Over*: A descending magical scale (harp or synth). ### 3. Gameplay Loop * **Spawning**: Candies fall from the top in **pairs** (like Puyo Puyo) or small clusters. They fall as a connected unit. * **Gravity & Separation Logic**: This is the core mechanic. When a falling unit hits the bottom or another block: * If one half of the pair is supported but the other has empty space below it, the unsupported candy must **break apart** and continue falling until it hits a solid surface. * **Matching Logic**: * Check for matches *after* all candies have settled. * **Rule**: Connect 3 or more candies of the same color horizontally or vertically. * **Reaction**: Matched candies scale down to 0 and disappear. * **Chain Reaction**: Remaining candies above must fall to fill the gaps (Combo potential). * **Win/Loss**: * **Score**: +10 points per candy cleared. +Bonus for combos. * **Loss**: If the stack reaches the top spawn point. * **Level Up**: Reach a target score to clear the board or speed up the fall rate. ### 4. Mobile Controls & Interaction * **Screen Orientation**: Portrait mode preferred (vertical stacking). * **Control Scheme (Touch Gestures)**: * **Swipe Left/Right**: Move the falling pair horizontally. * **Tap**: Rotate the pair 90 degrees. * **Swipe Down**: Soft drop (increases fall speed). * **Swipe Down (Hold)**: Hard drop (instant placement). * **UI Layout**: * **Main Area**: Center screen. * **HUD**: Located at the top or top-right. display "Score", "Level", and "Next Piece" preview. * **Touch Feedback**: Trigger `window.navigator.vibrate(50)` on block landing and `vibrate(100)` on match clear for haptic feedback. * **Buttons (Fallback)**: If gestures are too complex, implement large, semi-transparent UI buttons at the bottom: [Left] [Rotate] [Right] [Down]. These must have a minimum hit area of 44x44px. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Falling Candy

Falling Candy is an enchanting match 3 puzzle game that puts a sweet twist on classic block-stacking gameplay. With a stellar 4.2/5 rating, this charming game combines the strategic elements of Tetris with the satisfying mechanics of candy matching games. Set in a whimsical witch's home with bright, colorful graphics, players guide falling candies to create matching combinations and progress through increasingly challenging levels.

Core Features

Unique Tetris-Candy Hybrid Gameplay

Unlike traditional Tetris games with boring blocks, Falling Candy features adorable, colorful candies that fall from the sky. The candies may fall stuck together but cleverly separate to fill open spaces, creating dynamic puzzle-solving opportunities.

25 Progressive Levels

The game offers 25 carefully crafted levels that gradually increase in difficulty. Each level presents new challenges while maintaining the core match 3 mechanics that make the game so addictive.

Physics-Based Candy Movement

Advanced physics simulation ensures realistic candy behavior as pieces fall, separate, and stack. This adds an extra layer of strategy as players must anticipate how candies will settle.

Charming Visual Design

The game features a delightful witch-themed background with vibrant colors and smooth animations. A friendly witch character waves her wand as candies fall, adding personality to the gameplay experience.

Instant Browser Play

Built with HTML5 technology, the game runs smoothly in any modern web browser without downloads or installations. Perfect for quick gaming sessions on desktop or mobile devices.

Game Mechanics

Match 3+ System

Your primary objective is creating rows or columns of at least three matching candies. When you successfully match candies, they disappear from the board, earning you points and creating space for new pieces.

Strategic Stacking

Like Tetris, you must carefully position falling candies to avoid filling up the playing field. However, the match 3 element adds a puzzle-solving dimension that requires planning and foresight.

Progressive Scoring

Each successful match contributes to your overall score and level progression. The game tracks your performance and allows you to compete on leaderboards with other players worldwide.

Controls and Gameplay

Simple Touch Controls

  • Left/Right Navigation : Move falling candy pieces horizontally across the playing field
  • Drop Control : Accelerate candy pieces downward for precise placement
  • Touch-Friendly Interface : Optimized for both desktop mouse controls and mobile touch screens

Visual Feedback System

The game provides clear visual indicators showing: - Upcoming candy pieces in the preview window - Current level and score information - Goal requirements for level completion - Match highlights when three or more candies align

Why Play Falling Candy

Perfect for All Skill Levels

Tagged as an "Easy" game, Falling Candy welcomes beginners while offering enough strategic depth to challenge experienced puzzle game fans. The learning curve is gentle, but mastering all 25 levels requires skill and planning.

Brain Training Benefits

As a brain teaser, the game exercises spatial reasoning, pattern recognition, and strategic thinking. The combination of real-time action and puzzle-solving makes it an excellent mental workout.

Relaxing Yet Engaging

The cute candy theme and soothing witch's cottage setting create a relaxing atmosphere, while the match 3 challenges keep your mind engaged. It's perfect for stress relief and casual entertainment.

Mobile-Optimized Experience

Designed for modern mobile devices and tablets, you can enjoy Falling Candy anywhere. The responsive controls and clear graphics ensure smooth gameplay across all screen sizes.

Competitive Elements

With leaderboard integration, you can compare your scores with players worldwide. Complete all 25 levels and submit your score to see how you rank among other candy-matching enthusiasts!

Frequently Asked Questions (FAQ)