# STICK BRAWL — a stickman fighting game

A complete browser fighting game built with vanilla HTML5 Canvas + JavaScript.
No build step, no dependencies. Just open it.

## Run it
Double-click **`index.html`** (works straight from the file system).
Or serve the folder and visit it: `python -m http.server 8123` → http://localhost:8123

## Features
- **Procedural skeletal stickmen** — every pose is built with 2-bone inverse
  kinematics (knees/elbows bend naturally) instead of sprites.
- **Frame-based combat** with startup / active / recovery windows, hitstop on
  impact, knockback, knockdowns and a wall.
- **Moves:** jab, punch, kick, low sweep, jumping attacks, plus special motions:
  - Fireball — `↓ → + Punch` (a real travelling projectile; fireballs cancel each other)
  - Uppercut / anti-air — `→ ↓ + Punch` (invincible startup, launches)
  - Super — `Punch + Kick` at full meter (screen flash + shake)
- **Blocking** (high/low — crouch to block sweeps), chip damage, and a Super
  meter that fills as you fight.
- **Combo system** with on-screen combo counter and hit text.
- **CPU AI** with Easy / Normal / Hard (reaction time, blocking, spacing,
  fireball jumps, anti-airs, super usage).
- **2-player local** mode, best-of-3 rounds, round timer, KO / Time Up / Draw.
- Camera shake, hit sparks, dust, blood particles, delayed-damage health bars,
  parallax sunset rooftop stage, and a fully synthesized sound engine (no audio
  files needed).

## Controls
| Action   | Player 1            | Player 2          |
|----------|---------------------|-------------------|
| Move     | `A` / `D`           | `←` / `→`         |
| Jump     | `W`                 | `↑`               |
| Crouch   | `S`                 | `↓`               |
| Punch    | `F`                 | `K`               |
| Kick     | `G`                 | `L`               |
| Block    | `H`                 | `;`               |
| Fireball | `S→D + F`           | `↓→→ + K`         |
| Uppercut | `D→S + F`           | `→→↓ + K`         |
| Super    | `F + G` (full meter)| `K + L` (full meter)|

## Project layout
```
index.html        markup + menus + HUD
css/style.css     HUD, menus, animations
js/utils.js       math helpers + synthesized sound engine
js/input.js       keyboard + motion-command buffer (quarter-circles)
js/particles.js   sparks/dust/blood/floating text + projectiles
js/fighter.js     physics, combat state machine, IK skeleton + rendering
js/ai.js          CPU opponent (drives a fighter via a fake input)
js/game.js        main loop, rounds, camera, background, HUD wiring
```
