# PULSE RUNNER — one key. one beat.

A neon synthwave rhythm runner in a single `index.html` (Canvas 2D + WebAudio, no dependencies, no build step).
Open `index.html` in a browser, or serve the folder (`python3 -m http.server`) and visit it.

## Controls (one key only)

| Input | Action |
|---|---|
| **Press** Space (or tap/click) | Jump |
| **Hold** | Glide: you sink slowly once you're past the top of the jump, so you can cross long gaps and spike rows |
| **Release on the beat** | Timing bonus: **PERFECT** (within ±50 ms) or **GREAT** (within ±100 ms) |

On the title, demo and game-over screens, the same key starts a new run instantly.

## How it plays

- Every obstacle sits on the beat of the synthesized soundtrack. Each obstacle has a gold **diamond** where you should release, with a ring that shrinks as the beat gets closer. Release as you pass through the diamond. You'll also hear a pluck note on each release beat, so each level's layout plays a melody.
- Ticks on the track pass under the runner exactly on each beat.
- **Combo** counts on-beat releases in a row, and the multiplier goes up every 5. An early or late release, or no release at all, resets the combo, but you keep running.
- The track loops in **laps** of 32 beats, shown on the ring at the top. Each lap raises the tempo (112 BPM up to 166), packs obstacles more densely, makes gaps and spike rows longer, adds syncopated patterns, changes the color palette and adds layers to the music.
- Levels are generated procedurally with a new seed every run.
- Your best score is saved in `localStorage`.

## Idle demo

If nothing is pressed for 3 seconds on the title screen, an AI player takes over. It plays with near-perfect timing, makes an occasional sloppy release, and now and then a real mistake that ends its run. After that, the demo restarts. Press Space or tap at any time to take over with a fresh run. Add `#demo` to the URL to start the demo right away.
