Sweety Mahjong - Classic Tile Matching Puzzle Game

Seele01-Flash
By
Sweety Mahjong is a delightful twist on the classic tile-matching puzzle game, featuring colorful graphics of sweets and treats. Challenge your mind while enjoying eye-candy visuals in this free browser-based mahjong experience.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Sweety Mahjong". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: "Candy Land" aesthetic. High saturation, vibrant colors (hot pinks, sky blues, bright yellows). The look should be glossy and "delicious," mimicking the provided screenshot's cartoonish style. * **Tile Design**: Use `THREE.ExtrudeGeometry` or `rounded-box-geometry` to create thick, substantial tiles that look like pieces of white chocolate or fondant. * **Textures**: Instead of traditional Mahjong symbols (Bamboo/Circles), use SVG or PNG textures of sweets: Candy Canes, Cupcakes (Pink/Chocolate), Lollipops, Wrapped Hard Candies, Jellybeans, and Donuts. * **Selection State**: When a tile is selected, it should glow or pulsate slightly to indicate active state. * **Background**: A static or slowly scrolling background featuring a sky-blue color with subtle diagonal lighter-blue stripes (matching the reference image). Add subtle floating particle effects (like tiny sugar sprinkles or sparkles) in the background. * **Mobile Optimization**: * **Critical**: Use `THREE.InstancedMesh` for rendering the tiles to ensure 60FPS performance on mobile devices, as there will be up to 144 tiles on screen. * Texture atlasing should be used to reduce draw calls. * Lighting should be baked or use a simple HemisphereLight combined with a single DirectionalLight for shadow casting to give depth to the tile stacks. ### 2. Audio Requirements * **BGM**: A lighthearted, whimsical loop featuring pizzicato strings, glockenspiel, or marimba. It should be relaxing but upbeat (approx. 100-110 BPM). * **Sound Effects (SFX)**: * **Tap/Select**: A soft "bubble pop" or a light wooden "clack". * **Match Made**: A satisfying "crunch" sound or a magical "chime" ascending in pitch. * **Invalid Move**: A subtle, dull "thud" or a gentle "negative buzz" if the player taps a locked tile. * **Victory**: A short, celebratory fanfare. ### 3. Gameplay Loop * **Core Mechanic**: Classic Mahjong Solitaire (Shanghai) rules. * **The Grid**: Generate a 3D layout of stacked tiles (Turtle formation or similar). * **Matching Logic**: Players must select pairs of identical candy tiles to remove them from the board. * **"Free" Tile Logic**: A tile can only be selected if it is "free" (i.e., it has no tile directly on top of it, and it has an empty space on either its immediate left OR right side). * **Winning Condition**: Clear the entire board of tiles. * **Losing Condition**: No more valid moves available (game should detect this and offer a "Shuffle" option). * **Feedback**: When a pair is matched, play a small particle explosion (confetti or stars) at the location of the removed tiles. ### 4. Mobile Controls & Interaction * **Camera & Viewport**: * Use an **Orthographic Camera** to ensure the perspective doesn't distort the tile selection areas at the edges of the screen. * Implement **Auto-Zoom/Fit**: The camera frustum size should automatically adjust based on `window.innerWidth` and `window.innerHeight` to ensure the entire board is visible in both Portrait and Landscape modes. * **Touch Interaction**: * Implement a **Raycaster** that listens for `touchstart` (and `click` for fallback). * The Raycaster must account for the bounding box of the tiles. Increase the hit-test radius slightly to accommodate "fat finger" errors on mobile. * **UI Overlay**: * Place a "Shuffle" button and a "Hint" button at the bottom of the screen. These buttons must have a minimum touch target size of 44x44 pixels. * Display a simple "Score" or "Pairs Left" counter at the top. * **Haptic Feedback**: Trigger a short vibration (`navigator.vibrate(10)`) when a tile is successfully selected or matched. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Sweety Mahjong transforms the traditional mahjong solitaire experience into a sweet visual treat. This classic tile-matching puzzle game replaces traditional mahjong symbols with vibrant graphics of delicious candies, cupcakes, cookies, and other mouth-watering sweets. The colorful and cheerful design creates an engaging atmosphere that makes brain training both fun and visually appealing.

The game maintains all the strategic depth of classic mahjong while adding a modern, candy-themed twist that appeals to players of all ages. With its bright colors and sweet imagery, Sweety Mahjong offers a refreshing take on one of the world's most beloved puzzle games.

Core Features

Sweet Visual Design

Every tile features beautifully designed graphics of various sweets including cupcakes, lollipops, candy canes, donuts, and chocolate treats. The vibrant colors and detailed artwork make each gaming session a visual delight.

Classic Mahjong Gameplay

Enjoy the timeless tile-matching mechanics that have captivated puzzle lovers for generations. The game follows traditional mahjong solitaire rules where you must match pairs of identical tiles to clear the board.

Brain Training Benefits

Sweety Mahjong provides excellent mental exercise, improving: - Pattern Recognition : Identify matching sweet-themed tiles quickly - Strategic Thinking : Plan moves carefully to avoid blocking yourself - Memory Skills : Remember tile positions and available matches - Concentration : Stay focused despite the tempting sweet distractions

Accessible Gaming

  • Free to Play : Completely free with no hidden costs or premium features
  • Browser-Based : No downloads or installations required
  • Cross-Platform : Works perfectly on desktop computers, tablets, and smartphones
  • Instant Play : Start playing immediately without registration

Game Mechanics

The objective is simple yet challenging: clear all tiles from the board by matching pairs of identical sweet-themed tiles. Only free tiles (not blocked by other tiles) can be selected and removed. The game tests your ability to plan ahead and identify the best sequence of moves.

Each level presents a different tile arrangement, creating unique puzzles that require different strategies. The sweet theme adds visual appeal without compromising the strategic depth that makes mahjong so engaging.

Operation Guide

Basic Controls: - Left Mouse Button : Select and remove matching tiles - Mouse Movement : Navigate and examine the tile layout - Visual Indicators : Available tiles are highlighted when hovering

Gameplay Tips: - Look for tiles that are completely free on at least one side - Prioritize removing tiles that will unlock multiple other tiles - Scan the entire board before making moves to identify all available matches - Don't get distracted by the sweet graphics - stay focused on the matching strategy!

Why Play Sweety Mahjong

Perfect Stress Relief : The combination of engaging puzzle mechanics and cheerful sweet imagery creates a relaxing gaming experience that helps reduce stress and anxiety.

Educational Value : Beyond entertainment, the game enhances cognitive abilities including pattern recognition, spatial awareness, and strategic planning.

Universal Appeal : The sweet theme makes this version particularly appealing to players who might find traditional mahjong tiles less engaging, while still offering the full strategic depth of the classic game.

Convenient Gaming : As a browser-based game, you can enjoy Sweety Mahjong during breaks, commutes, or any time you need a quick mental challenge without any setup or commitment.

Frequently Asked Questions (FAQ)