← back to Neon Baguette Battle

README.md

80 lines

# Baguette Battle — Neon Paris 🥖⚔️

A playable browser fighting game. Two mustachioed **Frenchmen in berets** duel
with **baguettes** beneath a neon Eiffel Tower — jab, whack, block, and **launch
your baguette like a spinning missile** — while pies, french rolls, and
croissants fly across the arena. Single self-contained `index.html` — no build
step, no dependencies, no assets. Open it in any modern browser and play.

Built from a Model Arena challenge ("a game where baguettes in Paris fight each
other"). The starting artifact (Qwen2.5-local) was just a title card with an
`alert()`; this is the real game built on top of it — its Parisian-serif look
and title screen were kept, everything else added.

## Play
Open `index.html` in a browser → **1 Player (vs CPU)** or **2 Players (local)** →
**character select** → fight. Best of 3 rounds; each round is 60s, and on timeout
the higher-HP loaf wins.

## Character select
Pick from 6 baguette fighters, each with different **Speed / Power / Defense**
that actually change gameplay (movement speed, damage dealt, damage taken):
Baguette Rouge & Bleue (balanced), Le Costaud (heavy hitter), Petit Éclair
(fast glass), Pain de Campagne (tank), Baguette Noire (fast, hits hard, fragile).
Both players choose their own fighter with their own controls (P1 `A`/`D` move,
`F` ready · P2 `←`/`→` move, `,` ready); in 1-player the CPU auto-picks. You can
also click a card to choose P1's fighter. `Enter`/`Space` or **START FIGHT** begins.

## Controls
| Action | Player 1 | Player 2 |
|---|---|---|
| Move | `A` / `D` | `←` / `→` |
| Jump | `W` | `↑` |
| Block | `S` | `↓` |
| Poke with baguette (fast) | `Space` / `F` | `,` |
| Whack (slow, strong) | `G` | `.` |
| Throw baguette 🥖 (projectile) | `Return` / `H` | `/` |
| Rocket 🚀 (fast + big, needs full meter) | `R` | `;` |
| Bomb 💣 (lobbed, explodes) | `B` | `'` |
| Pause | `P` | |
| Mute (audio + voice) | `M` | |

**1-player alternate scheme (P1):** you can also play with the **arrow keys**
(`←`/`→` move, `↑` jump, `↓` block) and **fire** with almost any big key —
**`Space`, `Return`/Enter, `⌘` Command, `⌥` Option, `Ctrl`, `Shift`, or
`Delete`/Backspace**. Fire launches the baguette missile when the meter is full,
otherwise it does a whack. (`J`/`K`/`L` also jab/whack/launch.) In 2-player the
arrows belong to Player 2.

## Mobile / touch
On a touch device, on-screen controls appear during a match — a left cluster
(JUMP · BLOCK · ◀ ▶) and a right cluster (POKE · WHACK · 🥖 throw · 🚀 rocket ·
💣 bomb) — driving Player 1, so 1-player vs CPU plays great on a phone. Tap a
fighter card then **START FIGHT** to begin (no keyboard needed). Best held in
landscape (a rotate hint shows in portrait).

## Features
- **Real combat + a weapon loadout**: baguette **poke** and **whack** (melee),
  plus three throwables — **throw baguette** (spinning missile, short cooldown),
  **bomb** (lobbed, arcs and explodes with splash damage), and **rocket** (fast,
  big, costs the full special meter). Startup/active/recovery frames, blocking
  with chip damage, knockback, hit-stun.
- **CPU opponent** with an approach/attack/block/retreat/blast state machine.
- **Flying food hazards**: pies (cream splat, big damage), french rolls (fast),
  and croissants arc in from off-screen and hit either fighter.
- **Neon Paris arena**: animated Eiffel Tower, moon, twinkling stars, skyline
  with lit windows, a **cobblestone street** floor (perspective stones with
  neon rims) strewn with croissants, screen shake + vignette.
- **La Marseillaise** (the French anthem) plays on load, synthesized on the
  WebAudio synth. Browsers gate autoplay, so it starts on your first click or
  keypress; `M` mutes it (and all audio).
- **Sound**: WebAudio synth SFX for pokes/swings/blocks/blasts/KO, plus comedic
  **voice lines** via the browser Speech API — an American hamming up a French
  accent ("Take zat!", "Oh la la, magnifique!", "Zut alors!").
- Health/meter bars, round pips, round timer, KO / winner flow, pause menu.

## Notes
- Voice lines use `speechSynthesis`; they sound best when a French system voice
  is installed (the game auto-selects one). Everything still works without it.
- 100% local, $0 to run — canvas + WebAudio + Speech API, zero network calls.