Mahjong - Classic Tile Matching Puzzle Game

Seele01-Flash
By
Mahjong is the ultimate classic tile matching puzzle game featuring traditional Chinese characters and symbols. Match pairs of tiles to clear the board in this relaxing, strategic game with no time pressure.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Classic Mahjong Solitaire**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** A clean, Zen-inspired aesthetic. The scene should be bright with soft, warm lighting (like a traditional tea room). * **Tile Models:** * Create 3D rectangular tiles with rounded corners (bevels) to catch highlights. * **Texture Design:** The back of the tiles should be a rich jade green or emerald plastic texture. The front face should be ivory white with crisp, vectorized Chinese characters and symbols (Bamboo, Circles, Characters, Winds, Dragons, Flowers, Seasons). * **Stacking:** The tiles must look physically stacked. Add subtle ambient occlusion shadows between layers to clearly distinguish depth so players can see which tile is on top of another. * **Background:** A simple, non-distracting background. A subtle bamboo mat texture or a gradient of calming beige/cream colors. * **Performance:** Since this is mobile-first, use instanced mesh rendering for the 144 tiles to ensure a steady 60 FPS. Low polygon count for bevels. ### 2. Audio Requirements * **BGM:** A calm, slow-tempo track featuring traditional Chinese instruments like the *Guzheng* or *Pipa*, mixed with soft ambient nature sounds (distant flowing water or birds) to encourage relaxation. * **SFX:** * **Click/Select:** A crisp, high-pitched "clack" sound, imitating hard plastic or bone tiles hitting each other. * **Match Success:** A satisfying "shuffling" sound followed by a soft chime. * **Invalid Move:** A dull, muted wooden thud to indicate the tile is locked. * **Shuffle:** The distinct, loud crashing sound of many tiles being mixed. ### 3. Gameplay Loop * **Core Mechanic:** The classic "Shanghai Solitaire" rules. 1. The board initializes with a 144-tile layout (e.g., the classic "Turtle" or "Pyramid" formation). 2. **Selection Logic:** A tile is selectable ONLY if it has no tile directly on top of it AND it has a free space on either its immediate left or right side. 3. **Matching:** The player taps a selectable tile (it highlights), then taps a matching tile. Both are removed from the board. * **Win Condition:** Clear all tiles from the board. * **Lose Condition:** No more valid moves are possible (Game Over / Shuffle prompt appears). * **Visual Cues:** When a tile is selected, it should glow slightly gold or lift up 5 pixels. Tiles that are currently "locked" (cannot be picked) should be slightly darkened or have a lower opacity to guide the player's eye to valid moves. ### 4. Mobile Controls & Interaction * **Orientation:** Landscape mode is preferred for the classic wide layout, but the camera must dynamically zoom to fit the board width. * **Touch Interactions:** * **Tap:** Select/Deselect tile. * **Pinch-to-Zoom:** Essential for mobile screens to see tile details. * **Two-finger Pan:** To move the camera around the board when zoomed in. * **UI/UX:** * Buttons (Shuffle, Hint, Undo) must be large (minimum 48px height) and placed at the bottom corners, away from the main play area to prevent accidental clicks. * **Haptic Feedback:** Trigger a very short, sharp vibration (10ms) when a valid tile is selected, and a slightly longer vibration (20ms) when a match is successfully made. 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 is a beloved tile-based puzzle game that has captivated players worldwide for generations. This classic game features beautifully designed tiles adorned with traditional Chinese characters, symbols, and patterns. Unlike the traditional four-player version, this online Mahjong follows the popular solitaire format where your goal is to clear the entire board by matching identical tile pairs.

The game uses a set of 144 tiles featuring various symbols including bamboo sticks, circles, characters, winds, dragons, flowers, and seasons. Each tile is meticulously crafted with authentic Chinese designs that add cultural richness to your gaming experience.

Core Features

Relaxing Gameplay Experience

One of Mahjong's greatest appeals is its no time limit approach. You can take as long as you need to study the board, plan your moves, and enjoy the meditative quality of tile matching. This makes it perfect for stress relief and mental relaxation.

Strategic Tile Matching

Success in Mahjong requires both observation skills and strategic thinking. You must carefully analyze tile positions and plan several moves ahead to avoid getting stuck with unmatchable tiles.

Beautiful Traditional Design

Every tile features authentic Chinese artwork with vibrant colors and intricate details. The visual appeal enhances the gaming experience and connects players to the rich cultural heritage of this ancient game.

Progressive Difficulty

Start with simpler layouts and gradually work your way up to more complex arrangements. Each board presents unique challenges that will test your pattern recognition and problem-solving abilities.

Brain Training Benefits

Regular Mahjong play helps improve concentration, memory, pattern recognition, and logical thinking skills. It's an excellent way to keep your mind sharp while having fun.

Game Rules and Mechanics

The fundamental rule of Mahjong solitaire is simple yet engaging: match identical tiles to remove them from the board . However, there's an important restriction - you can only select tiles that are "free," meaning they have at least one side (left or right) completely open and no tiles stacked on top of them.

Tile Categories

  • Suit Tiles : Bamboo, circles, and characters numbered 1-9
  • Honor Tiles : Four winds (East, South, West, North) and three dragons (Red, Green, White)
  • Bonus Tiles : Flowers and seasons (these can match with any tile in their category)

How to Play

Basic Controls

  • Mouse Click : Select tiles to match and remove pairs
  • Zoom Function : Use mouse wheel or zoom buttons to get a better view of complex layouts
  • Hint System : Access hints when you're stuck to find available matches
  • Shuffle Option : Rearrange tiles when no more moves are available

Winning Strategy Tips

  1. Start from the top : Prioritize removing tiles from higher layers to free up more options below
  2. Focus on trapped tiles : Identify tiles that are difficult to access and work to free them early
  3. Plan ahead : Think several moves in advance to avoid creating unmatchable situations
  4. Use hints wisely : Save hints for truly challenging moments rather than using them immediately

Why Play This Mahjong Game

Perfect for All Skill Levels

Whether you're a complete beginner or a Mahjong master, this game offers an ideal introduction to tile matching mechanics. The intuitive interface makes it easy to learn, while the strategic depth provides lasting challenge.

Stress-Free Gaming

With no time pressure or competitive elements, you can focus purely on the joy of problem-solving and pattern matching. It's the perfect game for unwinding after a busy day.

Cultural Appreciation

Playing Mahjong connects you to thousands of years of Chinese gaming tradition. The beautiful tile designs serve as a window into Chinese art and symbolism.

Accessible Anywhere

This browser-based version means you can enjoy Mahjong on any device with internet access. No downloads, no installations - just instant classic gaming fun.

Frequently Asked Questions (FAQ)