Mahjong Unlimited

Seele01-Flash
By
Mahjong Unlimited is a classic oriental puzzle game that brings timeless tile-matching gameplay to your fingertips. With infinitely generated levels and customizable features, it offers the perfect blend of relaxation and mental challenge.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Mahjong Unlimited". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** "Oriental Luxury" aesthetic. Use a rich, deep purple gradient background (mimicking the banner) with subtle, scrolling traditional geometric patterns (like cloud or lattice motifs) in a lighter shade to add depth without distraction. * **Core Assets (Tiles):** Create procedural 3D Mahjong tiles. They should look like high-quality bone or ivory plastic—white with a green or blue backing. Use `THREE.BoxGeometry` with rounded bevels. The tile faces must feature standard Mahjong textures (Bamboo, Characters, Circles, Winds, Dragons, Flowers). * **Important:** Use `THREE.InstancedMesh` for rendering the tiles to ensure 60FPS performance on mobile devices, as there may be 144+ tiles on screen. * **Mascot/Decor:** Include a stylized "Golden Dragon" element. If performance allows, place a low-poly, gold-material dragon model coiling around the game board border. Alternatively, use a high-resolution 2D sprite of the dragon from the reference image as a static header or background layer. * **Lighting:** Use warm, golden lighting. A mix of `AmbientLight` (soft white) and a `DirectionalLight` (gold/orange) casting soft shadows to emphasize the 3D stacking depth of the tile pyramid. ### 2. Audio Requirements * **Background Music (BGM):** A relaxing, "Zen-style" loop featuring traditional instruments like the Guzheng (zither) or Erhu, mixed with soft ambient nature sounds (flowing water or wind chimes). It must not be repetitive or annoying. * **Sound Effects (SFX):** * **Tile Select:** A crisp, tactile "click" sound. * **Tile Match:** A satisfying, heavy "clack" (like real stone tiles hitting each other) followed by a soft magical "shimmer" sound. * **Invalid Move:** A dull, muted wood thud to indicate the tile is locked. * **Win/Level Clear:** A celebratory gong or orchestral flourish. ### 3. Gameplay Loop * **Core Mechanic:** Classic Mahjong Solitaire (Shanghai) rules. Players must match pairs of identical "free" tiles. * **Definition of "Free":** A tile is free if no tile is stacked directly on top of it, AND it has an open space on either its immediate left or right side. * **Level Generation ("Unlimited"):** Implement a procedural generation algorithm. Do not hardcode levels. The code should build a randomized 3D pyramid structure (Turtle, Fortress, etc.) that is guaranteed to be solvable (or provide a shuffle mechanic if no moves remain). * **Victory Condition:** The level ends successfully when all tiles are removed from the board. * **Scoring:** Award points for matches. Implement a "Combo Multiplier" system: making matches quickly in succession increases the score multiplier (visualized by the Dragon glowing brighter). ### 4. Mobile Controls & Interaction * **Camera:** Use an `OrthographicCamera` to prevent perspective distortion, making it easier for players to judge which tiles are on top or free. Set a fixed isometric angle (approx 45 degrees). * **Touch Controls:** * **Raycasting:** Implement precise Raycaster logic for touch inputs. * **Selection Logic:** First tap highlights a tile (lifts it slightly on the Y-axis and adds a glowing gold outline). Second tap on a matching tile triggers the removal animation. Tapping the background deselects. * **Visual Feedback:** * **Locked Tiles:** If a player taps a "locked" (non-free) tile, flash it red briefly and shake the tile mesh slightly to indicate it cannot be moved. * **Match Effect:** When two tiles match, draw a glowing golden line connecting them before they dissolve with a particle effect. * **Orientation:** Support both Portrait and Landscape, but optimize the camera zoom automatically to fit the tile layout width within the screen boundaries. * **UI Layout:** Place a restart/shuffle button and score display in a "safe area" at the top or bottom, ensuring they are at least 44x44px for touch accessibility. 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 Unlimited is a captivating oriental puzzle game that transforms the ancient Chinese tile-matching tradition into an engaging digital experience. This classic brain-training game combines beautiful traditional aesthetics with modern gameplay mechanics, featuring stunning dragon motifs and authentic Mahjong tiles that create an immersive gaming atmosphere.

The game showcases gorgeous visual design with golden dragons, vibrant purple backgrounds, and meticulously crafted tile artwork that pays homage to traditional Mahjong culture. Each tile features authentic Chinese characters and symbols, creating an authentic oriental gaming experience that both educates and entertains.

Core Features

Infinite Level Generation

Unlike traditional Mahjong games with limited levels, Mahjong Unlimited generates endless puzzle configurations, ensuring you never run out of fresh challenges. Each level presents a unique tile arrangement that tests your pattern recognition and strategic thinking skills.

Customizable Gaming Experience

Personalize your gameplay with various customization options that allow you to adjust the game to your preferences. Whether you prefer a more relaxed pace or challenging difficulty, the game adapts to your playing style.

Cross-Platform Compatibility

Play seamlessly across multiple devices! The game is fully optimized for: - Web browsers (both desktop and mobile) - Android devices with touch-optimized controls - iOS platforms for iPad and iPhone users

Brain Training Benefits

Mahjong Unlimited serves as an excellent cognitive exercise, improving: - Pattern recognition and visual processing - Memory skills through tile memorization - Logical thinking and strategic planning - Concentration and focus abilities

Game Mechanics

The objective is elegantly simple yet intellectually stimulating: remove pairs of identical tiles from the playing field by matching them strategically. However, tiles can only be selected if they are "free" - meaning they have at least one side completely unblocked by other tiles.

Strategic Depth

While the rules are straightforward, mastering Mahjong Unlimited requires careful planning. You must think several moves ahead, as removing certain tile pairs can either open up new possibilities or block potential matches. This creates layers of strategic depth that keep the game engaging for both beginners and experienced players.

Operation Guide

Basic Controls: - Left mouse click : Select and remove matching tile pairs - Mouse hover : Highlight available tiles and preview matches - Touch controls : Tap tiles on mobile devices for seamless gameplay

How to Play: 1. Scan the tile layout to identify matching pairs 2. Click on the first tile of a matching pair 3. Click on its identical partner to remove both tiles 4. Continue until all tiles are cleared or no more moves are available 5. Use hint systems if you get stuck on challenging layouts

Pro Tips: - Always look for tiles that are blocking multiple other tiles - Prioritize removing tiles from the top and edges of the layout - Plan your moves to avoid creating unsolvable situations

Why Play This Game

Perfect for Mental Wellness : Mahjong Unlimited offers a meditative gaming experience that reduces stress while keeping your mind sharp. The combination of beautiful visuals, soothing gameplay, and intellectual challenge creates the ideal environment for relaxation and mental exercise.

Suitable for All Ages : Whether you're a puzzle game veteran or completely new to Mahjong, the game's intuitive design makes it accessible to everyone. The gradually increasing difficulty ensures a smooth learning curve.

No Time Pressure : Unlike many modern games, Mahjong Unlimited allows you to play at your own pace. There are no time limits or pressure mechanics - just pure, thoughtful puzzle-solving enjoyment.

Cultural Appreciation : Experience the rich heritage of traditional Chinese Mahjong culture through authentic tile designs and oriental aesthetics that honor this timeless game's origins.

Free and Accessible : Enjoy premium Mahjong gameplay completely free, with no hidden costs or pay-to-win mechanics. Simply open your browser and start playing immediately.

Frequently Asked Questions (FAQ)