Piles of Mahjong

Seele01-Flash
By
Piles of Mahjong is an engaging puzzle game that combines classic Mahjong elements with match-three mechanics. Clear stacks of tiles by matching three identical ones while using strategic thinking to avoid getting stuck.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Piles of Mahjong". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Clean, bright, and semi-realistic 3D aesthetic. The background should be a soothing gradient (forest green to teal, referencing the promotional image) or a high-quality felt table texture to reduce eye strain. * **Game Objects (Tiles)**: * Create 3D Mahjong tiles with a glossy white plastic look and slightly rounded corners (BevelGeometry). * Texture faces with a mix of: * **Classic**: Circles (Dots), Sticks (Bamboo), Characters (Wan), Winds, Dragons. * **Modern/Cute**: Panda heads, Birds (as mentioned in the description). * **Effect**: When a tile is selected, it should have a subtle emission/glow outline to indicate selection. * **Layout**: * A chaotic but calculated "pile" or "pyramid" structure of tiles in the center of the screen. * A dedicated "Dock/Tray" UI at the bottom of the screen with exactly **7 slots** to hold selected tiles. * **Performance**: Use `InstancedMesh` for rendering the tiles to ensure 60FPS on mobile devices, as there may be dozens of tiles on screen. Use compressed textures (KTX2/WebP) if possible. ### 2. Audio Requirements * **BGM**: A relaxing, Zen-inspired lofi track with subtle traditional Chinese instruments (Guzheng or Flute) playing softly in the background. Loopable. * **Sound Effects (SFX)**: * **Click**: A crisp, satisfying "clack" sound (simulating heavy plastic or bakelite stone). * **Travel**: A "whoosh" sound when a tile flies from the pile to the dock. * **Match**: A harmonious chime or "ding-ding-ding" chord when 3 tiles are cleared. * **Error/Full**: A dull thud or buzzer if the player tries to click a blocked tile or if the dock is full. * **Power-ups**: Distinct magical sounds for Shuffling or Undoing a move. ### 3. Gameplay Loop * **Core Mechanic**: * The player taps a free tile (a tile that is not covered by another tile) from the 3D pile. * The tile animates (arcs) into the first available slot in the 7-slot Dock at the bottom. * **Matching Logic**: The game automatically checks the Dock. If **3 identical tiles** are present, they vanish immediately, and the remaining tiles in the dock shift to fill the gap. * **Win Condition**: Clear all tiles from the screen. * **Fail Condition**: The Dock fills up with 7 tiles and no match is formed. * **Power-up System** (UI Buttons): * **Shuffle**: Rearranges remaining tiles in the pile (Cost: 300 pts). * **Magic Wand (Auto-Match)**: Automatically finds a match for a tile in the dock (Cost: 100 pts). * **Undo**: Moves a tile from the dock back to the board or a temporary holding slot (Cost: 100 pts). ### 4. Mobile Controls & Interaction * **Control Scheme**: One-finger touch interaction. * Use `THREE.Raycaster` for precise touch detection on the 3D tiles. * **Hitbox Optimization**: Ensure the raycast hitboxes are slightly larger than the visual models to prevent "fat finger" miss-clicks on small mobile screens. * **Orientation**: **Portrait Mode** is preferred to accommodate the vertical stacking of the pile and the bottom dock layout comfortably. * **Responsiveness**: The camera FOV and distance must adjust based on the screen aspect ratio so the pile never gets cut off. * **Feedback**: * **Visual**: When touched, the tile should scale down slightly (0.9x) and then pop up, indicating a press. * **Haptic**: Trigger `navigator.vibrate(10)` on a successful tile tap and `navigator.vibrate([30, 50, 30])` on a successful Match-3 clear for tactile satisfaction. * **UI Layout**: * Top: Score, Level progress. * Center: The 3D Game Board. * Bottom: The 7-slot Dock (fixed position). * Bottom Overlay: Power-up buttons (large, at least 44x44px touch targets). Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Piles of Mahjong is a captivating puzzle game that brings a fresh twist to the beloved classic Mahjong format. This innovative game combines traditional tile-matching elements with strategic match-three gameplay, creating an engaging experience that challenges both newcomers and Mahjong veterans. The game features beautiful 3D graphics and smooth animations that make every move satisfying.

Unlike traditional Mahjong where you match pairs of tiles, Piles of Mahjong requires you to match three identical tiles to clear them from the board. This unique mechanic adds an extra layer of strategy and excitement to the classic formula.

Core Features

Strategic Match-Three Gameplay

The game revolutionizes traditional Mahjong by introducing a match-three system. You must select tiles and move them to seven empty spaces at the bottom of the screen, then match three identical tiles to clear them. This creates intense strategic decisions with every move.

Diverse Tile Collection

Enjoy a rich variety of tiles including: - Classic Elements : Traditional circles, bamboo sticks, and character tiles - Fun Additions : Adorable panda heads and colorful bird designs - Beautiful Graphics : Each tile features crisp, clear artwork that's easy to distinguish

Helpful Power-Ups and Tools

When you're stuck, the game offers several assistance options: - Tile Reshuffle : Reorganize the pile when no moves are available - Face-Up Mode : Reveal all tiles temporarily to plan your strategy - Auto-Match : Automatically match available tiles in the bottom row - Tile Removal : Remove unwanted tiles from your bottom spaces

Cross-Platform Compatibility

Piles of Mahjong works seamlessly across all devices: - Desktop : Full mouse support for precise tile selection - Mobile : Touch-optimized controls for smartphones and tablets - Browser-Based : No downloads required - play instantly online

Game Mechanics

The Challenge System

The game starts you with limited removal chances, adding strategic depth to every decision. Managing your bottom space effectively becomes crucial as the difficulty increases.

Reward Points Economy

Earn points through successful matches and use them to purchase helpful tools when you need them most. This creates a balanced risk-reward system that keeps gameplay engaging.

Operation Guide

Basic Controls

  • Mouse Click : Select and move tiles (desktop)
  • Touch : Tap tiles to select them (mobile)
  • Bottom Area : Seven spaces where selected tiles are temporarily stored
  • Match Zone : Where three identical tiles automatically combine and disappear

Winning Strategy

Success in Piles of Mahjong requires: 1. Plan Ahead : Always consider what tiles you're adding to your bottom spaces 2. Prioritize Matches : Look for opportunities to clear three tiles quickly 3. Manage Space : Keep some bottom spaces free for maneuvering 4. Use Tools Wisely : Save power-ups for truly challenging situations

Why Play Piles of Mahjong

Perfect for All Skill Levels

Whether you're a Mahjong master or completely new to tile games, Piles of Mahjong offers: - Easy to Learn : Simple click-to-play mechanics - Hard to Master : Deep strategic elements that reward careful planning - Progressive Difficulty : Levels that gradually introduce new challenges

Relaxing Yet Engaging

The game strikes the perfect balance between relaxation and mental stimulation. The beautiful visuals and smooth gameplay create a zen-like experience, while the strategic elements keep your mind actively engaged.

Free and Accessible

Enjoy the complete Piles of Mahjong experience at no cost. The game is entirely free to play with no hidden charges, making it accessible to everyone who loves puzzle games.

Social and Competitive Elements

Track your progress, improve your skills, and challenge yourself to clear increasingly complex tile arrangements. The game encourages repeated play as you develop better strategies and techniques.

Frequently Asked Questions (FAQ)