A fast mental-math battle game where correct calculations become combos, shields, boosts, boss damage, and XP.
No account is required. Enter a callsign, choose a difficulty and battle type, pick your operations, and start calculating.
I started MATH-Warefare because I kept losing exam time on calculations that should have been automatic. I wanted practice to feel less like another worksheet, so I turned it into a small arcade battle.
The game deliberately uses the visual language of simple student-made MS Paint drawings instead of a polished dashboard: basic rectangles/circles/triangles, black outlines, flat bucket-filled colors, bright scenery, crude proportions, and an intentionally simple calculator-vs-math battle scene.
- Classic + Time Attack battles — play a fixed number of questions or survive a 60/90/120 second blitz.
- Three difficulty modes — BASIC, PRO, and GOD/CHAOS change number ranges, timing, and visual pressure.
- Four selectable operations — addition, subtraction, multiplication, and exact division can be mixed in one run.
- Combo combat system — streaks increase XP multipliers, award shields, and drop random 2× / reveal / bomb boosts.
- Boss equations + revenge rounds — every 10th question becomes a boss; misses in Classic give one short redemption attempt.
- Progression + score history — callsigns keep local XP, ranks, personal bests, last-battle deltas, and a local leaderboard.
- Game feel — synthesized WebAudio effects, rising combo pitch, hit-stop, floating XP, confetti, screen shake, memes, pause, and low-time warnings.
| Action | Control |
|---|---|
| Submit answer | Enter |
| Pause / resume | Esc |
| Sound | Speaker button |
| Mobile play | Tap the answer field and use the numeric keyboard |
The easiest way to try the project is the live demo above.
To run it locally, use Node.js 20+:
git clone https://github.com/Hustlenix/math-warfare.git
cd math-warfare
npm install
npm run devThe actual Vite app lives in the inner math-warfare/ directory. The repository root also contains wrapper scripts, but dependencies must be installed in the app folder first.
For a production build:
npm run buildThe game is intentionally split into small modules instead of keeping everything in one HTML file.
src/engine/questions.jsgenerates questions and boss variants.src/engine/state.jsowns battle state, timers, shields, boosts, and transitions.src/engine/scoring.jscalculates multipliers, XP, ranks, boss bonuses, and revenge rewards.src/fx/audio.jssynthesizes sound effects in the browser with WebAudio.src/fx/chaos.jshandles GOD-mode screen effects.src/api/leaderboard.jsstores local battle history and provides the leaderboard layer.src/api/memes.jsfetches/falls back to safe meme reactions.src/main.jsis the DOM/game-flow controller.src/styles.cssis the custom hand-drawn visual system.
The battle flow is a small state machine: question → feedback → next question, with a revenge state for Classic misses. Time Attack uses one battle clock that keeps running between questions instead of resetting per question.
The current visual system was rebuilt after Stardance ship feedback that the original neo-brutalist CSS looked too similar to common AI-generated sites.
The replacement follows simple MS Paint school-project drawings more closely:
- plain black outlines
- basic geometric shapes
- solid bucket-fill colors
- bright sky/grass scenery
- simple Arial-style text
- square controls with no designer shadows or glass effects
- an original calculator-vs-equation battle image built from simple Paint-like shapes
- intentionally low-tech visual composition rather than a UI-kit aesthetic
The layout remains responsive and includes prefers-reduced-motion handling.
.
├── .github/workflows/deploy.yml # GitHub Pages build/deploy
├── package.json # root wrapper scripts
└── math-warfare/
├── public/
│ └── paint-battle.svg # original hand-drawn hero artwork
├── src/
│ ├── api/
│ ├── engine/
│ ├── fx/
│ ├── main.js
│ └── styles.css
├── index.html
├── package.json
└── vite.config.js
Every push to master runs the GitHub Actions workflow in .github/workflows/deploy.yml:
- install dependencies with
npm ci - build the Vite project
- upload
math-warfare/dist - deploy it to GitHub Pages
Live URL: https://hustlenix.github.io/math-warfare/
- The “GLOBAL (SIM)” board is intentionally labeled as simulated; local progress is the real persistent score history in the browser.
- Progress is local to the browser/device unless a future backend is added.
- The game currently focuses on arithmetic speed rather than a full school syllabus.
- Built with Vite and vanilla JavaScript modules.
- Celebration particles use canvas-confetti.
- Meme reactions use external meme data with fallbacks.
- AI/LLM assistance was used for coding support, review, troubleshooting, and deployment. The project structure, game direction, iteration decisions, and Stardance submission are maintained in this repository.
- The current visual system and
paint-battle.svgwere made specifically for MATH-Warefare, using simple Paint-like shapes and flat fills rather than a UI template.
During exam practice I noticed that knowing the difficult method was not enough: slow basic calculations still cost time. MATH-Warefare is my attempt to make repetition fast, competitive, and weird enough that I actually want to do another round.