Math Duck - Educational Math Puzzle Platformer

Seele01-Flash
By
Math Duck is an innovative educational platformer that combines math learning with fast-paced puzzle solving. Help a cute duck solve math quizzes while navigating challenging levels, all within a 10-second time limit per stage.

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 Voxel Pixel Art". Use an **Orthographic Camera** to simulate a 2D retro look while using 3D geometries. * **Color Palette**: Bright and saturated. Background should be a tiling **Orange/Dark Orange Checkerboard** texture (glsl shader or texture map). Skybox is not needed; use the flat patterned background. * **Player Model**: A simple Voxel Duck (composed of white cubes for body, yellow for beak/feet). * **Level Construction**: Grid-based tile map. * **Ground**: Grass blocks (Green top, dirt sides). * **Obstacles**: Spikes and floating platforms. * **Interactive Blocks**: Blocks with Numbers (0-9) clearly visible on the front face. * **Key & Door**: A floating golden key model and a simple door frame (Closed sprite/mesh initially, Open sprite/mesh when unlocked). * **Mobile Optimization**: Use `THREE.InstancedMesh` for repeated environmental blocks (grass, dirt) to reduce draw calls. Set texture filtering to `THREE.NearestFilter` to maintain sharp pixel edges. ### 2. Audio Requirements * **BGM**: Fast-paced, high-energy **8-bit Chiptune** track that induces a sense of urgency (matching the 10-second timer). * **Sound Effects (SFX)**: * **Jump**: A cute, short 8-bit "Quack" or rising slide whistle. * **Collect Number (Correct)**: Retro high-pitch "Ding" or coin sound. * **Collect Number (Wrong)**: Low-pitch "Buzz" or error noise. * **Key Pickup**: Magical jingle. * **Timer Warning**: Ticking clock sound when time < 3 seconds. * **Win/Door Entry**: Level clear fanfare. ### 3. Gameplay Loop * **Objective**: Solve the displayed math equation, grab the key, and reach the door within **10 seconds**. * **Mechanics**: 1. **Start**: The player spawns, and a math equation (e.g., "x + 2 = 5") appears in the UI. A 10-second countdown begins immediately. 2. **Puzzle Solving**: The player must find the block containing the correct answer ("3") in the level and bump it (collision). * **Correct**: The block disappears. If it was the final part of the equation, the **Key** spawns. * **Wrong**: The block turns red briefly, and the player is knocked back (or the level restarts immediately due to difficulty). 3. **Progression**: Once the Key is collected, the **Door** unlocks (visually opens). 4. **Win Condition**: Touching the unlocked door before the timer hits 0.00. 5. **Lose Condition**: Timer hits 0.00 (Duck explodes into pixels) or falling off the map. Pressing a "Restart" button allows instant retry. ### 4. Mobile Controls & Interaction * **Screen Orientation**: **Landscape Mode** (Force landscape if possible via CSS warning). * **Touch Controls**: Use an on-screen virtual gamepad overlay (HTML/CSS layered over Canvas). * **Left Hand**: Two large arrows (Left / Right) anchored to the bottom-left corner. * **Right Hand**: A large circular "Jump" button (A) anchored to the bottom-right corner. * **Feedback**: * Add **Vibration/Haptic Feedback** (using `navigator.vibrate`) when hitting blocks, collecting keys, or dying. * Buttons should visually depress or glow when touched. * **UI Layout**: * **Top Center**: Large pixel-font timer (e.g., "10.00"). Change color to Red when < 3s. * **Below Timer**: The Math Equation (e.g., "Find: 5 + ? = 9"). * **Top Right**: Pause/Restart button (min-size 44x44px for touch accessibility). 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 revolutionary educational platformer that transforms math learning into an exciting adventure. This unique game combines traditional platforming mechanics with mathematical problem-solving, creating an engaging experience that makes learning math fun and challenging. Players must help an adorable duck character navigate through levels while solving math quizzes under intense time pressure.

The game features a distinctive pixel art style with bright, colorful graphics that appeal to players of all ages. Each level presents a carefully crafted challenge that tests both your mathematical skills and platforming abilities, making it perfect for students, teachers, and anyone looking to sharpen their math skills in an entertaining way.

Core Features

Educational Value

  • Math Skill Development : Practice arithmetic operations in a fun, interactive environment
  • Time Management : Learn to solve problems quickly under pressure
  • Progressive Difficulty : Levels gradually increase in complexity to match your improving skills
  • Instant Feedback : Immediate results help reinforce learning

Gameplay Mechanics

  • Unique Hybrid Genre : First-of-its-kind combination of platforming and math education
  • Time Challenge : Intense 10-second countdown adds excitement to each level
  • Strategic Planning : Find the optimal route to solve quizzes in the correct order
  • Skill-Based Progression : Success depends on both math knowledge and quick thinking

Technical Excellence

  • Cross-Platform Compatibility : Perfect performance on desktop and mobile browsers
  • No Download Required : Instant access through any modern web browser
  • Responsive Design : Adapts seamlessly to different screen sizes
  • Smooth Performance : Optimized for lag-free gameplay

Game Mechanics

Math Duck presents a unique challenge where players must solve mathematical problems in a specific sequence while navigating platform obstacles. Each level contains multiple math quizzes that must be answered correctly and in the proper order. Once all quizzes are completed, a key appears that unlocks the exit door.

The 10-second time limit creates urgency that keeps players engaged while reinforcing quick mental math skills. This time pressure simulates real-world scenarios where quick mathematical thinking is valuable, making the game both entertaining and practically educational.

Operation Guide

The game features intuitive controls suitable for all skill levels:

  • Movement : Use WASD keys or arrow keys to move the duck character
  • Navigation : Jump and run through platforms to reach math quiz stations
  • Restart : Press R to restart the current level if needed
  • Strategy : Plan your route efficiently to solve all quizzes within the time limit

Winning Strategy

  1. Survey the Level : Quickly identify all quiz locations and plan your route
  2. Prioritize Order : Remember that quizzes must be solved in the correct sequence
  3. Mental Math : Practice quick calculations to save precious seconds
  4. Efficient Movement : Take the shortest path between quiz stations
  5. Stay Calm : Don't let the timer pressure affect your mathematical accuracy

Why Play Math Duck

For Students

Math Duck transforms traditional math practice into an exciting game experience. Instead of boring worksheets, students engage with mathematical concepts through dynamic gameplay that maintains their attention and motivation. The time pressure element helps develop mental math fluency, a crucial skill for academic success.

For Educators

Teachers can use Math Duck as an innovative classroom tool that makes math instruction more engaging. The game provides immediate feedback and can help identify students who need additional support with mental math skills. Its browser-based accessibility means it can be easily integrated into any computer-equipped classroom.

For Casual Gamers

Even if you're not specifically looking to improve math skills, Math Duck offers a unique gaming experience that's unlike anything else available. The combination of platforming action and puzzle-solving creates a fresh challenge that exercises both reflexes and cognitive abilities.

Brain Training Benefits

Regular play helps improve: - Mental Math Speed : Quick arithmetic under pressure - Problem-Solving Skills : Strategic thinking and route planning - Focus and Concentration : Maintaining accuracy while under time constraints - Hand-Eye Coordination : Precise platforming movements

Frequently Asked Questions (FAQ)