Skip to content

oceanofmaya/math-game

Repository files navigation

Math Game

Simple math game with visual effects.

Live Demo

Play the game online at: https://math-game.oceanofmaya.com

Table Of Contents

Getting Started

Prerequisites

  • Git
  • Python 3.x (for local development server) OR Node.js (for npx option)

Installation

Clone repository:

git clone https://github.com/oceanofmaya/math-game.git

Navigate to directory:

cd math-game

Running Locally

This is a static website with no build step required. To run a local development server, use one of the following options:

Option 1: npx (Node.js)

npx serve public

Option 2: Python

python3 -m http.server --directory public 3000

Option 3: Direct File Opening

You can also open public/index.html directly in your browser:

open public/index.html

Or simply double-click public/index.html in your file manager.

Note: While direct file opening works, using a local server (Options 1 or 2) is recommended for a better development experience.

Usage

  • If using a local server (Options 1 or 2), visit http://localhost:3000 in your browser to play.
  • If opening the file directly (Option 3), the game will load automatically in your browser.

Game Features

  • Operations: Choose from addition, subtraction, multiplication, division, or Mixed Operations mode (±) which randomly selects from all four operations for each question
  • Timed Mode (⏱): Answer as many questions as possible within a 5-minute time limit with timer display and session results
  • Configurable Difficulty: Adjust the maximum number range (1-999)
  • Duplicate Prevention: Intelligent question generation ensures variety by avoiding recently asked questions
  • Visual Feedback: Five engaging visual themes that respond to your performance:
    • Jellyfish: Organic jellyfish with flowing tentacles and graceful floating motion
    • Firefly: Warm, bioluminescent orbs with organic wandering movement
    • Pearl: Iridescent pearls with rolling and bouncing physics
    • Mushroom: Natural, earthy mushrooms with gentle swaying motion
    • Maple: Autumnal maple leaves with sophisticated breeze physics
  • Sample Mode: Interactive testing mode for visual themes - test visual effects without playing the game
  • Theme Music: Unique ambient music tracks for each visual theme that play automatically
  • Score Tracking: Track correct, wrong, and skipped answers

Screenshots

Pearl Theme - Game Mode

Jellyfish Theme - Sample Mode

Contributing

Branching Strategy

Use feature/<description> for all branches. Examples: feature/add-mushroom-theme, feature/v1.0.0, feature/fix-division-edge-case.

Workflow: Create branch from main → Make changes → Update version/changelog if releasing → Open pull request → Merge to main via PR → GitHub Actions auto-creates tag vX.Y.Z from project.toml.

All merges to main must occur through pull requests.

Commit Messages

This project uses Conventional Commits for commit messages. Commit messages should follow the format:

<type>(<scope>): <subject>

<body>

<footer>

Common types include:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that don't affect code meaning (formatting, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • chore: Changes to build process or auxiliary tools
  • perf: Performance improvement
  • test: Adding missing tests or correcting existing tests

For detailed coding standards and conventions, see .github/AGENTS.md.

Credits

Music Attribution

License

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

About

A simple math game with visual effects

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors