Mahjong Firefly - Classic Tile Matching Puzzle Game

Seele01-Flash
By
Mahjong Firefly is an enchanting tile-matching puzzle game that brings the classic mahjong experience to your browser. Clear beautifully designed traditional tiles from the board before time runs out in this captivating free-to-play game.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Mahjong Firefly". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Create an "Enchanting Night" atmosphere. The background should be a deep, dark blue gradient (reminiscent of a night sky) featuring a subtle, slowly rotating traditional Chinese lattice pattern overlay or vignette borders. * **3D Models (Tiles)**: * Generate 3D Mahjong tiles with slightly rounded corners (bevels) to catch highlights. * The tile backs should be a warm, golden-orange or amber color, contrasting with the creamy white faces. * Use high-contrast textures for standard Mahjong symbols (Bamboo, Circles, Characters, Winds, Dragons). ensure the symbols look slightly embossed or engraved. * **Particle Effects (The "Firefly" Theme)**: * **Ambient**: Create soft, glowing yellow-green firefly particles that drift lazily in the background depth, fading in and out. * **Interaction**: When tiles are successfully matched and removed, trigger a burst of brighter "spark" particles that trail upwards like released fireflies. * **Performance**: Use instanced mesh rendering for the tiles to ensure 60fps on mobile devices. Keep geometry simple (low-poly rounded cubes). ### 2. Audio Requirements * **BGM**: A tranquil, mystical track featuring a Guzheng (Chinese zither) or a gentle harp, combined with soft night ambience (crickets chirping very faintly). The tempo should be slow and relaxing despite the timer mechanism. * **SFX**: * **Tile Select**: A crisp, wooden "clack" sound (simulating hard plastic or bone tiles touching). * **Tile Match**: A satisfying magical chime or soft bell sound, accompanied by a "whoosh" for the removal animation. * **Time Warning**: A subtle ticking clock sound that fades in only when the last 10 seconds remain. * **Win/Level Clear**: A short, uplifting pentatonic melody. ### 3. Gameplay Loop * **Core Mechanic**: Standard Mahjong Solitaire rules. The player must select two identical free tiles (a tile is free if it has no tile on top of it and has an empty space on either its left or right side). * **Level Design**: * Start with a classic "Turtle" or "Pyramid" formation. * Implement a 3D stacking logic where tiles cast subtle shadows on the layers below them to aid depth perception. * **Time Constraint**: Include a countdown timer bar at the top of the screen. If time runs out, the game ends. * **Hint System**: If the player is idle for 5 seconds, subtly highlight a pair of matchable tiles with a pulsing glow. * **Win Condition**: The board is completely cleared. * **Fail Condition**: No more moves are possible (Shuffle option appears) OR Time runs out. ### 4. Mobile Controls & Interaction * **Camera & Orientation**: * **Fixed Portrait Mode** (Vertical) preferred for one-handed play, or responsive layout that keeps the board centered. * The camera should be orthographic or have a narrow FOV perspective to minimize distortion at the edges. * **Touch Input**: * **Tap to Select**: Raycasting should be precise. Use a slightly larger invisible hit-box for each tile to accommodate "fat fingers" on smaller screens. * **Visual Feedback**: When a tile is tapped, lift it slightly (y-axis translation) and give it a golden outline glow to indicate selection. If the second tap is a mismatch, shake both tiles gently and drop the selection. * **UI Layout**: * **Top**: Timer bar (visual gauge) and Score/Level counter. * **Bottom**: Large, thumb-friendly buttons for "Pause" and "Shuffle/Hint" (min-height 48px). * **Haptics**: Trigger a light vibration (using `navigator.vibrate`) on successful matches. 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 Firefly is a captivating puzzle game that combines the timeless appeal of traditional mahjong with modern gameplay mechanics. This free online game challenges players to match and remove identical tiles from intricately designed boards within a limited time frame. With its elegant visual design and progressively challenging levels, Mahjong Firefly offers both relaxation and mental stimulation for puzzle enthusiasts of all skill levels.

Core Features

Mahjong Firefly stands out among tile-matching games with several compelling features:

  • Authentic Mahjong Experience : Features traditional Chinese mahjong tiles with classic symbols and characters
  • Time-Based Challenge : Each level comes with a time limit, adding excitement and urgency to the gameplay
  • Progressive Difficulty : Levels become increasingly complex with more tiles and intricate arrangements
  • High Score System : Compete for the best scores and track your improvement over time
  • Free-to-Play : Completely free with no downloads required - play instantly in your browser
  • Cross-Platform Compatible : Works seamlessly on desktop computers, laptops, tablets, and smartphones

Beautiful Visual Design

The game features stunning traditional mahjong tiles set against enchanting backgrounds. Each tile is carefully crafted with authentic Chinese characters and symbols, providing an immersive cultural experience while maintaining excellent readability for gameplay.

Engaging Gameplay Mechanics

Unlike traditional mahjong solitaire, Mahjong Firefly focuses on pattern recognition and quick decision-making. Players must identify matching pairs of tiles and remove them strategically to clear the entire board before the timer expires.

Game Gameplay

The objective in Mahjong Firefly is straightforward yet challenging: match and remove all tiles from the board before time runs out. Players must:

  1. Scan the Board : Look for pairs of identical tiles that can be matched
  2. Strategic Matching : Click on matching tiles to remove them from the board
  3. Time Management : Complete each level within the given time limit
  4. Progress Through Levels : Successfully clear boards to unlock new, more challenging arrangements
  5. Score Optimization : Aim for quick matches and efficient clearing to achieve higher scores

The game becomes progressively more challenging as players advance, with more complex tile arrangements and tighter time constraints that test both speed and strategy.

Operation Guide

Mahjong Firefly features intuitive controls that make it accessible to players of all ages:

  • Mouse Control : Use your left mouse button to select and match tiles
  • Tile Selection : Click on any available tile to select it
  • Matching : Click on a second tile that matches the first to remove both from the board
  • Deselection : Click elsewhere or on the same tile to deselect
  • Menu Navigation : Use mouse clicks to navigate menus and options

The simple one-click control system ensures that players can focus on strategy and pattern recognition rather than complex controls.

Why Play This Game

Mahjong Firefly offers numerous benefits that make it an excellent choice for puzzle game enthusiasts:

Mental Exercise : Regular play helps improve concentration, pattern recognition, and strategic thinking skills. The time pressure adds an element that enhances cognitive processing speed.

Stress Relief : Despite the time limits, the game provides a meditative quality through its beautiful visuals and the satisfaction of clearing tiles systematically.

Cultural Appreciation : Experience authentic Chinese mahjong tiles and symbols, providing insight into this ancient game's rich cultural heritage.

Accessibility : No downloads, installations, or account creation required. Simply open your browser and start playing immediately on any device.

Progressive Challenge : The difficulty curve ensures that both beginners and experienced players will find appropriate challenges that keep the game engaging over time.

Perfect for Short Sessions : Each level can be completed in just a few minutes, making it ideal for quick gaming breaks or longer puzzle-solving sessions.

Frequently Asked Questions (FAQ)