Number Mahjong - Online Puzzle Game

Seele01-Flash
By
Number Mahjong is an innovative puzzle game that combines traditional mahjong solitaire with numbered stones. Challenge your mind across 100 unique levels featuring creative patterns from animals to aliens.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Number Mahjong". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Clean, Zen-like 3D aesthetic. The game pieces should look like polished white marble "stones" or tiles with rounded beveled edges (use `roundedRect` logic or a bevelled `BoxGeometry`). * **Tile Design:** Each stone must display a clear, bold number (1-9) on its top face using a dynamic CanvasTexture or Texture map. The text color should differ for specific number groups (e.g., 1-3 Red, 4-6 Blue, 7-9 Green) to aid visual distinction on small screens. * **Lighting & Materials:** Use `MeshStandardMaterial` for a semi-glossy stone finish. Implement a soft Directional Light (casting shadows for depth perception) and an Ambient Light to ensure visibility. * **Background:** A deep burgundy or dark red patterned background (referencing the game logo style) to provide high contrast against the white stones. * **Visual Feedback (Critical):** Implement a "Dimming System". Stones that are currently blocked (cannot be selected) must automatically be tinted gray or lowered in opacity. Playable stones should be fully bright. * **Performance:** Use low-poly geometries for the stones. If possible, use `InstancedMesh` for better draw-call performance on mobile devices, or ensure geometries are efficient. ### 2. Audio Requirements * **BGM:** A relaxing, slow-tempo ambient track with an Asian-inspired melody (soft flute or guzheng) to encourage focus. * **Sound Effects (SFX):** * *Selection:* A crisp "click" or stone-tapping sound. * *Match:* A satisfying "clack" followed by a soft chime. * *Invalid Move:* A dull, low-pitched thud. * *Shuffle/Hint:* A sliding stone sound. * *Win:* A celebratory oriental fanfare. ### 3. Gameplay Loop * **Core Mechanic:** Standard Mahjong Solitaire rules using numbers. The player must match two identical number stones to remove them from the board. * **Validity Logic:** A stone is selectable ONLY if: 1. It is not covered by another stone (Z-axis check). 2. It has at least one side (Left or Right) completely free. * **Level Layout:** The code should generate a 3D stacked structure (e.g., a "Turtle" or "Pyramid" formation). The layout must be defined by a grid array [x, y, z]. * **Victory/Defeat:** * **Win:** Clear all stones. * **Fail:** No valid moves remaining (game should auto-detect this and offer a Shuffle). * **Scoring:** Points are awarded for matches. A "Combo" multiplier increases for quick successive matches. Deduct points for using "Hint" or "Shuffle". ### 4. Mobile Controls & Interaction * **Camera Control:** Use an `OrthographicCamera` or a `PerspectiveCamera` with a narrow FOV to reduce distortion. Allow the user to Pan (one finger drag) and Zoom (two-finger pinch) to inspect complex stacks, but limit the rotation angle to keep the "top-down" perspective usable. * **Touch Interaction:** Raycaster must be optimized for touch events (`touchstart`, `touchend`). The touch "hit area" for each stone should be slightly larger than the visual model to forgive imprecise finger taps. * **UI Overlay (HTML/CSS):** * **HUD:** Top bar showing Score, Level, and Timer. * **Action Buttons:** Large, thumb-friendly buttons (minimum 44x44px) at the bottom screen corners for "Pause", "Shuffle", and "Hint". * **Feedback:** * **Haptic:** Trigger a short vibration (`navigator.vibrate(10)`) on valid tile selection. * **Visual:** When a tile is selected, highlight it with a gold outline or emission glow. When matched, create a small particle explosion before the tiles disappear. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Number Mahjong is a captivating puzzle game that puts a fresh twist on the classic mahjong solitaire experience. Instead of traditional Chinese characters, this game features numbered stones that create an accessible yet challenging brain teaser for players of all skill levels. With a stellar 4.3/5 rating from players worldwide, this free online game offers hours of engaging puzzle-solving entertainment.

Core Features

100 Unique Puzzle Levels

The game boasts an impressive collection of 100 different levels, each with its own distinctive pattern and challenge. From simple geometric shapes to complex designs mimicking animals, cartoons, rivers, and even alien formations, every level presents a fresh puzzle-solving experience.

Flexible Level Selection

Unlike traditional progression systems, Number Mahjong allows you to play levels in any order you prefer. Jump to your favorite patterns or challenge yourself with the most complex designs - the choice is entirely yours.

Brain Training Benefits

This mahjong variant serves as an excellent brain exercise, helping to improve: - Pattern recognition skills - Logical thinking abilities - Concentration and focus - Memory and cognitive function - Problem-solving techniques

Cross-Platform Compatibility

Built with HTML5 technology, the game runs smoothly on: - Desktop computers and laptops - Mobile phones and tablets - All modern web browsers - No download or installation required

Gameplay Mechanics

The core gameplay follows traditional mahjong solitaire rules with numbered stones. Your objective is to clear the board by matching pairs of identical numbered stones. The challenge lies in strategic planning and identifying which stones are "free" to move.

Stone Matching Rules

To successfully match stones, they must be: - Identical numbers : Both stones must display the same number - Free stones : Not covered by other stones - Accessible sides : At least one side (left or right) must be open

Visual Assistance System

The game includes helpful visual cues: - Available stones appear in full color - Blocked stones are displayed in gray shade - Clear visual feedback for successful matches

Operation Guide

Basic Controls

  • Mouse Click : Select and match stones
  • Left Click : Choose first stone, then click matching stone
  • Menu Navigation : Access level selection and game options

Helper Features

  • Shuffle Option : Reorganize stones when stuck (affects final score)
  • Hint System : Highlights available matches (impacts scoring)
  • Undo Function : Reverse recent moves if available

Scoring System

Your performance is evaluated based on: - Speed of completion - Number of hints used - Shuffle usage - Overall efficiency

Strategy Tips for Success

Advanced Techniques

  1. Plan Ahead : Always consider how removing stones affects future moves
  2. Prioritize Blocking Stones : Focus on stones that are blocking multiple others
  3. Work from Top Down : Generally clear upper layers first when possible
  4. Identify Patterns : Look for number sequences and groupings
  5. Use Hints Sparingly : Save hints for genuinely difficult situations

Level-Specific Strategies

  • Animal Patterns : Often have symmetrical designs with predictable layouts
  • River Formations : Usually require clearing from the edges inward
  • Alien Designs : May have irregular patterns requiring careful observation

Why Play Number Mahjong

Perfect for All Skill Levels

Whether you're a mahjong veteran or completely new to the game, Number Mahjong offers an ideal entry point. The numbered stones eliminate language barriers while maintaining the strategic depth that makes mahjong so engaging.

Stress Relief and Relaxation

The meditative nature of matching stones provides excellent stress relief. The game's pace allows for thoughtful consideration without time pressure, making it perfect for unwinding after a busy day.

Cognitive Benefits

Regular play helps maintain mental sharpness and can contribute to better problem-solving abilities in daily life. The pattern recognition skills developed through play have practical applications beyond gaming.

Social Competition

The global leaderboard system allows you to compare your scores with players worldwide, adding a competitive element that keeps the game engaging long-term.

Technical Specifications

System Requirements

  • Modern web browser (Chrome, Firefox, Safari, Edge)
  • JavaScript enabled
  • Stable internet connection for initial loading
  • No additional plugins required

Mobile Optimization

The game is fully optimized for mobile devices with: - Touch-friendly controls - Responsive design - Optimized for various screen sizes - Smooth performance on tablets and smartphones

Frequently Asked Questions (FAQ)