Math Push - Mathematical Puzzle Game

Seele01-Flash
By
Math Push is an innovative mathematical puzzle game that combines logic and arithmetic. Move numbered blocks strategically to create correct math expressions and progress through challenging levels.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Math Push". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Camera & Perspective**: Use an **Orthographic Camera** positioned at an isometric angle (e.g., 45 degrees) to provide a clear, depth-perceived view of the grid without perspective distortion. * **Visual Style**: Minimalist, clean, and modern 3D. The aesthetic should be "Soft Geometric." * **Color Palette**: Use a cool color scheme. Background: Deep Indigo/Purple (#3a3a6e). Floor: Checkerboard pattern of lighter purple/blue to clearly delineate grid cells. * **Player Character**: A distinct, bright cube (e.g., Neon Cyan or Orange) with slightly rounded corners (use Bevel geometry). * **Blocks**: * **Number Blocks**: Dark Blue cubes with white borders. Texture each face with a large, high-contrast white number (0-9). * **Operator Blocks**: Similar to number blocks but with a distinct accent color (e.g., slight Green tint) displaying math symbols (+, -, =, >). * **Environment**: A "Wall" border surrounding the level layout to keep the player contained. * **Effects**: When blocks move, add a subtle dust particle effect at the base. When an equation is solved, the blocks should glow or pulse briefly. * **Mobile Optimization**: Use low-poly geometries (BoxGeometry). Bake static shadows if possible, or use a single DirectionalLight casting shadows for the player/blocks to maintain high FPS on mobile browsers. ### 2. Audio Requirements * **BGM (Background Music)**: A looping, "Thinky" Lo-Fi or ambient electronic track. It should be relaxing and repetitive to aid concentration, not distracting. * **Sound Effects (SFX)**: * **Move**: A soft "whoosh" or sliding sound (like felt on wood). * **Push**: A heavier sliding sound when moving a block. * **Collision**: A subtle "thud" when hitting a wall. * **Success/Solve**: A satisfying, harmonious chime (major chord) when a math expression is correctly aligned. * **Undo/Reset**: A "tape rewind" or "pop" sound. * **UI Click**: Standard soft mechanical click. ### 3. Gameplay Loop * **Core Mechanic**: Sokoban-style block pushing on a grid. The player controls a character that can move Up, Down, Left, or Right and push one block at a time. * **Logic Puzzle**: The objective is to arrange the Number and Operator blocks to form valid mathematical equations (e.g., pushing blocks to form "2 + 2 = 4" horizontally or vertically). * **Level Progression**: * The level contains "locked" tiles or an Exit Door. * **Win Condition**: Depending on the specific level design logic, either: 1. Solving the specific equation on the floor markings opens the exit. 2. Or, simply arranging the blocks to match a target sum clears the level. * The player walks through the open Exit to trigger the next level. * **Constraints**: Blocks cannot be pulled, only pushed. If a block is pushed into a corner, it might get stuck (requiring a Reset or Undo). ### 4. Mobile Controls & Interaction * **Movement Controls (Swipe)**: Implement robust touch gesture detection. * **Swipe Up/Down/Left/Right**: Moves the player one grid step in that direction. Movement should be snapped to the grid (smooth interpolation between tiles). * *Sensitivity*: Ensure swiping is responsive but prevents accidental double-moves. * **UI Controls (HUD)**: * **Undo Button**: A dedicated circular button with a "Back Arrow" icon, placed in the bottom-left corner. Tap to reverse the last move (store move history stack). * **Reset Button**: A dedicated circular button with a "Refresh" icon, placed in the bottom-right corner. Tap to restart the level. * **Menu/Pause**: Top-right corner. * **Haptic Feedback**: Trigger a short vibration (`navigator.vibrate(10)`) when the player successfully pushes a block or hits a wall, providing tactile confirmation. * **Screen Adaptation**: The game must resize dynamicially. The camera zoom should adjust so the entire level fits within the width of a vertical mobile screen (Portrait mode preferred, but responsive to Landscape). Buttons must have a minimum touch target size of 48x48px. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Math Push is a captivating puzzle game that transforms mathematical problem-solving into an engaging block-moving challenge. This unique game combines the satisfaction of puzzle-solving with the mental stimulation of arithmetic, creating an experience that's both educational and entertaining.

The game features a clean, intuitive 2D interface with numbered blocks and mathematical operators displayed on a grid. Players must strategically move these elements to form correct mathematical expressions, making each level a brain-teasing adventure that rewards logical thinking and mathematical skills.

Core Features

Educational Entertainment

Math Push brilliantly disguises learning as play, making it perfect for students, educators, and anyone looking to sharpen their mathematical reasoning skills. The game progressively increases in difficulty, ensuring continuous mental growth.

Strategic Block Movement

Every move matters in Math Push. You'll need to think several steps ahead to position numbers and operators correctly, creating a satisfying blend of strategy and mathematics that keeps players engaged for hours.

Progressive Challenge System

The game features multiple levels of increasing complexity, starting with simple addition and subtraction before introducing more complex mathematical concepts. Each solved puzzle unlocks new challenges that test your growing skills.

Minimalist Design

The clean 2D graphics focus your attention on the puzzle elements without distractions, featuring a calming purple background with clearly visible white numbers and green mathematical operators.

Game Mechanics

Math Push operates on simple yet engaging mechanics. Players move numbered blocks and mathematical operators around a grid to create valid equations. The challenge lies in positioning these elements correctly while working within the constraints of the puzzle layout.

The game rewards careful planning and logical thinking. You'll often need to move blocks in a specific sequence to avoid getting stuck, making each level a mini-strategy challenge that combines spatial reasoning with mathematical knowledge.

Operation Guide

Mastering Math Push is straightforward with these essential controls:

  • Movement : Use WASD keys or Arrow Keys to move blocks in four directions
  • Undo Move : Press Z or U to reverse your last move when you make a mistake
  • Reset Level : Hit R to restart the current puzzle from the beginning
  • Navigate Back : Use Esc or B to return to the previous menu

The game responds instantly to your inputs, allowing for smooth gameplay and quick corrections when needed. The undo feature is particularly valuable for experimenting with different solutions without penalty.

Why Play Math Push

Math Push offers a unique gaming experience that combines entertainment with education. It's perfect for players who enjoy:

  • Mental Stimulation : Exercise your brain with challenging mathematical puzzles
  • Skill Development : Improve arithmetic skills and logical reasoning
  • Stress-Free Learning : Learn math concepts in a relaxed, game-like environment
  • Quick Sessions : Perfect for short gaming breaks or extended puzzle-solving sessions
  • Achievement Satisfaction : Experience the rewarding feeling of solving complex mathematical challenges

Whether you're a student looking to improve your math skills, a teacher seeking educational games, or simply someone who enjoys brain teasers, Math Push delivers an engaging experience that makes mathematics fun and accessible.

Frequently Asked Questions (FAQ)