Number Pairs - Number Puzzle

Seele01-Flash
By
Number Pairs is an addictive number puzzle game that challenges your math skills and logical thinking. Match identical numbers or pairs that add up to 10 to clear the board and achieve high scores.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Number Pairs - Number Puzzle". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: A clean, minimalist "Paper Notebook" aesthetic. The background should be a textured off-white/cream color (hex: #FDFBF7) resembling high-quality paper. * **Grid System**: Use `THREE.InstancedMesh` for the number tiles to ensure high performance on mobile devices (target 60fps). The grid should be 9 columns wide. * **Number Tiles**: The numbers (1-9) should look like they are written in ink (dark grey/black) or printed on slightly raised paper tiles to create soft shadows. Use a clean Serif font (load a font like 'Roboto Slab' or similar via FontLoader). * **Camera**: Use a `THREE.OrthographicCamera` to maintain a flat, puzzle-like perspective, locked in a top-down view. * **Effects**: When numbers are cleared, use a "paper scrap" particle effect where the tile fragments into small pieces and fades out. * **UI Layer**: Create a HUD overlay using HTML/CSS absolute positioning on top of the canvas for the Score (top center), Back button (top left), Sound toggle (top right), and the bottom action buttons (Add Numbers `+`, Hint). ### 2. Audio Requirements * **BGM**: A relaxing, lo-fi, zen-style acoustic piano or soft guitar track that loops seamlessly to encourage focus. * **Sound Effects (SFX)**: * **Select**: A soft "pencil tap" or "paper touch" sound. * **Match/Clear**: A satisfying "scribble" or "page crinkle" sound. * **Invalid Move**: A subtle dull thud or soft shaker sound. * **Add Rows**: A "page turning" or "card shuffling" sound. * **Win/High Score**: A cheerful, short chime. ### 3. Gameplay Loop * **Core Mechanic**: The player selects two numbers to match them. A valid match clears both numbers from the grid. * **Matching Rules**: 1. **Equal Value**: The two numbers are identical (e.g., 5 and 5). 2. **Sum of 10**: The two numbers add up to 10 (e.g., 1 and 9, 3 and 7). * **Adjacency Logic (Crucial)**: * Matches can be Horizontal, Vertical, or Diagonal. * Matches can "wrap around" (the last number of a row matches the first number of the next row). * **Gap Skipping**: The logic must ignore already cleared (empty) cells. Two numbers separated *only* by empty cells are considered adjacent. * **"Add Numbers" Feature**: Implement a function for the bottom `+` button. When clicked, it copies all remaining visible numbers on the board and appends them to the bottom of the grid in the same order, extending the game. * **Win Condition**: Clear the entire board. * **Scoring**: +10 points per cleared pair. Bonus points for clearing a full row. ### 4. Mobile Controls & Interaction * **Touch Input**: Use `THREE.Raycaster` mapped to touch events (`touchstart`, `touchend`). * **Selection State**: * First tap: Highlight the tile (e.g., turn the number blue or lift the tile slightly). * Second tap (on valid partner): Draw a line connecting them briefly, then clear both. * Second tap (on invalid partner): Shake the second tile visually and deselect the first one. * **Orientation**: Force or optimize for **Portrait Mode**. * **Hit Area**: Ensure touch detection is generous (add a slightly larger invisible bounding box around each number) to accommodate thumb sizes. * **Feedback**: trigger `navigator.vibrate(10)` on valid selection and `navigator.vibrate([30, 50, 30])` on a successful match if the device supports it. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Number Pairs - Number Puzzle is an engaging mathematical puzzle game that combines strategy, logic, and quick thinking. This free online game challenges players to find and match number pairs on a grid, either by matching identical numbers (like 6-6, 7-7) or finding pairs that add up to 10 (such as 1-9, 3-7, 4-6). With its simple yet addictive gameplay mechanics, Number Pairs offers endless hours of brain-training entertainment.

The game features a clean, intuitive interface displayed on a grid where numbers are arranged in rows and columns. Players must strategically identify matching pairs while considering the positioning rules and available moves. As you progress, the challenge intensifies, requiring more complex thinking and pattern recognition skills.

Core Features

Complete Free-to-Play Experience

Enjoy unlimited gameplay without any cost. No downloads, installations, or premium subscriptions required - simply open your browser and start playing immediately.

Educational Value

This isn't just entertainment - it's a powerful brain training tool that improves: - Mathematical skills through addition and number recognition - Pattern recognition abilities - Strategic thinking and planning - Visual perception and attention to detail - Problem-solving capabilities

Cross-Platform Compatibility

Perfectly optimized for both desktop and mobile devices, allowing you to enjoy seamless gameplay whether you're at home or on the go. The responsive design ensures optimal performance across all screen sizes.

Progressive Difficulty System

The game starts with simple number arrangements but gradually increases in complexity, keeping players engaged and challenged as their skills develop.

High Score System

Compete with yourself and track your progress through the integrated scoring system. Try to beat your personal best and achieve perfect board clears.

Game Mechanics

Basic Matching Rules

The core gameplay revolves around two types of matches: 1. Identical pairs : Match two numbers that are exactly the same (2-2, 5-5, 9-9) 2. Sum-to-ten pairs : Find two different numbers that add up to exactly 10 (1-9, 2-8, 3-7, 4-6)

Positioning Requirements

Numbers can be matched if they are: - Adjacent horizontally (side by side in the same row) - Adjacent vertically (stacked in the same column) - Adjacent diagonally (touching at corners) - Line-wrapping : A number at the end of one line can match with a number at the beginning of the next line - Gap-jumping : Empty cells between matching numbers don't prevent valid matches

Strategic Elements

Success requires planning ahead and considering: - Which pairs to clear first for maximum board optimization - How to create new matching opportunities - When to add new numbers to continue gameplay - Optimal clearing patterns for highest scores

How to Play

Getting Started

  1. Launch the game in your web browser - no download needed
  2. Study the number grid to identify potential matches
  3. Tap or click on two numbers that form a valid pair
  4. Watch them disappear as you clear the board
  5. Continue matching until no more pairs are available
  6. Add new numbers using the ? button when stuck

Winning Strategy Tips

  • Scan systematically : Check each row and column methodically
  • Prioritize accessibility : Clear numbers that will open up more matching opportunities
  • Think ahead : Consider how each move affects future possibilities
  • Use the add function wisely : New numbers can create fresh matching opportunities
  • Practice pattern recognition : Develop quick identification of sum-to-ten combinations

Why Play Number Pairs?

Perfect Brain Exercise

This game provides excellent mental stimulation, combining mathematical calculation with spatial reasoning. It's an ideal way to keep your mind sharp while having fun.

Suitable for All Ages

Whether you're a student looking to improve math skills, an adult seeking brain training, or a senior wanting to maintain cognitive function, Number Pairs offers appropriate challenges for every skill level.

Stress-Free Gaming

Unlike time-pressured games, Number Pairs allows you to think at your own pace, making it perfect for relaxation and mindful gaming sessions.

Educational Benefits

Teachers and parents appreciate this game for its educational value in reinforcing basic arithmetic, number recognition, and logical thinking skills in an engaging format.

No Commitment Required

Play for 5 minutes or 5 hours - the game saves your progress and adapts to your available time, making it perfect for both quick brain breaks and extended gaming sessions.

Frequently Asked Questions (FAQ)