Merge the Numbers - Logic Number Puzzle Game

Seele01-Flash
By
Merge the Numbers is an addictive logic puzzle game where you connect and merge identical numbers to achieve the highest possible score. Perfect for math lovers and puzzle enthusiasts.

Prompt

MODEL: Seele01-Flash
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**: Use a **2.5D Orthographic camera view** to simulate the look of the reference screenshot. The game should feature "Candy-like" or "Jelly-like" aesthetics. * **Models (Blocks)**: Create rounded cubes (BoxGeometry with bevels or use textures with rounded corners) representing the number tiles. * **Color Palette**: Assign distinct, highly saturated colors to specific numbers (e.g., Red for low numbers, Gold/Green/Purple for high numbers) similar to the screenshot. * **Typography**: Use a bold, rounded sans-serif font for the numbers on the blocks. The text should be dark (brown or black) for high contrast. * **Background**: A soft, light blue background (`#D0F0F8`) with a subtle, static diamond or dot pattern grid to add texture without distraction. * **Effects**: * **Merge Effect**: When blocks merge, add a "squish" scale animation or a small particle explosion (confetti) to celebrate the combination. * **Selection Highlight**: When a player touches a block, it should glow or slightly scale up. * **Performance**: Use `InstancedMesh` if possible for the grid tiles to ensure 60FPS on mobile devices. Keep polygon count low. ### 2. Audio Requirements * **BGM (Background Music)**: A playful, repeating loop of "Marimba" or "Soft Synth" music. It should be upbeat but relaxing (Thinking/Puzzle mood). * **Sound Effects (SFX)**: * **Touch/Select**: A soft "pop" or water-drop sound. * **Merge Success**: A satisfying "ding" or "chord" that rises in pitch as the number value gets higher. * **Invalid Move**: A dull, low-pitched "thud" or buzzer. * **High Score**: A fanfare sound. ### 3. Gameplay Loop * **Grid System**: A 5x5 grid layout where blocks spawn. * **Core Mechanic**: * The grid is filled with blocks containing random numbers. * **Connection Logic**: The player must find adjacent blocks (horizontal, vertical, or diagonal) that share the **same number**. * **Merge Action**: The player drags a line connecting two or more identical blocks. Upon release, these blocks merge into a single block at the position of the last selected tile. * **Math Logic**: The new merged block contains a higher value (Logic: `Value * 2` OR `Value + 1`, depending on implementation simplicity. Default to `Value * 2` for a 2048-style progression, e.g., 2->4->8->16). * **Gravity/Spawning**: After a merge, existing blocks fall down to fill empty spaces, and new random blocks drop in from the top. * **Game Over**: The game ends when the grid is full and no adjacent identical numbers exist. * **Scoring**: Score increases based on the value of the merged blocks. Display current score at the top. ### 4. Mobile Controls & Interaction * **Touch Interaction**: * Implement `touchstart`, `touchmove`, and `touchend` event listeners mapped to a Three.js Raycaster. * **Drag-to-Connect**: The player touches a block and drags their finger. A visual line (using `Three.Line` or a trail renderer) should appear connecting the selected blocks to indicate the path. * **Screen Orientation**: Portrait mode is preferred. Ensure the camera frustum adjusts width dynamically so the 5x5 grid fits within the screen width on all mobile devices. * **UI Layout**: * Top: Score counter and "Best Score" display (large, readable fonts). * Center: The 5x5 Play Area. * Prevent default browser scrolling/zooming (`touch-action: none` in CSS). * **Haptic Feedback**: Trigger `window.navigator.vibrate(50)` when a valid merge is completed to give tactile confirmation. 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 logic-based puzzle game that challenges your mathematical thinking and strategic planning. This engaging number puzzle combines simple drag-and-drop mechanics with increasingly complex number merging challenges. The game's colorful, intuitive interface makes it accessible to players of all ages while providing depth that keeps puzzle enthusiasts coming back for more.

The core concept revolves around connecting identical numbers on a grid to merge them into higher values, creating a satisfying progression system that rewards both quick thinking and strategic planning.

Core Features

Simple Yet Addictive Gameplay

The game's strength lies in its elegant simplicity. Players drag to connect matching numbers, which then merge to create the next number in sequence. This creates a cascading effect where successful merges open up new possibilities for even bigger combinations.

Progressive Difficulty System

As you advance, the game becomes increasingly challenging with more numbers on the board and higher target scores. The difficulty curve is perfectly balanced to keep you engaged without becoming frustrating.

Cross-Platform Compatibility

  • Completely Free : No hidden costs or premium features
  • No Download Required : Play instantly in any web browser
  • Mobile Optimized : Responsive design works perfectly on smartphones and tablets
  • Desktop Ready : Full mouse and keyboard support for PC players

Mathematical Learning Benefits

While entertaining, the game also helps improve: - Number recognition and sequence understanding - Logical thinking and pattern recognition - Strategic planning and problem-solving skills - Mathematical confidence through gameplay

Game Mechanics

Basic Rules

  1. Connect : Drag from one number to an identical adjacent number
  2. Merge : Connected numbers combine into the next higher value
  3. Score : Higher number merges give exponentially more points
  4. Strategy : Plan your moves to create chain reactions

Scoring System

The scoring rewards efficiency and large merges. Creating higher numbers through strategic combinations yields significantly more points than simple merges, encouraging players to think several moves ahead.

How to Play

Getting Started

  1. Launch the Game : Open in any web browser - no installation needed
  2. Understand the Grid : Numbers appear on a colorful grid layout
  3. Make Your First Move : Click and drag from one number to an identical adjacent number
  4. Watch the Magic : Connected numbers merge automatically into higher values

Advanced Strategies

  • Plan Ahead : Look for opportunities to create chain reactions
  • Corner Strategy : Work from corners to avoid blocking future moves
  • Number Sequence : Understand how numbers progress (2→4→8→16→32...)
  • Space Management : Keep the board from filling up completely

Controls

  • Mouse/Touch : Click and drag to connect numbers
  • Mobile Touch : Tap and swipe gestures for seamless mobile play
  • Keyboard : Arrow keys for navigation (desktop)

Why Play Merge the Numbers

Perfect for All Skill Levels

Whether you're a casual player looking for a quick mental break or a puzzle enthusiast seeking a challenging brain workout, Merge the Numbers adapts to your skill level. The learning curve is gentle enough for beginners while offering enough depth for experienced players.

Stress-Free Gaming

Unlike time-pressured puzzle games, Merge the Numbers lets you think at your own pace. There are no timers or pressure elements - just pure strategic thinking and satisfying number combinations.

Educational Value

The game subtly reinforces mathematical concepts while being genuinely fun. It's an excellent tool for students, adults looking to keep their minds sharp, or anyone who enjoys number-based challenges.

Accessibility

With its browser-based platform, you can play anywhere - at home, during breaks, or while commuting. The game saves your progress automatically, so you never lose your achievements.

Frequently Asked Questions (FAQ)