Math Duck - Educational Math Puzzle Platformer Game

Seele01-Flash
By
Math Duck is an innovative educational platformer that combines mathematical problem-solving with fast-paced 2D action. Players must help a cute duck solve math quizzes correctly while navigating challenging platform obstacles, all within a strict 10-second time limit per level.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Math Duck". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** 2.5D Aesthetics using an **Orthographic Camera** to simulate the flat pixel-art look of the reference image. Use a vibrant color palette: Cyan (#3399ff) for the sky background, bright Green (#88cc00) for ground platforms, and Orange (#ffaa00) for checkered decorative borders or UI elements. * **Character:** The "Duck" should be represented as a simple white BoxGeometry (or a group of small boxes to simulate voxels) with a yellow beak. * **Level Design:** A grid-based platformer layout. * **Platforms:** Static blocks with collision logic. * **Number Blocks:** Distinct interactable cubes floating in the air, each displaying a number (1-9) on its face. * **Hazards:** Red spikes on the ground or walls. * **Objective Items:** A floating "Key" (Gold color) and a "Door" (Brown, changes texture/color when unlocked). * **Mobile Optimization:** Use simple geometries (BoxGeometry, PlaneGeometry) and basic materials (MeshLambertMaterial) to ensure 60FPS on mobile devices. Avoid complex lighting; use ambient light + one directional light. ### 2. Audio Requirements * **BGM:** A fast-paced, looping 8-bit / Chiptune track. It should feel urgent but cheerful, reflecting the short 10-second time limit. * **Sound Effects (SFX):** * **Jump:** A retro "jump" sound or a synthesized "Quack". * **Correct Answer:** A high-pitched 8-bit coin pickup sound. * **Wrong Answer/Hurt:** A low-pitched buzz or "dull thud". * **Timer Warning:** A ticking clock sound that speeds up when 3 seconds remain. * **Win/Exit:** A triumphant jingle. ### 3. Gameplay Loop * **The Mission:** The player has exactly **10 seconds** to solve a math equation shown at the top of the screen (e.g., "x + 5 = 7"). * **Sequence:** 1. **Solve:** The player must navigate the platforms to find the block labeled "2" and bump it from below (Mario style) or touch it. 2. **Key Spawn:** Once the correct number is hit, a Key spawns at a specific location. 3. **Escape:** The player must grab the Key, which unlocks the Door. Touching the open Door completes the level. * **Fail States:** * Time runs out (0 seconds). * Player touches the wrong number block. * Player touches spikes. * **Progression:** Procedurally generate simple math equations (Addition/Subtraction) that get slightly harder or place numbers in harder-to-reach spots as levels progress. ### 4. Mobile Controls & Interaction * **Orientation:** Force **Landscape Mode** for the best platforming view. * **Touch Controls:** Implement a custom on-screen virtual controller (HTML/CSS overlays on top of the Canvas). * **Left Side:** Two large buttons for **Left** and **Right** movement. * **Right Side:** A large circular button for **Jump**. * **Button Size:** Ensure touch targets are at least 60x60px for accessibility. * **Physics & Feel:** The movement must be "snappy" (high acceleration/deceleration), not floaty. This is a precision platformer. * **Feedback:** * Screen shake effect (mild) when hitting the correct number or dying. * Haptic feedback (navigator.vibrate) when picking up the key or hitting a block. * **UI Layout:** * **Top Center:** Large, pixel-font text displaying the Current Equation. * **Top Right:** Large Countdown Timer (starts at 10.00). * **Restart Button:** A visible 'R' button in the top corner for quick restarts. 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 Duck is a unique educational puzzle-platformer that transforms learning mathematics into an exciting gaming adventure. This challenging 2D game features a charming duck character who must solve math problems while navigating through various platform obstacles. With its pixel art style and time-pressure mechanics, Math Duck offers both entertainment and educational value for players of all ages.

The game stands out by combining traditional platformer gameplay with mathematical challenges, creating an engaging learning experience that keeps players coming back for more. Each level presents a series of math quizzes that must be answered in the correct order, adding a strategic element to the fast-paced action.

Core Features

Educational Gaming Experience

Math Duck seamlessly blends learning with entertainment, making it an excellent choice for: - Students looking to improve their math skills through gameplay - Parents seeking educational games for their children - Teachers wanting interactive math practice tools - Casual gamers who enjoy puzzle-solving challenges

Time-Pressure Gameplay

Each level features an intense 10-second time limit , creating: - Heart-pounding excitement as you race against the clock - Strategic decision-making about the quickest route to take - Improved mental math speed through repeated practice - Adrenaline-fueled learning that keeps players engaged

Challenging Platform Mechanics

The game combines math problems with classic 2D platformer elements: - Navigate through obstacle-filled levels - Collect keys after solving all math quizzes - Reach the exit door before time runs out - Master precise jumping and movement controls

Progressive Difficulty System

As you advance through levels, Math Duck introduces: - Increasingly complex mathematical problems - More challenging platform layouts - Additional obstacles and hazards - Faster-paced gameplay requiring quick thinking

How to Play

Basic Controls

  • WASD keys or Arrow keys : Move your duck character around the level
  • R key : Restart the current level if you get stuck or run out of time

The controls are simple and intuitive, making the game accessible to players of all skill levels while maintaining the challenge through puzzle complexity rather than control difficulty.

Game Mechanics

  1. Start each level by observing the math problems displayed
  2. Solve the quizzes in the correct sequential order
  3. Navigate platform obstacles while moving between quiz stations
  4. Collect the key that appears after answering all problems correctly
  5. Rush to the exit door before the 10-second timer expires
  6. Plan your route efficiently to maximize your chances of success

Strategy Tips

  • Quickly scan all math problems at the start of each level
  • Identify the easiest problems to solve first for confidence
  • Plan the most efficient path through the level layout
  • Practice mental math to improve your solving speed
  • Don't panic when the timer is running low - accuracy is crucial

Why Play Math Duck?

Perfect for Educational Use

Math Duck transforms traditional math practice into an engaging game experience. Unlike boring worksheets or flashcards, this game motivates learners through: - Immediate feedback on math problem solutions - Visual progress tracking through level completion - Competitive elements that encourage improvement - Stress-free learning disguised as entertainment

Ideal for All Skill Levels

Whether you're a math beginner or looking to sharpen your skills, Math Duck adapts to different learning needs: - Basic arithmetic for younger players - Progressive difficulty that grows with your abilities - Quick mental math practice for advanced learners - Problem-solving skills that transfer to real-world situations

Convenient Browser-Based Gaming

  • No downloads required - play instantly in your web browser
  • Cross-platform compatibility works on desktop and mobile devices
  • Quick gaming sessions perfect for short breaks or study periods
  • Always accessible from any device with internet connection

Retro Gaming Appeal

Fans of classic 2D platformers will appreciate: - Charming pixel art graphics reminiscent of retro games - Tight, responsive controls that feel familiar - Challenging but fair difficulty progression - Nostalgic gaming atmosphere combined with modern educational goals

Frequently Asked Questions (FAQ)