Merge and Double - Number Tile Matching Game

Seele01-Flash
By
Merge and Double is an addictive number puzzle game where you match identical tiles to double their values. Strategically combine numbers to reach the highest possible score and unlock powerful bonuses.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Merge and Double**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Create a "Juicy" 2.5D aesthetic using an Orthographic Camera tilted slightly (approx 45 degrees) to show depth. The style should be vibrant, glossy, and clean. * **The Grid:** A 4x4 grid board. The board background should be a dark, semi-transparent navy blue to contrast with the bright tiles. * **Tile Design:** * Use `RoundedBoxGeometry` for the tiles to create smooth "squaricle" shapes (chamfered edges). * **Material:** Use `MeshPhysicalMaterial` with moderate roughness (0.2) and clearcoat (1.0) to mimic the "shiny plastic" look seen in the screenshot. Add a white specular highlight in the top-left corner as a texture or lighting effect. * **Color Coding:** Implement a dynamic color system based on tile value: * 2: Bright Blue (#007BFF) * 4: Cyan (#00E5FF) * 8: Lime Green (#76FF03) * 16: Yellow/Orange (#FFC400) * 32: Dark Orange (#FF3D00) * 64+: Pink/Purple/Gold gradients. * **Typography:** Render numbers using 3D text (TextGeometry) or high-res canvas textures mapped to the top face. Font should be bold and rounded (sans-serif). * **Lighting:** Soft ambient light + a Directional Light casting soft shadows to the bottom-right to give the tiles volume. * **Mobile Optimization:** Use a single geometry for all cubes and update colors/textures to minimize draw calls. Ensure textures are power-of-two. ### 2. Audio Requirements * **BGM:** A looping, low-tempo "thinking" track. Soft synthesizer pads with a light rhythmic beat. It should not be distracting. * **Sound Effects (SFX):** * **Merge Sound:** A satisfying "Pop" or "Bloop" sound that increases in pitch as the numbers get higher. * **Invalid Move:** A dull "Thud" or low-pitch wobble. * **High Score:** A "Fanfare" or magical chime when reaching 2048 or beating a high score. * **UI Click:** A crisp, short "Click" sound. ### 3. Gameplay Loop * **Core Mechanic (Tap to Merge):** * Detect clusters of **2 or more** adjacent (up/down/left/right) tiles of the same value. * **Input:** When the player taps one tile in a valid cluster, all other tiles in that cluster merge *into* the tapped position. * **Result:** The tapped tile becomes `Value * 2`. The other tiles disappear. * **Gravity:** Existing tiles above the empty spaces fall down to fill gaps. * **Refill:** New random tiles (usually '2' or '4') spawn at the top of the columns to fill the remaining empty spaces. * **Goal:** Create the highest number possible (2048 and beyond) and achieve the highest score. * **Game Over:** The game ends when the grid is full and no adjacent tiles have the same value (no moves possible). * **Power-ups (Optional Logic):** Include placeholder logic for a "Hammer" (destroy one block) to simulate the power-ups mentioned in the description. ### 4. Mobile Controls & Interaction * **Controls:** Raycaster implementation for touch/click detection. * **Tap:** Selects and triggers the merge on the specific tile. * **Orientation:** Force or optimized for **Portrait Mode** (vertical alignment) to suit the 4x4 grid on phone screens. * **Responsiveness:** * Prevent default browser gestures (zooming/scrolling) using CSS (`touch-action: none`). * Ensure the camera frustum resizes dynamically so the 4x4 grid always fits within the screen width with a small margin. * **Feedback (Juice):** * **Visual:** When tiles merge, play a "Squash and Stretch" scale animation on the resulting tile. * **Haptic:** Trigger `navigator.vibrate(50)` on a successful merge for tactile feedback. * **Particles:** Simple particle explosion (confetti) when a high-value tile (e.g., 64 or higher) is created. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Merge and Double is a captivating number puzzle game that challenges your strategic thinking and mathematical skills. In this colorful tile-matching adventure, your goal is to combine identical numbers to create progressively larger values. The game follows a simple yet addictive principle: when two tiles with the same number touch, they merge into one tile with double the value!

The vibrant game board features a 4x4 grid filled with numbered tiles in bright, eye-catching colors. Starting with smaller numbers like 2, 4, and 8, you'll work your way up to massive numbers like 2048 and beyond. Each successful merge brings you closer to achieving the ultimate high score.

Core Features

Strategic Number Merging

The heart of Merge and Double lies in its strategic gameplay mechanics. Unlike simple matching games, every move requires careful planning. You need to consider not just immediate matches, but also how your moves will affect future possibilities on the board.

Progressive Difficulty System

As numbers grow larger, the challenge intensifies. What starts as simple 2+2=4 combinations evolves into complex strategic decisions involving tiles worth thousands of points. The game naturally adapts to your skill level, providing endless entertainment.

Power-Up System

When you find yourself stuck or need a strategic advantage, multiple power-ups are available to help you continue your number-merging journey. These boosters can clear unwanted tiles, shuffle the board, or provide other helpful effects to keep the game flowing.

Colorful Visual Design

Each number value is represented by a distinct color, making it easy to identify matching opportunities at a glance. The intuitive color coding system helps players quickly spot potential merges across the game board.

Gameplay Mechanics

Basic Rules

The fundamental gameplay is elegantly simple: arrange identical numbers next to each other to merge them. When two tiles of the same value are adjacent, they automatically combine into a single tile with double the original value. For example, two "4" tiles merge to create one "8" tile.

Scoring System

Your score increases with each successful merge, with higher-value combinations providing exponentially greater point rewards. The challenge lies in creating the longest possible chains of merges to maximize your scoring potential.

Board Management

As you play, new tiles continuously appear on the board. Managing space becomes crucial as the grid fills up. Strategic planning helps ensure you always have room for new tiles while maintaining merge opportunities.

Operation Guide

Simple Controls

Merge and Double features incredibly intuitive controls suitable for players of all ages:

  • Click or Tap : Simply click on desktop or tap on mobile devices to select and merge adjacent tiles with matching numbers
  • Drag and Drop : Move tiles around the board to create optimal positioning for merges
  • Touch Gestures : On mobile devices, use natural touch gestures to interact with the game elements

Strategic Tips

  • Focus on creating larger numbers in corners to avoid blocking smaller tile movement
  • Plan several moves ahead to create cascading merge opportunities
  • Use power-ups strategically when the board becomes too crowded
  • Keep one corner dedicated to building your highest-value tile

Why Play This Game

Perfect Brain Training

Merge and Double serves as excellent mental exercise, combining mathematical thinking with strategic planning. Regular play helps improve problem-solving skills and numerical reasoning.

Accessible to Everyone

The game's simple mechanics make it instantly playable for beginners, while the depth of strategy keeps experienced puzzle gamers engaged for hours. No complex rules to learn – just start playing and improve naturally.

Stress-Free Gaming

Unlike time-pressured puzzle games, Merge and Double allows you to play at your own pace. Take time to consider your moves and develop your strategy without rushing.

Cross-Platform Compatibility

Enjoy seamless gameplay across all your devices. Start a game on your computer during lunch break, then continue on your smartphone during your commute. Your progress and high scores sync automatically.

Completely Free Experience

Access the full game experience without any paywalls or premium restrictions. All features, power-ups, and game modes are available from day one, ensuring every player gets the complete Merge and Double experience.

Frequently Asked Questions (FAQ)