Mahjong Mania - Classic Tile Matching Strategy Game

Seele01-Flash
By
Mahjong Mania is a captivating online mahjong solitaire game that brings the classic tile-matching experience to your browser. With beautiful traditional designs and challenging layouts, it's perfect for strategy enthusiasts and puzzle lovers alike.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Mahjong Mania". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Create a polished, sophisticated aesthetic inspired by the title screen. The scene should feature a rich, dark burgundy or mahogany background with a subtle damask or geometric floral pattern to act as the "table." * **Tile Models:** Generate 3D Mahjong tiles (rectangular prisms with slightly beveled edges to catch light). The tiles should have an "Ivory" front face and a "Bamboo/Green" or "Gold" back face. * **Textures:** Use a texture atlas for the standard Mahjong faces (Bamboo, Dots, Characters, Winds, Dragons, Flowers, Seasons). The engraving should look slightly recessed. * **Lighting:** Implement warm, ambient lighting combined with a directional spotlight to create soft shadows, enhancing the depth of the tile stacks. * **Mobile Optimization:** Use **THREE.InstancedMesh** for rendering the 144 tiles to ensure 60 FPS on mobile devices. Use low-poly geometry for the base tile shape. ### 2. Audio Requirements * **BGM:** A relaxing, Zen-style track featuring traditional instruments (like a soft Guzheng or Pipa) blended with a subtle ambient lo-fi beat to encourage focus. * **Sound Effects:** * *Selection:* A crisp, high-pitched "click" (like a stone hitting wood). * *Match:* A satisfying, resonant "clack" sound followed by a soft magical chime. * *Shuffle:* A sound of heavy tiles rattling together. * *Win:* A short oriental orchestral flourish. ### 3. Gameplay Loop * **Core Mechanism:** Standard Mahjong Solitaire (Shanghai) rules. The player must match pairs of identical tiles to remove them from the board. * **Tile Logic:** A tile is only selectable ("free") if: 1. There is no tile directly on top of it (Z-axis check). 2. It has an open space on either its immediate Left OR Right side. * **Level Layout:** Implement the classic "Turtle" or "Pyramid" formation as the default layout. * **Victory/Defeat:** * *Win:* Board is completely cleared. * *Lose/Stuck:* No valid moves remain (trigger a "Shuffle" button prompt or Game Over). * **Power-ups:** Include "Hint" (highlight a free pair) and "Shuffle" functionality. ### 4. Mobile Controls & Interaction * **Touch Controls:** Implement a precise Raycaster for touch inputs. * *Tap:* Select a tile. * *Tap Selected Tile:* Deselect. * **Camera:** Use a PerspectiveCamera with **OrbitControls** limited to a specific angle range (prevent looking under the table). Allow "Pinch to Zoom" and "Two-finger Pan" to help users on small screens see tiles clearly. * **UI Layout:** * Top: Score and Timer. * Bottom (Thumb-friendly zone): Large circular buttons for "Pause," "Hint," "Undo," and "Shuffle." * **Feedback:** * *Visual:* When selected, the tile should lift slightly (Z-axis translate) and have a glowing outline (SelectionBox or Shader). * *Haptic:* Trigger a short vibration (using `navigator.vibrate`) when a tile is successfully matched. * **Orientation:** Optimize for **Landscape Mode** to accommodate the wide aspect ratio of standard Mahjong layouts. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Mahjong Mania

Mahjong Mania is an engaging online mahjong solitaire game that captures the timeless appeal of the classic Chinese tile-matching game. Featuring elegant golden tiles against a rich burgundy backdrop, this game offers a sophisticated gaming experience that's both relaxing and mentally stimulating.

The game presents the traditional mahjong solitaire format where players must match identical tiles to clear the board. With its polished visual design and intuitive gameplay, Mahjong Mania provides hours of strategic entertainment for players of all skill levels.

Core Features

Classic Mahjong Solitaire Gameplay

Experience authentic mahjong solitaire mechanics with traditional tile sets including characters, bamboos, circles, winds, and dragons. The game stays true to classic mahjong rules while offering a modern, user-friendly interface.

Beautiful Visual Design

Enjoy stunning graphics with ornate golden tiles set against an elegant patterned background. The visual presentation creates an immersive atmosphere that enhances the traditional mahjong experience.

Multiple Difficulty Levels

The game offers various layouts and configurations, from simple beginner-friendly arrangements to complex challenging patterns that will test even experienced players' strategic thinking.

Cross-Platform Compatibility

Perfectly optimized for both desktop and mobile devices, allowing you to enjoy mahjong anywhere, anytime. The responsive design ensures smooth gameplay across all screen sizes.

No Download Required

Play instantly in your browser without any downloads or installations. Simply click and start matching tiles immediately.

Game Mechanics

Tile Matching Rules

The objective is to clear all tiles from the board by matching identical pairs. You can only select tiles that are "free" - meaning they have at least one side completely open and no tiles stacked on top.

Strategic Elements

Success requires careful planning and foresight. Consider which tiles to match first, as your choices affect which tiles become available for future moves. Some layouts require specific sequences to avoid getting stuck.

Special Tile Types

  • Character Tiles : Traditional Chinese characters numbered 1-9
  • Bamboo Tiles : Bamboo stick patterns numbered 1-9
  • Circle Tiles : Circular dot patterns numbered 1-9
  • Wind Tiles : East, South, West, and North winds
  • Dragon Tiles : Red, Green, and White dragons
  • Flower and Season Tiles : Special tiles that can match with any tile of the same category

Operation Guide

Basic Controls

  • Mouse : Click on tiles to select and match them
  • Keyboard : Use arrow keys to navigate between tiles, spacebar to select
  • Touch : On mobile devices, simply tap tiles to select them

Game Interface

  • Hint Button : Get suggestions when you're stuck
  • Shuffle : Rearrange remaining tiles when no moves are available
  • Restart : Begin the current layout again
  • New Game : Start with a fresh layout

Scoring System

Earn points for each successful match. Bonus points are awarded for completing levels quickly and using fewer hints. Track your best scores and try to improve with each game.

Why Play Mahjong Mania

Mental Exercise

Mahjong solitaire is excellent brain training, improving pattern recognition, memory, and strategic thinking skills. Regular play can help maintain cognitive sharpness and concentration.

Stress Relief

The meditative nature of tile matching provides a peaceful break from daily stress. The beautiful visuals and calming gameplay create a relaxing gaming experience.

Accessibility

Suitable for all ages and skill levels. Whether you're a mahjong veteran or complete beginner, the game offers appropriate challenges and learning opportunities.

Time Flexibility

Perfect for both quick 5-minute breaks and longer gaming sessions. Each game can be paused and resumed at your convenience.

Cultural Appreciation

Experience a piece of traditional Chinese culture through this beloved game format that has entertained people for generations.

Frequently Asked Questions (FAQ)