Mahjong Tower - Classic Solitaire Puzzle Game

Seele01-Flash
By
Mahjong Tower is a classic tile-matching puzzle game featuring traditional mahjong solitaire gameplay. Clear the board by pairing matching tiles in this strategic and relaxing puzzle experience.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Mahjong Tower". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** A polished, "Zen-style" 3D aesthetic suitable for high-resolution mobile screens. The game should mimic the look of physical Mahjong tiles on a premium surface. * **Tile Models:** Use `THREE.BoxGeometry` with rounded bevels for the tiles. The dimensions should approximate real Mahjong tiles (rectangular prism). * *Textures:* Use a **Texture Atlas** for the tile faces (Bamboo, Characters, Dots, Winds, Dragons, Flowers, Seasons) to minimize draw calls. The back and sides of the tiles should have a glossy jade-green or ivory-white procedural material (`MeshPhysicalMaterial`) with subtle roughness to catch light. * **Environment:** A high-quality background texture featuring a golden, traditional Chinese pattern (as seen in the screenshot) or a dark mahogany wood table surface. * **Lighting:** Use a warm Directional Light casting soft shadows (to clearly distinguish tile layers/depth) combined with Ambient Light to prevent pitch-black shadows. * **Mobile Optimization:** Use `THREE.InstancedMesh` for rendering the 144 tiles to ensure 60FPS on mobile devices. Implement standard texture compression if possible. ### 2. Audio Requirements * **Background Music (BGM):** A looping, tranquil traditional Chinese instrumental track (featuring Guzheng or Pipa) to induce a "flow state." * **Sound Effects (SFX):** * *Selection:* A subtle "tock" or light wooden click. * *Match/Clear:* A satisfying, crisp "clack" (like two stones hitting) accompanied by a magical chime. * *Invalid Move:* A dull, low-pitched thud or a gentle rattle. * *Win:* A flourishing pentatonic harp glissando. ### 3. Gameplay Loop * **Initialization:** Generate a classic "Turtle" or "Pyramid" formation using a 3D grid system (x, y, z coordinates). The layout must respect standard Mahjong Solitaire layering. * **Matching Logic:** * Player selects Tile A (highlight). * Player selects Tile B. * **Validation:** A match occurs ONLY if: 1. Tile symbols match (or are in the same Flower/Season category). 2. Both tiles are "free" (no tile on top of them, and at least one lateral side—left or right—is open). * **Interaction Flow:** * If Match + Valid: Trigger clear animation (fade out + particles), add points, update "remaining tiles" counter. * If No Match: Deselect Tile A and select Tile B (if valid), or deselect both. * **Victory/Defeat:** * *Win:* Board cleared. * *Lose:* No valid moves remaining (trigger a "Shuffle" button prompt or "Game Over" modal). ### 4. Mobile Controls & Interaction * **Touch Input:** * Implement precise Raycasting for touch detection. * **Touch Tolerance:** Since tiles are stacked, prioritize the topmost, clickable tile if the touch coordinates slightly overlap. * **Visual Feedback:** * *On Touch:* The selected tile should physically lift up slightly (z-axis translation) and emit a glowing outline (cyan or gold) to indicate selection state clearly under the finger. * *On Clear:* Emit a small burst of particle effects (sparkles) at the tile's location to reward the player. * **Camera Control:** * Fixed perspective (isometric or high-angle) is preferred to avoid navigation confusion. * Allow simple "Pinch to Zoom" and "Two-finger Pan" to help users on smaller screens see complex stacks. * **UI Layout:** * Place a "Shuffle", "Hint", and "Restart" button in the bottom area (thumb-friendly zone). * Score and Tile Count at the top. * Support responsive resizing for both Portrait and Landscape orientations, scaling the board to fit the screen width. 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 Tower is a captivating puzzle game that brings the timeless appeal of mahjong solitaire to your browser. This classic tile-matching game challenges players to clear beautifully arranged layouts by strategically pairing matching tiles. With its elegant design and multiple layout variations, Mahjong Tower offers endless hours of engaging puzzle-solving entertainment.

The game features traditional mahjong tiles arranged in intricate tower formations, each requiring careful planning and strategic thinking to complete. Whether you're a mahjong veteran or new to tile-matching puzzles, this game provides an accessible yet challenging experience that will keep you coming back for more.

Core Features

Multiple Layout Variations

Mahjong Tower offers diverse board layouts, each presenting unique challenges and strategic opportunities. From compact arrangements to complex multi-layered towers, every layout requires different approaches and thinking patterns.

Classic Mahjong Rules

The game follows traditional mahjong solitaire rules with clear, easy-to-understand mechanics. Match pairs of identical tiles while following specific removal restrictions that add depth to the puzzle-solving experience.

Cross-Platform Compatibility

  • Completely Free : No payment required, full game access from the start
  • No Download Needed : Play instantly in any modern web browser
  • Mobile Optimized : Perfectly adapted for both desktop and mobile devices
  • Touch-Friendly : Intuitive tap controls for smartphones and tablets

Relaxing Gameplay Experience

Enjoy a peaceful, meditative gaming experience with beautiful visuals and smooth animations. The game's calm pace makes it perfect for stress relief and mental relaxation.

Game Playstyle

Mahjong Tower combines strategic thinking with pattern recognition skills. Players must carefully analyze the board layout, identifying which tiles can be removed and planning several moves ahead. The layered nature of the tile arrangements creates a three-dimensional puzzle that requires spatial awareness and logical thinking.

Each game presents a fresh challenge as you work to uncover hidden tiles and create new pairing opportunities. The strategic depth comes from understanding tile accessibility and planning efficient removal sequences.

Operation Guide

Basic Controls

  • Click or Tap : Select the first tile you want to match
  • Click or Tap Again : Choose the second tile with the matching symbol
  • Successful Match : Both tiles disappear from the board
  • Invalid Selection : The second tile becomes highlighted instead

Tile Removal Rules

  1. Free Edge Requirement : At least one side (left or right) must be completely open
  2. No Blocking Tiles : The tile cannot be covered by another tile above it
  3. Symbol Matching : Only identical symbols can be paired together
  4. Strategic Planning : Consider which tiles to remove first to unlock others

Winning Strategy Tips

  • Always look for tiles that are blocking multiple other tiles
  • Remove tiles from the top and edges first when possible
  • Plan ahead to avoid creating unmatchable situations
  • Take your time - there's no time pressure in this relaxing puzzle game

Why Play Mahjong Tower

Mahjong Tower stands out as an exceptional puzzle game that combines traditional gameplay with modern convenience. The game offers the perfect balance of challenge and relaxation, making it suitable for quick breaks or extended gaming sessions.

The multiple layout variations ensure that the game stays fresh and engaging, while the classic mahjong rules provide a familiar yet satisfying puzzle-solving experience. With its browser-based accessibility and mobile optimization, you can enjoy this timeless game anywhere, anytime.

Whether you're looking to sharpen your mind, relax after a busy day, or simply enjoy a classic puzzle game, Mahjong Tower delivers an authentic and enjoyable mahjong solitaire experience that will keep you entertained for hours.

Frequently Asked Questions (FAQ)