Skip to content

A retro-style arcade game that combines fast-paced spaceship action with math challenges. Players control a spaceship and must shoot the correct answer to math problems displayed on enemy ships. The game blends education and entertainment, helping players improve their math skills while enjoying an engaging arcade experience.

License

Notifications You must be signed in to change notification settings

rishilahoti/math-destroyer

Repository files navigation

Math Spaceship Game - Retro Arcade 🚀🔢

License: MIT TypeScript Next.js

Blast your way to math mastery in this retro-style arcade game! Combine fast-paced spaceship action with math challenges as you solve equations to defeat enemy ships. Perfect for students, gamers, and anyone looking to sharpen their math skills in a fun way.

Play the Live Demo

Gameplay Video

🎯 Core Idea

A retro-style arcade game that combines fast-paced spaceship action with math challenges. Players control a spaceship and must shoot the correct answer to math problems displayed on enemy ships. The game blends education and entertainment, helping players improve their math skills while enjoying an engaging arcade experience.

🚀 Key Features

Retro Arcade Aesthetic

  • Pixel-style UI with glowing effects and chiptune sound effects
  • Animated star backgrounds and spaceship animations
  • CRT monitor-style visual effects for authentic retro feel

Math-Based Gameplay

  • 3 difficulty levels:
    • Easy: Addition & subtraction
    • Medium: Multiplication & division
    • Hard: Fractions & percentages
  • Dynamic problem generation - new equations every round
  • Progressive difficulty as you advance

Spaceship Combat Mechanics

  • Player controls:
    • Move with arrow keys (← →) or A/D keys
    • Shoot with Mouse click or tap (mobile)
  • 3 enemy ships per question, each displaying a possible answer
  • Timer (10s per question) and 3 lives before game over
  • Score multiplier for fast answers

Full Game Flow

  • Home Screen → Level Selector → Gameplay → Win/Lose Screens
  • High score tracking for each difficulty
  • Performance feedback and tips

Responsive Design

  • Works seamlessly on desktop & mobile
  • Touch controls optimized for mobile players
  • Adaptive UI for all screen sizes

🎮 Why It's Unique

  • Learning through play: Makes math practice fun and interactive
  • Retro nostalgia: Mimics classic arcade games with modern web tech
  • Fast-paced & challenging: Keeps players engaged with timed questions
  • Skill progression: Gradually increases difficulty to match player ability
  • Accessible learning: Helps build math confidence in a low-pressure environment

🔧 Tech Stack

  • Frontend: Next.js + TypeScript
  • Styling: Tailwind CSS + custom animations + GSAP
  • Audio: Howler.js for sound effects
  • Game Logic: Pure TypeScript (no external engines)
  • Animation: GSAP for smooth transitions and effects
  • Deployment: Vercel

🎯 Target Audience

  • Students (ages 8+) looking for a fun way to practice math
  • Retro gamers who enjoy arcade-style challenges
  • Educators/parents seeking interactive learning tools
  • Anyone wanting to improve mental math skills

🚀 Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm (v9 or higher)

Installation

# Clone the repository
git clone https://github.com/rishilahoti/math-destroyer

# Navigate to the project directory
cd math-destroyer

# Install dependencies
npm install

# Run the development server
npm run dev

Open http://localhost:3000 in your browser to play!

Building for Production

# Build the application
npm run build

# Start the production server
npm start

🕹️ How to Play

  1. Choose your difficulty level - Start with Easy if you're new!
  2. Read the math equation at the top of the screen
  3. Move your spaceship with arrow keys or A/D keys
  4. Aim at the enemy ship displaying the correct answer
  5. Shoot by clicking mouse or pressing spacebar/enter
  6. Answer quickly to earn bonus points!
  7. Complete all 10 questions without losing all lives to win!

🤝 Contributing

Contributions are welcome! If you'd like to improve the game:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Support the Project

If you enjoy this game, please give it a ⭐ on GitHub!


Play → Learn → Blast your way to math mastery! 🚀🔢

About

A retro-style arcade game that combines fast-paced spaceship action with math challenges. Players control a spaceship and must shoot the correct answer to math problems displayed on enemy ships. The game blends education and entertainment, helping players improve their math skills while enjoying an engaging arcade experience.

Topics

Resources

License

Stars

Watchers

Forks