Pizza Division - Educational Math Puzzle Game

Seele01-Flash
By
Pizza Division combines the fun of pizza making with essential math learning. Cut pizza slices equally, practice various math skills, and unlock new levels by solving mathematical challenges.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Pizza Division". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Casual, "Cooking Mama" style cartoon aesthetic with bright, appetizing colors (warm yellows, oranges, reds). * **Camera View**: **Orthographic Top-Down Camera** (looking straight down at the table) to ensure precision for the slicing mechanic. * **Core Models**: * **The Table**: A textured plane with a wooden pattern or a red-and-white checkered tablecloth. * **The Pizza**: A flattened cylinder geometry with a crust-colored edge and a cheese-colored top. Add simple small cylinders or circles on top to represent toppings (pepperoni, mushrooms) for visual flair. * **The Knife/Cut Line**: A dashed line or a semi-transparent white trail rendered using `THREE.Line` or `THREE.TubeGeometry` that follows the user's touch input. * **UI Overlay**: A clean HTML/CSS overlay floating above the canvas showing: "Target Slices: X", "Time Remaining", and a "Ready/Serve" button. * **Performance**: Use `BoxGeometry` and `CylinderGeometry` with low segment counts (e.g., `radialSegments: 32` for the pizza is sufficient). Avoid complex lighting; use ambient light + one directional light (simulating a kitchen lamp). ### 2. Audio Requirements * **BGM**: Light, upbeat "Italian Restaurant" style music (accordion or acoustic guitar loops). * **Sound Effects (SFX)**: * **Slicing**: A sharp "Schwing" or "Swoosh" sound when a cut line is drawn. * **Success**: A "Ding" or cash register sound when the pizza is cut into the correct number of slices. * **Fail**: A comical "Buzz" or plate breaking sound if the slices are very unequal. * **UI**: Soft clicks for buttons. ### 3. Gameplay Loop * **Phase 1: The Kitchen (Dexterity)** * The game displays a Target Number (e.g., "Cut into 4 slices"). * The player draws lines across the pizza. * **Logic**: Instead of physically splitting the mesh (which is expensive), calculate the **angles** between the drawn lines. * **Scoring**: When the player hits "Serve", compare the number of resulting sectors to the Target Number. Calculate the variance in sector angles (perfect = 360/N). Give a star rating (1-3 stars) based on how equal the slices are. * **Phase 2: The Manager's Quiz (Math/Education)** * After serving 3 pizzas (or when a timer expires), trigger a "Math Break". * Overlay a modal with a simple math question (Randomized: Addition, Subtraction, or Multiplication). * The player must answer 5 questions correctly to "Unlock" the next baking shift (return to Phase 1). * **Game Over**: If the timer runs out during the pizza phase before meeting the quota. ### 4. Mobile Controls & Interaction * **Input Method**: Touch and Drag. * `touchstart`: Defines the starting point of a cut (on the pizza edge). * `touchmove`: Draws a preview line. * `touchend`: Finalizes the cut. * **Control Logic**: The cut line must pass through (or very near) the center of the pizza to be valid. If a line doesn't cross the pizza fully, invalidate it. * **Orientation**: **Portrait Mode** preferred for mobile (easier for one-handed cutting), but the canvas should resize responsively to fit the width. * **Feedback**: * **Visual**: The cut line should glow or turn green if it's a valid cut (crossing the geometry). * **Haptic**: Trigger `navigator.vibrate(50)` when a cut is successfully finalized. * **UI Zones**: Ensure buttons (like "Serve Pizza") are at the bottom of the screen and at least 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

Pizza Division is an innovative educational puzzle game that makes learning math as enjoyable as eating pizza! With an impressive 4.3/5 rating, this game successfully combines entertainment with education, helping students practice essential math skills while managing a virtual pizzeria.

This HTML5-based game is perfect for students, teachers, and parents looking for an engaging way to reinforce mathematical concepts. Whether you're practicing basic division, addition, multiplication, or exploring geometry and percentages, Pizza Division makes learning interactive and fun.

Core Features

Educational Excellence

  • Multiple Math Skills : Practice division, addition, multiplication, geometry, percentages, and more
  • Grade-Appropriate Content : Select your grade level for age-appropriate challenges
  • Progressive Learning : Answer 5 questions correctly to unlock new sessions
  • Visual Learning : Cut pizza slices to understand fractions and division concepts

Engaging Gameplay

  • Restaurant Simulation : Help run a pizzeria while learning math
  • Time-Based Challenges : Balance speed and accuracy for the best scores
  • Equal Slice Challenge : Develop spatial reasoning by cutting perfectly equal pieces
  • Preview System : Visual guides show you the target slice pattern

Accessibility Features

  • Cross-Platform Compatibility : Works seamlessly on computers, tablets, and smartphones
  • User-Friendly Interface : Simple drag-and-cut mechanics suitable for all ages
  • No Download Required : Play instantly in your web browser
  • All Ages Content : Safe and appropriate for learners of all ages

Game Mechanics

Pizza Cutting Phase

Your primary task is to cut pizzas into the specified number of equal slices. Using intuitive drag controls, you'll slice through delicious-looking pizzas while developing your understanding of fractions and spatial reasoning. The game provides visual feedback to help you achieve perfectly equal portions.

Math Challenge Phase

After each pizza-cutting session, you'll face 5 math questions related to your chosen skill level and topic. Successfully answering these questions unlocks the next restaurant session, creating a rewarding progression system that motivates continued learning.

How to Play

Getting Started

  1. Select Your Grade Level : Choose the appropriate difficulty for your math level
  2. Pick a Math Skill : Focus on division, multiplication, addition, or other mathematical concepts
  3. Enter the Pizzeria : Begin your restaurant management adventure

Pizza Cutting Mechanics

  • Drag to Cut : Use your finger or mouse to drag across the pizza and create slices
  • Match the Number : Cut the pizza into exactly the number of slices shown on screen
  • Aim for Equality : Make slices as equal as possible for higher scores
  • Use the Preview : Reference the target pattern to guide your cuts
  • Select Ready : Confirm your cuts when satisfied with the result

Advancing Through Levels

Complete the math quiz after each session by answering 5 questions correctly. You can switch between different math skills during gameplay, allowing you to focus on areas where you need more practice.

Why Play Pizza Division?

Educational Benefits

  • Practical Math Application : See how math applies to real-world scenarios like cooking and serving
  • Multiple Learning Styles : Combines visual, kinesthetic, and analytical learning approaches
  • Skill Reinforcement : Regular practice helps cement mathematical concepts
  • Confidence Building : Success in the game translates to improved math confidence

Entertainment Value

  • Engaging Theme : Pizza is universally appealing, making math practice enjoyable
  • Achievement System : Unlock new levels and challenges as you progress
  • Instant Feedback : Immediate results help you learn from mistakes
  • Stress-Free Learning : No pressure environment encourages experimentation

Perfect for homeschooling, classroom use, or individual study, Pizza Division transforms math practice from a chore into an exciting adventure. Start your mathematical pizza journey today!

Frequently Asked Questions (FAQ)