Mahjong Sweet Connection

Seele01-Flash
By
Mahjong Sweet Connection is an addictive candy-themed matching puzzle game that combines classic mahjong mechanics with colorful sweets. Match identical candies, clear the board, and race against time in this delightful browser-based puzzle experience.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Mahjong Sweet Connection**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: 2.5D Isometric or high-angle Orthographic view. The aesthetic should be "Glossy Cartoon," mimicking high-quality candy sprites but using 3D primitives. * **Tile Models**: Create a base "Biscuit" mesh (rounded square, beige color). On top of each biscuit, procedurally generate different simple 3D candy toppings: * *Chocolate Swirl*: A brown cube with a lighter squiggle texture. * *Jelly Bean*: A deformed green capsule with high specularity (shiny). * *Lollipop*: A yellow sphere with a rim. * *Hard Candy*: A purple/pink cylinder with a swirl pattern. * **Materials**: Use `MeshStandardMaterial` with high `roughness: 0.2` and `metalness: 0.1` to make the candies look shiny and appetizing. * **Background**: A simple plane geometry with a repeating purple plaid/checkerboard texture to match the reference screenshot. * **Visual Effects**: * **Selection**: When a tile is tapped, it should scale up slightly (1.2x) and emit a soft glow. * **Connection Line**: When two tiles match, draw a dynamic bright green line (using `LineSegments` or a thick tube) connecting them before they disappear. * **Destruction**: Simple particle explosion (confetti or crumbs) when tiles are removed. ### 2. Audio Requirements * **BGM**: A cozy, upbeat, and looping track using marimbas, flutes, and soft synths. It should feel like a "Sunday afternoon tea party." * **Sound Effects (SFX)**: * *Select*: A soft "pop" or bubble sound. * *Match Success*: A satisfying "crunch" followed by a magical chime. * *Invalid Move*: A dull "thud" or a gentle "buzzer." * *Win*: A fanfare of bells. * *Timer Warning*: A ticking clock sound when the last 10 seconds remain. ### 3. Gameplay Loop * **Grid System**: Generate a grid of tiles (e.g., 6x8 for mobile portrait, 10x6 for landscape). Ensure the total number of tiles is even. * **Matching Logic (Connect-2/Onet)**: * The player selects Tile A, then Tile B. * If Tile A and Tile B share the same candy type, the game checks for a valid path. * **Pathfinding Rule**: A path can be drawn between the two tiles using horizontal or vertical lines. The path cannot cross other existing tiles. The path is allowed a maximum of **two 90-degree turns** (3 line segments max). * **Win Condition**: Clear all tiles from the board before the time runs out. * **Lose Condition**: Time reaches zero. * **Score**: +100 points per match. Bonus points for speed. ### 4. Mobile Controls & Interaction * **Camera**: Fixed camera. Implement `OrbitControls` but lock rotation and zoom to keep the view static and optimized for the grid. * **Touch Input**: Use `Raycaster` for precision touching. * The hit area for each tile should be slightly larger than the visual mesh to ensure "fat finger" friendliness. * **Feedback**: * **Haptics**: Trigger a light vibration (`navigator.vibrate(50)`) on a successful match. * **Visual Error**: If an invalid match is attempted, shake the two selected tiles horizontally (sine wave animation) to indicate "No." * **UI Layout**: * **Top Bar**: Display "Score" (Left) and a visual "Time Bar" (Right) that shrinks as time passes. * **Responsive**: The grid must automatically scale and center itself based on `window.innerWidth` to ensure no tiles are cut off on different aspect ratios. * **Pause/Menu**: A large (min 44px) pause button in the top-right corner. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Mahjong Sweet Connection is a delightful matching puzzle game that puts a sweet twist on classic mahjong gameplay. Instead of traditional tiles, you'll be matching colorful candies including bonbons, jelly beans, mints, lollipops, and other delicious treats. This engaging puzzle game challenges players to clear the entire board by connecting identical candy pieces while racing against the clock.

The game features vibrant, eye-catching graphics with a purple-themed background and beautifully designed candy pieces that make each matching session visually satisfying. Perfect for puzzle enthusiasts and casual gamers alike, this browser-based game offers instant entertainment without any downloads required.

Core Features

Sweet Candy Variety

The game showcases an impressive collection of candy types to match: - Colorful bonbons with swirled patterns - Glossy jelly beans in multiple colors - Fresh mints with cooling designs - Spiral lollipops in vibrant hues - Chocolate treats with rich textures - Rainbow candies with gradient effects

Time-Based Challenge System

Race against time to achieve the highest scores possible. The game features: - Quick-paced gameplay that keeps you engaged - High score leaderboard to track your best performances - Progressive difficulty as you advance through levels - Speed bonuses for fast connections

Intuitive Matching Mechanics

Unlike traditional match-3 games, Mahjong Sweet Connection uses classic mahjong connection rules: - Match only identical candy pieces - Clear connection paths between matched candies - No other pieces can block the connection line - Strategic thinking required for optimal clearing

Game Mechanics

The core gameplay revolves around the classic mahjong connection principle adapted for candy matching. Players must identify pairs of identical sweets and ensure there's a clear path between them. This creates a strategic element where you must plan your moves carefully, as blocked connections prevent successful matches.

Each level presents a new arrangement of candy pieces, requiring different strategies and approaches. The challenge increases as boards become more complex and time limits become more pressing.

Operation Guide

Playing Mahjong Sweet Connection is straightforward and accessible:

  • Mouse Control : Left-click to select and match candy pieces
  • Touch Control : Tap on mobile devices to select candies
  • Matching Rule : Select two identical candy pieces to create a match
  • Connection Path : Ensure no other candies block the connection line
  • Board Clearing : Remove all candy pieces to complete each level
  • Time Management : Work quickly to achieve high scores

Pro Tips for Better Gameplay

  1. Scan the board before making moves to identify the best matching opportunities
  2. Clear outer pieces first to open up more connection possibilities
  3. Work systematically rather than randomly clicking candies
  4. Use time wisely - sometimes a quick scan saves more time than rushed moves

Why Play This Game

Perfect for Puzzle Lovers

Mahjong Sweet Connection offers the perfect blend of strategy and relaxation. The candy theme adds a cheerful, stress-free atmosphere while the mahjong mechanics provide engaging mental challenges.

Instant Accessibility

As a browser-based game, you can start playing immediately without downloads, installations, or account creation. Perfect for quick gaming sessions during breaks or extended puzzle-solving marathons.

Universal Appeal

The game appeals to a wide audience: - Casual gamers enjoy the colorful, welcoming design - Puzzle enthusiasts appreciate the strategic depth - Time-challenge lovers thrive on beating their high scores - All ages can enjoy the simple yet engaging gameplay

Stress Relief and Mental Exercise

Combining the meditative aspects of matching games with gentle time pressure, the game provides an excellent balance of relaxation and mental stimulation. The sweet candy theme creates a positive, uplifting gaming environment.

Frequently Asked Questions (FAQ)