Music Mahjong - Musical Instrument Tile Matching Game

Seele01-Flash
By
Music Mahjong combines the classic mahjong solitaire gameplay with beautiful musical instrument themes. Match pairs of tiles featuring guitars, drums, harps, trumpets, and accordions across 30 challenging levels with stunning violin backgrounds.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Music Mahjong". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: A warm, classical atmosphere resembling a luthier's workshop or a music composer's desk. The color palette should focus on warm browns, creams, and autumnal tones (orange/gold) as seen in the reference. * **Game Board (Tiles)**: Create 3D Mahjong tiles using `THREE.BoxGeometry`. * **Texture**: The sides and back should use a polished wood texture. The front face uses a light cream color with iconic illustrations of musical instruments (Harp, Guitar, Drums, Trumpet, Accordion, Violin). * **Performance Optimization**: Use `THREE.InstancedMesh` for rendering the tiles to ensure 60fps on mobile devices, as there will be up to 144 tiles on screen. * **Background**: A static, high-quality background texture suggesting a wooden table with scattered sheet music and perhaps a violin in the periphery. * **Lighting**: Soft, warm `THREE.AmbientLight` combined with a `THREE.DirectionalLight` to cast subtle shadows from the tiles onto the board, giving depth to the 3D stack. * **Effects**: When tiles are matched, emit a simple particle explosion of musical notes (?, ?, ?) that float upward and fade out. ### 2. Audio Requirements * **Background Music (BGM)**: A relaxing, loopable classical piece featuring violin and piano (slow tempo) to aid concentration. * **Dynamic Sound Effects (SFX)**: * **Selection**: A soft wooden "clack" sound when tapping a tile. * **Match Success**: Ideally, specific sounds corresponding to the instrument matched (e.g., a guitar strum when matching guitars, a drum beat when matching drums). If not possible, a harmonious major chord chime. * **Error/Invalid Move**: A dull, muted thud or a plucked cello string (low pitch). * **Shuffle/Hint**: A sound of shuffling wooden blocks or a magical chime for the hint. * **Win/Lose**: A short orchestral fanfare for winning; a slowing-down vinyl record effect for losing. ### 3. Gameplay Loop * **Core Mechanic**: Standard Mahjong Solitaire rules. Players must select two identical "free" tiles to remove them. * *Free Tile Logic*: A tile is free if no tile is on top of it AND it has an empty space on either its left or right side. * **Level Design**: Implement a system to load tile layouts (JSON arrays) for 30 distinct levels. Start with a classic "Turtle" or "Pyramid" formation. * **Timer System**: A countdown timer for each level. If time reaches 0, the game ends (Defeat). * **Scoring & Tools**: * Award points for every match. * **Combo System**: Multiplier increases if matches are made in quick succession. * **Shuffle Button**: Rearranges remaining tiles (Penalizes score). * **Hint Button**: Highlights a valid pair (Penalizes score). * **Win/Loss Condition**: * **Win**: All tiles cleared. * **Loss**: Timer runs out OR no valid moves remaining (and player has no shuffles left). ### 4. Mobile Controls & Interaction * **Camera**: A perspective camera (`THREE.PerspectiveCamera`) angled at approximately 60 degrees for a clear view of the 3D depth. * *Controls*: Allow single-finger panning (limited range) and two-finger pinch to zoom, but ensure the camera snaps back to bounds so the player doesn't lose the board. * **Touch Interaction**: * Use `THREE.Raycaster` for precise tile selection via touch events (`touchstart` preferred over `click` for responsiveness). * **Selection Feedback**: When a tile is selected, it should lift slightly on the Y-axis (0.2 units) and emit a glowing highlight (yellow/gold) to indicate it is active. * **UI Layout (Responsive)**: * **Top Bar**: Display Score and Timer. High contrast text for visibility outdoors. * **Bottom Bar**: Large, thumb-friendly buttons (min 44x44px touch target) for "Pause," "Hint," and "Shuffle." * **Orientation**: The game must detect orientation changes. In Portrait mode, scale the camera FOV to fit the board width; in Landscape, fit the board height. * **Haptic Feedback**: Trigger a light vibration (Taptic Engine / standard vibration) when a valid match is made. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Music Mahjong

Music Mahjong is a captivating online puzzle game that brings together the timeless appeal of mahjong solitaire with the beauty of musical instruments. This free browser-based game features stunning artwork showcasing various musical instruments set against elegant violin and musical note backgrounds. With a solid 4.3/5 rating from players, Music Mahjong offers an engaging experience for both puzzle enthusiasts and music lovers.

Core Features

Beautiful Musical Theme

Immerse yourself in a world of musical beauty with tiles featuring: - String instruments : Guitars, harps, and violins - Wind instruments : Trumpets, flutes, and saxophones
- Percussion : Drums, cymbals, and tambourines - Traditional instruments : Accordions and other classical pieces

The game's backdrop features an elegant violin resting against flowing musical notes, creating a serene and inspiring atmosphere perfect for focused puzzle-solving.

Progressive Challenge System

Music Mahjong offers 30 unique levels , each with its own distinct tile pattern and difficulty curve. As you advance through the levels, the puzzles become increasingly complex, requiring strategic thinking and careful planning to clear all tiles within the time limit.

Competitive Scoring

Each level features: - Timer-based gameplay that adds excitement and urgency - Automatic score submission to global leaderboards - Point-based progression system - High score tracking to beat your personal best

Cross-Platform Compatibility

Built with HTML5 technology, Music Mahjong runs smoothly on: - Desktop computers (Windows, Mac, Linux) - Mobile devices (iOS and Android) - Tablets and touchscreen devices - All modern web browsers

Gameplay Mechanics

Basic Rules

Music Mahjong follows traditional mahjong solitaire rules with musical instrument tiles: 1. Match identical pairs of musical instrument tiles 2. Remove only open tiles - tiles that aren't covered and have at least one free side 3. Clear all tiles from the board to complete the level 4. Beat the timer to maximize your score

Strategic Elements

  • Pattern recognition : Each level presents unique tile arrangements
  • Time management : Balance speed with careful tile selection
  • Resource management : Use hints and shuffles wisely to maintain high scores

Operation Guide

Desktop Controls

  • Mouse click : Select and match tiles
  • Left click : Choose first tile, then click matching tile
  • Right panel : Monitor level progress, score, and remaining time

Mobile Controls

  • Touch screen : Tap tiles to select and match pairs
  • Pinch to zoom : Adjust view for better tile visibility
  • Swipe : Navigate around larger tile layouts

Helper Features

  • Hint system : Reveals possible matches when you're stuck
  • Shuffle option : Rearranges remaining tiles for new possibilities
  • Score display : Real-time tracking of your current performance

Pro Tips for Success

  1. Start with edge tiles to open up more possibilities
  2. Look for tiles with limited access first
  3. Plan several moves ahead to avoid getting stuck
  4. Use hints sparingly to maintain your score multiplier
  5. Practice pattern recognition to improve your speed

Why Play Music Mahjong

Perfect for Music Lovers

The beautiful musical instrument theme makes this more than just another mahjong game. Each tile celebrates the art of music, from classical orchestral instruments to modern band equipment. The violin backdrop and musical note details create an atmosphere that music enthusiasts will particularly appreciate.

Accessibility and Convenience

  • 100% free to play with no hidden costs or premium features
  • No downloads required - plays directly in your browser
  • Instant access - start playing within seconds
  • Safe for all ages with family-friendly content
  • No registration needed to begin playing immediately

Mental Benefits

Music Mahjong provides excellent cognitive exercise: - Pattern recognition skills development - Memory enhancement through tile matching - Strategic thinking and planning abilities - Stress relief through focused, meditative gameplay - Hand-eye coordination improvement

Competitive Element

With global leaderboards and score tracking, you can: - Compete against players worldwide - Challenge yourself to beat personal records - Track improvement over time - Share achievements with friends

Whether you're a mahjong veteran or new to tile-matching puzzles, Music Mahjong offers an perfect blend of familiar gameplay mechanics and fresh musical theming that keeps you coming back for more.

Frequently Asked Questions (FAQ)