Match 4 - Number Puzzle Game

Seele01-Flash
By
Match 4 is an engaging number puzzle game that challenges players to match colorful hexagonal tiles containing numbers. Test your strategic thinking and pattern recognition skills in this free mobile-friendly puzzle experience.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Match 4 - Hexagonal Number Merge". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Clean, "Juicy" Low-poly aesthetic. Use an Orthographic Camera to simulate a 2.5D isometric view, giving the board depth without perspective distortion. * **Grid System**: Create a Hexagonal Grid (Honeycomb layout). The grid background should be darker (e.g., dark slate/brown) with slightly indented sockets for the tiles. * **Tile Models**: 3D Extruded Hexagons with beveled edges. * **Color Palette**: * 1: Yellow (#FFD700) * 2: Bright Blue (#1E90FF) * 4: Purple (#9370DB) * 8: Red (#FF4500) * 16: Green (#32CD32) * 32: Dark Brown/Maroon (#8B4513) * Higher numbers: Distinct, vibrant colors. * **Text**: White, bold numbers centered on top of each tile texture. * **Lighting**: Soft Ambient Light + Directional Light (casting soft shadows to the bottom-right) to emphasize the 3D depth of the tiles. * **Effects**: When tiles merge, trigger a particle explosion (simple colored cubes) and a scaling "pop" animation using a tween library (like GSAP concept, manually implemented if needed). * **Mobile Optimization**: Use a single geometry for all hexes (InstancedMesh preferred if possible, otherwise simple Mesh cloning) to keep draw calls low. ### 2. Audio Requirements * **BGM**: A relaxing, loopable "Thinking/Puzzle" track. Soft electric piano or marimba. * **Sound Effects (SFX)**: * *Selection*: A soft, high-pitched "tick". * *Merge Success*: A satisfying, rising chord or "pop" sound. The pitch should increase slightly as the number value gets higher (e.g., merging 1s sounds lower than merging 32s). * *Invalid Move*: A low, dull thud. * *Game Over*: A descending scale or "power down" sound. ### 3. Gameplay Loop * **Core Mechanic**: Hexagonal Tile Merging (Logic similar to "2048" but on a Hex grid with "Match 3" rules). * **State**: The board starts with random low-number tiles (1s and 2s). * **Action**: The player taps a specific tile on the grid. * **Logic**: 1. If the tapped tile is adjacent to **at least 2** other tiles of the *same number*, all connected identical tiles fly toward the tapped position. 2. They merge into one single tile at the tapped location. 3. The value of the new tile is multiplied by 2 (e.g., three '2's become one '4'). 4. Empty spaces created by the merge are filled by new random tiles falling in from the top (or appearing via scale-up animation). * **Goal**: Create the highest number possible (aiming for 2048 and beyond). * **Fail Condition**: If the grid is full and no adjacent matches exist, the game is over. * **Scoring**: Score += (Value of merged tile) * (Number of tiles merged). ### 4. Mobile Controls & Interaction * **Input Handling**: Use `Raycaster` for touch detection. * `touchstart`: Detect the specific hex tile the user tapped. * Prevent default browser zooming/scrolling (`touch-action: none` in CSS). * **Orientation**: Portrait Mode (Vertical). The grid should scale to fit the width of the phone screen. * **UI Layout**: * **Top**: "High Score" and "Current Score" displayed clearly (large font). * **Center**: The 3D Canvas. * **Bottom**: A minimalist "Restart" button (min-height 44px for touch targets). * **Feedback**: * **Haptic**: Trigger `navigator.vibrate(10)` on a successful tap. * **Visual**: Highlight the selected group of tiles slightly (emission or brightness up) when the player touches one, before releasing to confirm the merge. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Match 4 is an innovative number puzzle game that combines strategic thinking with colorful visual design. Players work with hexagonal tiles containing numbers, creating matches to score points and progress through increasingly challenging levels. With a player rating of 3.8/5, this game offers an accessible yet engaging puzzle experience that appeals to casual gamers and puzzle enthusiasts alike.

Core Features

Match 4 delivers a unique puzzle experience with several standout features:

  • Free to Play : Completely free online game with no hidden costs or premium content
  • Cross-Platform Compatibility : Built with HTML5 technology for seamless play on desktop and mobile devices
  • Intuitive Gameplay : Easy-to-learn mechanics make it perfect for players of all skill levels
  • Colorful Design : Vibrant hexagonal tiles with clear number displays for excellent visual appeal
  • High Score System : Compete with yourself and track your progress with built-in scoring
  • Mobile Optimized : Touch-friendly interface designed specifically for mobile gaming

Strategic Number Matching

The game revolves around matching numbered hexagonal tiles strategically placed on the game board. Each tile features a distinct color and number combination, requiring players to think ahead and plan their moves carefully.

Progressive Challenge

As you advance through the game, the puzzles become more complex, introducing new tile arrangements and requiring more sophisticated matching strategies to achieve high scores.

Game Gameplay

Match 4 features straightforward yet engaging mechanics:

  • Objective : Match four or more hexagonal tiles with the same numbers to clear them from the board
  • Tile Movement : Drag and drop tiles to create strategic combinations
  • Scoring : Earn points for successful matches, with bonus points for larger combinations
  • Board Management : Clear tiles efficiently to prevent the board from filling up
  • Chain Reactions : Create cascading matches for maximum point potential

The hexagonal tile system adds a unique twist to traditional matching games, as tiles can connect in six different directions, offering more strategic possibilities than conventional square-grid puzzles.

Operation Guide

Getting started with Match 4 is simple:

  • Mouse/Touch Controls : Click and drag tiles on desktop, or use touch gestures on mobile devices
  • Tile Selection : Tap or click on tiles to select them for movement
  • Match Creation : Position tiles adjacent to others with matching numbers
  • Board Navigation : Use zoom and pan controls (where available) to navigate larger game boards
  • Menu Access : Access game settings, high scores, and help through the main menu

The game automatically detects valid matches and clears matched tiles, making the gameplay flow smooth and intuitive for players of all experience levels.

Why Play This Game

Match 4 stands out in the crowded puzzle game market for several compelling reasons. The hexagonal tile system provides a fresh take on matching mechanics, offering more strategic depth than traditional grid-based games. The number-based gameplay adds an educational element, helping players practice pattern recognition and basic arithmetic skills while having fun.

The game's mobile-first design ensures you can enjoy quick puzzle sessions anywhere, whether you're commuting, taking a break, or relaxing at home. The progressive difficulty curve keeps the experience engaging without becoming frustratingly difficult, making it perfect for both short gaming sessions and extended play periods.

With no download required and instant browser-based access, Match 4 offers immediate entertainment value. The high score system provides replay value, encouraging players to improve their performance and develop more efficient matching strategies over time.

Frequently Asked Questions (FAQ)