Mahjong Titans - Classic Tile Matching Puzzle

Seele01-Flash
By
Mahjong Titans is the classic tile-matching puzzle game featuring traditional Chinese mahjong tiles. Match pairs to clear all 144 tiles from the board in this timeless solitaire challenge.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Mahjong Titans 3D". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Classic Mahjong Solitaire aesthetic. The background should be a serene, deep grey-blue with a subtle, low-opacity traditional wave pattern (Seigaiha) texture to match the reference screenshot. * **Tile Models:** Use `THREE.BoxGeometry` to create the 144 Mahjong tiles. * **Dimensions:** Aspect ratio approximately 3:4:2 (Width:Length:Height). * **Materials:** Two materials per tile. Material 0 (Front/Sides) should be an ivory/bone color (`0xfdf5e6`). Material 1 (Back) should be a deep emerald green (`0x006400`) or gold, resembling the reference. * **Textures:** Procedurally generate or map standard Mahjong faces onto the top face: Dots (Circles), Bamboo (Lines), Characters (Kanji), Winds, Dragons, Flowers, and Seasons. * **Layout:** Implement the classic "Turtle" pyramid formation (stacks of tiles building up to a peak in the center). * **Lighting & Shadows:** Use a `DirectionalLight` to cast hard shadows (`castShadow = true`) to emphasize the depth and stacking order of the tiles, which is crucial for gameplay readability. Add soft `AmbientLight`. * **Performance:** **Crucial for Mobile:** Use `THREE.InstancedMesh` for the tiles to reduce draw calls, as there are 144 identical geometries. Update instance matrices for positioning and removing tiles (scaling to 0). ### 2. Audio Requirements * **BGM:** A looping, relaxing, "dramatic Chinese music" track featuring traditional instruments like the Pipa or Guqin. * **Sound Effects (SFX):** * **Select:** A crisp "clack" sound of stone/ivory hitting a table. * **Match/Remove:** A satisfying "whoosh" or magical chime. * **Invalid Move:** A dull "thud" or error tone if a player taps a blocked tile. * **Win:** A short orchestral fanfare. * **Shuffle:** The sound of tiles rattling together. ### 3. Gameplay Loop * **Setup:** Initialize the 144 tiles in the Turtle layout. Ensure the board is solvable (random pairing logic that ensures pairs exist). * **Selection Logic:** * A tile is "selectable" ONLY IF: 1. It has no tile immediately on top of it. 2. It has a free space on either its immediate Left OR Right side. * **Matching:** * Player taps Tile A (it highlights). * Player taps Tile B. * If Tile A and Tile B match (same suit/number) AND both are selectable: Both tiles animate (scale down or fly off) and are removed from the board. * *Special Rule:* Season tiles match any Season; Flower tiles match any Flower. * **Win Condition:** Clear all 144 tiles. Show a "Victory" modal. * **Lose/Stuck Condition:** If no moves are possible, automatically trigger a "Shuffle" button prompt or "Game Over". ### 4. Mobile Controls & Interaction * **Camera:** Use `OrthographicCamera` for precise isometric projection without distortion. * **Touch Controls:** * **Tap:** Use `Raycaster` to detect touches on tile instances. * **Pan & Zoom:** Implement a custom camera controller (or OrbitControls restricted) allowing one-finger panning and two-finger pinch-to-zoom. This is essential as tiles will be small on mobile screens. * **Visual Feedback:** * **Selected State:** When a tile is tapped, lift it slightly on the Y-axis (`position.y += 0.5`) and apply an emissive glow (`0xffff00`) to indicate selection. * **Blocked State:** If a blocked tile is tapped, shake it slightly left/right (visual error feedback). * **UI Layout:** * **Orientation:** Force or encourage **Landscape Mode** for better board visibility. * **HUD:** Place simple, large (min 44px) touch targets at the corners: * Top-Left: Score / Remaining Matches. * Top-Right: Settings / Pause. * Bottom-Right: "Hint" (highlights a free pair) and "Undo" buttons. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Mahjong Titans

Mahjong Titans is an iconic tile-matching puzzle game that brings the traditional Chinese game of Mahjong to your browser. This classic solitaire variant challenges players to systematically remove all 144 tiles from a carefully arranged pyramid by matching identical pairs. With its authentic tile designs, soothing Chinese music, and strategic gameplay, Mahjong Titans offers hours of engaging puzzle-solving entertainment.

Core Features

Traditional Mahjong Experience

  • Authentic 144-tile set featuring three primary suits: Dots (circles), Bamboo (lines), and Characters (Chinese symbols)
  • Classic pyramid layout that requires strategic thinking and pattern recognition
  • Traditional Chinese aesthetic with beautiful tile artwork and atmospheric music
  • Progressive difficulty as removing tiles reveals new matching opportunities

Completely Free to Play

  • No download required - play instantly in any modern web browser
  • Cross-platform compatibility - works perfectly on desktop computers and mobile devices
  • Zero cost - enjoy the full game experience without any payments or subscriptions
  • No registration needed - start playing immediately without creating accounts

Accessibility and Convenience

  • Simple mouse controls - just click to select matching tile pairs
  • Visual feedback highlighting available moves and matched tiles
  • Pause and resume functionality for flexible gaming sessions
  • Responsive design adapting perfectly to different screen sizes

Game Mechanics

Basic Gameplay Rules

The objective is straightforward yet challenging: remove all tiles from the board by matching identical pairs. However, tiles can only be selected if they meet specific criteria:

  • Free tiles only - tiles must be accessible from either the left or right side
  • No obstruction - other tiles cannot block the path for removal
  • Exact matches - only identical tile designs can be paired and removed
  • Strategic planning - removing certain tiles reveals others underneath

Tile Categories

Mahjong Titans features the traditional three suits that form the core of the 144-tile set:

Dots (Circles) : Featuring numbered circle patterns from one to nine Bamboo (Sticks) : Displaying vertical line arrangements representing bamboo stalks Characters : Showing traditional Chinese number characters

Operation Guide

Controls

  • Left mouse click : Select and match tile pairs
  • Hover effect : Preview available tiles and potential matches
  • Menu navigation : Use mouse to access game options and settings

Winning Strategy

  • Scan for matches : Always look for obvious pairs first
  • Plan ahead : Consider which tiles to remove to reveal hidden ones
  • Work from top down : Prioritize removing upper-level tiles to access more options
  • Practice pattern recognition : Familiarize yourself with different tile designs

Why Play Mahjong Titans

Mental Benefits

Mahjong Titans isn't just entertainment - it's brain training. The game enhances: - Pattern recognition skills through constant tile matching - Strategic thinking by planning removal sequences - Visual perception by distinguishing between similar tile designs - Concentration through focused puzzle-solving sessions

Perfect for Everyone

  • Beginners welcome - simple rules make it easy to start playing
  • Challenging for experts - advanced strategies keep experienced players engaged
  • Relaxing atmosphere - traditional music and visuals create a calming experience
  • Quick sessions - perfect for short breaks or extended gaming periods

Timeless Appeal

As one of the most popular puzzle games worldwide, Mahjong Titans offers the authentic experience that has captivated players for generations. The combination of luck, skill, and strategy creates an endlessly replayable gaming experience that never gets old.

Frequently Asked Questions (FAQ)