Math Slither - Educational Snake Math Game

Seele01-Flash
By
Math Slither combines the classic snake game concept with educational math practice. Guide your worm to eat correct answers and grow bigger while avoiding wrong solutions and other worms in this engaging learning experience.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Math Slither**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: A vibrant, "cute" low-poly or 2.5D aesthetic similar to *Slither.io*. The background should be a dark, tiled hexagonal grid (infinite scrolling effect) to make the colorful entities pop. * **Player & Enemies**: * **Worms**: Composed of a Head sphere (with two simple eye meshes for cuteness) and multiple Body spheres that trail behind. * **Colors**: The player is bright green/blue; enemy AI worms are randomized distinct colors (purple, orange, red). * **Movement Trail**: A subtle particle trail or glow effect behind the tail to indicate speed. * **Collectibles (Answers)**: Instead of standard food orbs, the field is scattered with **floating glowing numbers**. Correct answers should glow green slightly; wrong answers can look neutral or distinct. * **Mobile Optimization**: Use `THREE.InstancedMesh` for background tiles if possible. Limit the maximum number of displayed AI worms to 5 to maintain 60 FPS on mobile browsers. Use simple geometries (SphereGeometry) with low segment counts (e.g., 16 segments). ### 2. Audio Requirements * **BGM**: A playful, looping, synth-pop track that is upbeat but not distracting (think "thinking music"). * **Sound Effects (SFX)**: * **Eating Correct Answer**: A satisfying "Chime" or "Crunch" sound combined with a "Level Up" pitch shift. * **Eating Wrong Answer**: A "Buzzer" or "Deflating" sound. * **Movement**: A very soft, continuous low-frequency hum or sliding sound. * **Collision/Death**: A soft "Thud" followed by a digital disintegration sound. ### 3. Gameplay Loop * **The Math Mechanism**: * A HUD at the top center constantly displays an equation (e.g., "5 + 3 = ?"). * The arena spawns multiple number orbs. Only one matches the solution; others are distractors. * **Correct Eat**: +1 Score, +1 Body Segment length, and a new equation is generated immediately. * **Wrong Eat**: -1 Body Segment length. If length reaches 0, Game Over. * **Survival & Combat**: * The player always moves forward automatically. * **Collision Rule**: If the player's **Head** hits an Enemy's **Body**, the player dies (Game Over). If an Enemy hits the player's body, the Enemy dies and turns into "Bonus Points" (star particles). * **AI Behavior**: Simple bots that move in random smooth curves, avoiding edges and preferentially moving toward nearby number orbs. ### 4. Mobile Controls & Interaction * **Control Scheme**: **"Follow Finger"** logic. The worm's head should smoothly rotate to face the current touch position on the screen. * *Logic*: Calculate the angle between the worm's head and the touch point on the ground plane. Apply rotational interpolation (slerp) for smooth turning, not instant snapping. * **Screen Orientation**: Locked to **Landscape** mode for a wider field of view. * **UI Layout**: * **Math Problem**: Large, bold white text at the **Top Center** (HTML overlay on top of Canvas for crispness). * **Score**: Top Right. * **Joystick (Optional)**: If "Follow Finger" feels clunky, implement a virtual joystick in the Bottom Left corner (min size 100px diameter). * **Feedback**: * **Haptic**: Trigger a short vibration (using `navigator.vibrate(200)`) when the player hits an enemy or eats a wrong answer. * **Visual**: Screen shake (camera jitter) upon death. Flash the screen Red for wrong answers, Green for correct ones. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Math Slither

Math Slither is an innovative educational puzzle game that transforms math learning into an exciting adventure. With a solid 4.1/5 rating, this game successfully combines the addictive mechanics of classic snake games with comprehensive math education. Players navigate through a colorful world filled with slithering worms, where mathematical knowledge becomes the key to survival and growth.

The game creates an immersive learning environment where students from preschool to eighth grade can practice essential math skills while having fun. Unlike traditional educational games that feel like disguised homework, Math Slither makes learning feel like play through its engaging gameplay mechanics and competitive elements.

Core Features

Comprehensive Math Curriculum

Math Slither covers an extensive range of mathematical concepts: - Elementary Skills : Addition, subtraction, and basic number recognition - Intermediate Topics : Multiplication, division, and problem-solving - Advanced Concepts : Decimals, fractions, and complex calculations - Grade-Appropriate Content : Tailored difficulty from preschool through 8th grade

Engaging Snake-Style Gameplay

The game brilliantly adapts the beloved snake game formula for educational purposes: - Growth Mechanics : Correct answers make your worm grow longer and stronger - Penalty System : Wrong answers cause your worm to shrink, adding consequence to mistakes - Competitive Elements : Avoid other worms while competing for the highest score - Arena Survival : Navigate through challenging environments filled with mathematical obstacles

Kid-Friendly Design

  • Cute Graphics : Colorful, whimsical worm characters that appeal to children
  • Intuitive Controls : Simple mouse or touch controls suitable for all ages
  • Safe Environment : All-ages content rating ensures appropriate gameplay
  • Instant Feedback : Immediate visual responses help reinforce learning

Game Mechanics

How Growth Works

Your mathematical worm starts small but grows with each correct answer consumed. The growth system creates a visual representation of learning progress, making abstract mathematical concepts tangible and rewarding. Students can literally see their knowledge expanding as their worm becomes longer and more powerful.

Strategic Elements

Beyond simple math practice, the game introduces strategic thinking: - Risk Assessment : Players must quickly evaluate which numbers represent correct answers - Spatial Awareness : Navigation skills develop alongside mathematical abilities - Time Management : Quick decision-making under pressure enhances mental math skills

Educational Benefits

Multi-Grade Learning Support

The game's adaptive difficulty system makes it valuable for diverse learning levels: - Preschoolers : Basic number recognition and simple counting - Elementary Students : Core arithmetic operations and problem-solving - Middle Schoolers : Complex calculations involving fractions and decimals

Learning Reinforcement

The immediate feedback system helps students understand mistakes quickly, while the growth rewards create positive associations with correct mathematical thinking. This combination of instant gratification and educational content makes learning stick.

Controls and Gameplay

Simple Control Scheme

  • Mouse Control : Click and drag to guide your worm toward correct answers
  • Touch Support : Perfect for tablets and smartphones with intuitive finger controls
  • Cross-Platform : Seamless experience across desktop and mobile devices

Game Objectives

  1. Solve Problems : Read the mathematical question displayed on screen
  2. Navigate Carefully : Guide your worm to numbers that represent correct answers
  3. Avoid Hazards : Stay away from wrong answers and other competing worms
  4. Grow and Survive : Build the longest, strongest mathematical worm possible

Why Choose Math Slither

Perfect Learning Tool

Math Slither succeeds where many educational games fail by making learning genuinely enjoyable. The competitive elements and visual progress tracking motivate continued play, while the comprehensive curriculum ensures educational value. Teachers and parents appreciate how the game makes math practice feel like recreation rather than work.

Accessibility and Convenience

  • Free to Play : No cost barriers to quality math education
  • Browser-Based : No downloads required - play instantly online
  • Universal Access : Works on computers, tablets, and smartphones
  • No Registration : Jump straight into learning without account creation

Whether you're a student looking to improve math skills, a parent seeking engaging educational content, or a teacher wanting classroom-appropriate games, Math Slither delivers an exceptional blend of entertainment and education that makes mathematical learning both effective and enjoyable.

Frequently Asked Questions (FAQ)