Mahjong Card Solitaire - Free Online Card Matching Game

Seele01-Flash
By
Mahjong Card Solitaire combines classic mahjong gameplay with traditional solitaire cards. Match cards by both suit and number across 10 timed levels in this innovative puzzle game.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Mahjong Card Solitaire**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** A clean, relaxing 3D puzzle environment. The aesthetic should blend a "Casino Card Table" feel with the structural depth of "Mahjong". * **Tile Models:** Create 3D tiles (rounded box geometry) representing the deck. * **Dimensions:** The tiles should have significant thickness (Z-axis) to show depth when stacked. * **Textures:** The top face displays standard Playing Card faces (Ace through King, 4 Suits). The sides and back should be an ivory/white plastic material. * **Layouts:** Implement a layout generator capable of stacking tiles in 3D patterns (e.g., the classic "Turtle" or "Pyramid" formations). * **Environment:** A simple, high-contrast background (e.g., a green felt table or warm wooden surface) to ensure the white tiles pop. * **Lighting:** Use a Directional Light to cast soft shadows to the bottom-right of tiles (essential for the player to understand the 3D stacking order) plus Ambient Light for general visibility. * **Performance:** Use `InstancedMesh` for the tiles to reduce draw calls, ensuring 60FPS on mobile devices. ### 2. Audio Requirements * **BGM:** A relaxing, "Lounge Jazz" or "Bossa Nova" track. It should be unobtrusive and loop seamlessly to aid concentration. * **Sound Effects (SFX):** * **Selection:** A crisp "plastic click" or "thock" sound when a tile is tapped. * **Match/Clear:** A satisfying "swish" or magical chime when two tiles are successfully paired and removed. * **Invalid Move:** A subtle dull "thud" or wooden sound if a player taps a blocked tile. * **Shuffle:** The sound of cards riffling. * **Win/Level Complete:** An uplifting short fanfare. ### 3. Gameplay Loop * **Core Mechanic:** The goal is to clear the board by matching **pairs of identical tiles**. * **Matching Rule:** Unlike some solitaire games, this is strict matching. A "7 of Hearts" can ONLY match with another "7 of Hearts". * **"Free Tile" Logic (Crucial):** A tile can only be selected if it is "Free". * **Condition 1:** No tile is physically on top of it (partially or fully). * **Condition 2:** It has an open space on either its immediately Left OR Right side. * **Level System:** * Start with a full formation (e.g., 144 tiles). * **Timer:** Implement a countdown timer per level (e.g., 5 minutes). If time runs out -> Game Over. * **Win Condition:** Clear all tiles before time runs out -> Unlock next level. * **Power-ups (Limited Use):** * **Hint:** Highlights a valid pair (limit 3). * **Shuffle:** Rearranges remaining tiles if no moves are possible (limit 3). * **Undo:** Reverts the last move (limit 3). ### 4. Mobile Controls & Interaction * **Camera:** Use an **Orthographic Camera** angled at roughly 45-60 degrees. This prevents perspective distortion, making it easier to judge which tiles are aligned in the grid. * **Touch Interaction:** * Implement a **Raycaster** for accurate touch detection. * **Selection State:** When a valid tile is tapped, it should visually "lift" up slightly (y-axis translation) and emit a glow (e.g., yellow outline). * **Invalid Feedback:** If a blocked tile is tapped, it should wiggle or shake briefly to indicate it cannot be played. * **UI Layout:** * **Orientation:** Support both Portrait and Landscape (responsive camera zoom). * **HUD:** Place the Score, Timer, and Level indicator at the top. * **Action Bar:** Place large, thumb-friendly buttons (44px+ hit area) for Hint, Shuffle, and Undo at the bottom of the screen. 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 Card Solitaire is an innovative puzzle game that brilliantly combines the strategic gameplay of traditional mahjong with familiar solitaire cards. Rated 4.3/5 by players, this unique online game challenges you to match cards based on both suit and number, creating a fresh twist on classic card matching games.

Unlike traditional mahjong that uses tiles with Chinese symbols, this game uses standard playing cards that are instantly recognizable. The familiar hearts, diamonds, clubs, and spades make the game accessible to players worldwide while maintaining the challenging strategic depth that mahjong is known for.

Core Features

Unique Gameplay Mechanics

  • Dual Matching System : Cards must match both suit AND number - no partial matches allowed
  • 10 Progressive Levels : Each level increases in complexity with different card layouts
  • Timed Challenges : Race against the clock to clear all cards before time runs out
  • Strategic Depth : Plan your moves carefully as only "free" cards can be selected

Player Assistance Tools

The game provides helpful tools when you're stuck: - 3 Hints : Highlights available matching pairs when you need guidance - 3 Shuffles : Rearranges remaining cards to create new matching opportunities - 3 Undos : Take back your last move if you made a mistake

Complete Free Experience

  • No Download Required : Play instantly in your web browser
  • HTML5 Technology : Smooth performance on all modern devices
  • Mobile Optimized : Perfect touch controls for smartphones and tablets
  • Global Leaderboards : Submit your scores and compete with players worldwide

Game Mechanics

Card Selection Rules

To successfully match cards in Mahjong Card Solitaire:

  1. Free Tiles Only : Select cards that are not covered by other cards and have at least one side (left or right) completely free
  2. Perfect Matching : Both the suit (hearts, diamonds, clubs, spades) and number must be identical
  3. Strategic Planning : Think ahead as removing certain cards can free up or block access to others

Level Progression

Each of the 10 levels features: - Unique Layouts : Different card arrangements that require new strategies - Time Limits : Increasing difficulty with tighter time constraints - Unlock System : Complete each level to access the next challenge

How to Play

Basic Controls

  • Mouse/Touch : Click or tap on cards to select them
  • Matching : Select two cards that have identical suit and number
  • Tools Access : Use the upper right panel to access hints, shuffles, and undo options

Winning Strategy Tips

  1. Scan for Obvious Pairs : Start with easily accessible matches to free up more cards
  2. Plan Ahead : Consider which cards your moves will expose or block
  3. Save Tools : Use hints, shuffles, and undos sparingly - you only get 3 of each per level
  4. Time Management : Keep an eye on the clock and don't spend too long on difficult decisions

Why Play This Game

Mahjong Card Solitaire offers the perfect blend of familiar and fresh gameplay. If you enjoy puzzle games, card games, or brain teasers, this game provides:

  • Instant Recognition : No need to learn complex tile symbols - just standard playing cards
  • Mental Exercise : Improves pattern recognition and strategic thinking
  • Casual Gaming : Perfect for quick breaks or extended puzzle sessions
  • Progressive Challenge : 10 levels ensure you'll always have new challenges to tackle
  • Competitive Element : Leaderboards add replay value as you strive to improve your scores

Whether you're a mahjong enthusiast looking for a new twist or a card game lover seeking innovative gameplay, Mahjong Card Solitaire delivers an engaging puzzle experience that's both familiar and refreshingly different.

Frequently Asked Questions (FAQ)