Merge the Numbers - Number Puzzle Game

Seele01-Flash
By
Merge the Numbers is an addictive number puzzle game where you drag and merge identical tiles to multiply their values. Test your strategy skills as you aim for the highest possible score while managing limited board space.

Prompt

MODEL: Seele01-Flash
Based on the game description and the provided visual style, here is the detailed technical prompt to guide an AI in generating the Three.js code. *** Please use Three.js to generate a **mobile-first game** with the theme "**Merge the Numbers**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style (Glossy Cartoon 2.5D):** Create a clean, bright aesthetic that mimics high-quality mobile UI. The game should be built in 3D but viewed from a fixed Orthographic camera top-down perspective to simulate a 2D interface with depth. * **Tile Design:** Each number block should be a rounded cube (geometry: `BoxGeometry` with beveled edges or `RoundedBoxGeometry`). * **Materials:** Use `MeshPhysicalMaterial` with high roughness (0.2) and transmission (glassy look) or standard high-gloss plastic look to make them look like shiny candy or buttons. * **Color Coding:** Assign distinct, vibrant, saturated colors to different number tiers (e.g., 5 is gold, 16 is red, 8 is blue, 9 is purple, 1 is cream). * **Typography:** The numbers on the tiles must be bold, sans-serif, and dark contrasting colors (dark brown or black) centered on the top face. * **Background:** A soft, pastel blue background with a subtle, repeating diamond or grid pattern (use a shader or a simple tiled texture) that moves very slowly to add life without distracting. * **Particles:** Generate small "confetti" or "sparkle" particle explosions using `PointsMaterial` whenever two blocks merge successfully. * **Performance:** Use `InstancedMesh` for the tiles if possible to optimize performance on mobile devices, or ensure geometry sharing. Limit dynamic lights; use a baked-style lighting setup (AmbientLight + one DirectionalLight for shadows). ### 2. Audio Requirements * **BGM (Background Music):** A lighthearted, looping "think music" track. Style: Marimba or Pizzicato strings, mid-tempo (100 BPM), relaxing but engaging, similar to casual puzzle games like Candy Crush or Threes. * **Sound Effects (SFX):** * *Pick Up:* A soft "pop" or suction sound when a tile is dragged. * *Merge Success:* A satisfying, harmonious "ding" or "chime" (increasing in pitch as numbers get higher). * *Invalid Move:* A dull, rubbery "thud" or spring noise. * *New Row Spawning:* A "woosh" slide sound. * *Game Over:* A descending "womp-womp" or glass breaking sound. ### 3. Gameplay Loop * **Grid System:** Create a dynamic grid (e.g., 5x6 or 6x7) invisible slot system where tiles reside. * **Core Mechanic:** * Players can drag a tile from its current position and drop it onto another tile. * **Merge Logic:** If the dropped tile has the same number as the target tile, they merge. The target tile's number updates (multiplies or increments based on game logic, e.g., 2+2=4 or matching game style logic), and the dragged tile is removed. * **Spawn Logic:** If the player fails to make a merge within a certain time or turn count (or manually triggers it), a new row of random low-number blocks pushes up from the bottom, shifting all existing blocks up. * **Scoring:** Score increases based on the value of the merged block. Display the score prominently at the top. * **Game Over Condition:** The game ends if the blocks reach the top of the screen (fill the grid) and a new row tries to spawn. Show a "Game Over" modal with a "Restart" button. ### 4. Mobile Controls & Interaction * **Touch Input (Raycasting):** Implement a robust Raycaster system for touch events (`touchstart`, `touchmove`, `touchend`). * *Touch Start:* Raycast to find the tile. slightly lift the tile (change Y position) and scale it up by 1.1x to indicate selection. * *Touch Move:* The selected tile should strictly follow the finger/cursor position on the X/Z plane (clamped within screen bounds). * *Touch End:* Raycast downwards to check if it overlaps with another tile. If valid merge -> Merge. If invalid -> Snap back to original position using a spring animation (Tween.js). * **Screen Orientation:** Portrait Mode (Vertical) is mandatory. The camera zoom must adapt to fit the grid width on different aspect ratios (from 16:9 to 19.5:9). * **Haptic Feedback:** Trigger `navigator.vibrate(10)` on a successful merge for tactile satisfaction. * **UI Layout:** * Top: Current Score (large font). * Center: The Play Area. * Bottom: A visual indicator or timer showing when the next row will appear. 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 the Numbers is a captivating skill and puzzle game that combines mathematical thinking with strategic planning. This colorful number-matching experience challenges players to merge identical number tiles, multiplying their values to achieve the highest possible scores. With its simple drag-and-drop mechanics and progressively challenging gameplay, it's the perfect brain training exercise for puzzle enthusiasts of all ages.

The game features vibrant, colorful tiles numbered from 1 upwards, each with distinct colors that make identification quick and intuitive. As you progress, the numbers grow exponentially, creating an exciting challenge to see how high you can climb.

Core Features

Addictive Merge Mechanics

The core gameplay revolves around a simple yet engaging concept: drag identical number tiles together to merge them into higher values. When two tiles with the same number combine, they multiply to create a new tile with double the value, creating a satisfying progression system.

Strategic Challenge

Success requires more than just matching numbers. Players must think ahead and plan their moves carefully, as poor positioning can quickly fill the board. Each move matters, making every decision count toward your final score.

Progressive Difficulty

As you merge tiles and create higher numbers, the game becomes increasingly challenging. New rows of blocks appear when you can't make moves, adding pressure and requiring quick thinking to avoid game over.

Colorful Visual Design

Each number is represented by a distinctly colored tile, making it easy to identify matching pairs at a glance. The clean, bright aesthetic creates an enjoyable visual experience that complements the gameplay.

Free Browser Gaming

Enjoy unlimited play sessions without any cost. The game runs smoothly in web browsers across desktop and mobile devices, requiring no downloads or installations.

Game Mechanics

The objective is straightforward but engaging: merge tiles with identical numbers to increase their value and score points. The challenge lies in managing your board space efficiently while planning future moves.

Scoring System

Your score increases with each successful merge, with higher-value tiles contributing more points. The goal is to reach the highest possible numbers while maintaining board control.

Board Management

When no more merges are possible, new rows of number tiles appear at the bottom of the screen. If these tiles fill the entire playing area, the game ends, making space management crucial for extended play sessions.

Operation Guide

Basic Controls

  • Mouse/Touch : Click and drag any tile to move it around the playing field
  • Drag and Drop : Move tiles by dragging them from their current position to their target location
  • Merge : Drop a tile onto another tile with the same number to combine them

Gameplay Strategy

  1. Identify Matches : Look for tiles with identical numbers
  2. Plan Ahead : Consider how each move affects future possibilities
  3. Manage Space : Keep the board organized to prevent filling up too quickly
  4. Prioritize High Values : Focus on creating and merging larger numbers for better scores
  5. Stay Alert : Watch for new rows appearing when no moves are available

Why Play Merge the Numbers

This game perfectly balances accessibility with depth, making it ideal for both casual players seeking a quick mental challenge and serious puzzle enthusiasts looking for strategic gameplay. The simple rules mean anyone can start playing immediately, while the escalating difficulty ensures long-term engagement.

The mathematical element provides excellent brain training, helping improve number recognition, strategic planning, and spatial reasoning skills. Each game session offers a fresh challenge, as the random placement of new tiles ensures no two games play exactly the same way.

Whether you have five minutes or an hour, Merge the Numbers adapts to your schedule while providing consistent entertainment and mental stimulation.

Frequently Asked Questions (FAQ)