barkour/README.md
w1n5t0n f57c1f16f8 feat: top-down 'Dogpit' arena mode (dota-like view)
Second game mode selectable at dog select (host-authoritative online):
- js/sim_arena.js: top-down sim, same export surface as sim.js — x/y plane
  plus a z hop axis (Space / comma); KOs by knocking dogs into abyss pits
- js/mapgen_arena.js: mirrored symmetric arenas — walls, pits, center
  clearing, guaranteed spawn-to-center corridors, crystals/spikes/launch
  pads, mirrored saw pairs; fallback pit pair since pits are the only KO
  mechanic
- specials re-imagined per dog: zoom dash, ram + hop-slam, zip-leash
  slingshot, blink, hover (floats over pits/saws/spikes)
- render: arena tiles with wall shadows + void pits, top-down dog drawing
  with z-lift over a ground shadow; new fall event/sfx
- B.HOP input bit so 'up' can mean north in top-down (Space also jumps in
  side view); mode toggle UI + mode carried in start/rematch net messages

Tested: arena mapgen determinism/symmetry/connectivity + chaotic matches +
pit/hop scenarios headless; local chaos + full P2P arena match (host mode
flip syncs to client) in two headless browsers with zero page errors.
2026-06-10 15:23:22 +02:00

74 lines
3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# BARKOUR 🐕💨
**Dogfights × parkour.** A 2-player movement-PvP fighting game: five dogs with
wildly different movement physics brawl across procedurally generated arenas
full of traps and mineable powerups. Last dog standing wins.
Two arena styles, picked at dog select:
- **⛰ Parkour** (side view) — gravity, wall-jumps, one-way platforms, blast-zone KOs.
- **🐾 Dogpit** (top-down) — 8-way movement on a dota-style mirrored arena;
hop (third axis) over saws, spikes and abyss pits; KO by knocking dogs into the void.
No build step, no game server, no asset files — everything (art, sound, maps)
is generated procedurally in the browser.
## Run it
```bash
npm run dev # python http.server on :8137
# → http://localhost:8137
```
Any static file server works (ES modules just need http://, not file://).
## Play
| | Move | Bite | Special | Item | Hop (top-down) |
|---|---|---|---|---|---|
| **P1** | WASD | F | G | H | Space |
| **P2** | arrows | K | L | ; | , |
- Side view: **↑/W** jumps (Space works too for P1), **↓** drops through one-way platforms
- Top-down: **Space/,** hops over pits, saw blades, spikes and bites
- **Bite** is also your mining pick — crack open crystals for powerups
- Damage % makes knockback grow (Smash-style); die by being launched past
the arena edges or into the abyss. 3 stocks each.
- **M** mute, **Esc** pause/leave, **Enter** rematch
### Online play (P2P)
One player clicks **Host online room** and shares the 5-letter key; the other
clicks **Join with room key**. The PeerJS public cloud is used for signaling
only — all game traffic flows directly peer-to-peer over a WebRTC data channel.
No server of ours is involved. (Host is authoritative; the joiner streams
inputs and renders snapshots.)
## The dogs
| Dog | Breed | Parkour (side) | Dogpit (top-down) |
|---|---|---|---|
| **Bolt** | Greyhound | Wall-slide/wall-jump, 8-way air dash | 8-way zoom dash on cooldown |
| **Brick** | Bulldog | Charging ram, ground-pound shockwave | Same ram; slam down from a hop |
| **Lasso** | Lurcher | Pendulum leash-swing, jump-release launch | Zip-leash: latch a wall, reel in, slingshot out |
| **Wisp** | Saluki | Low gravity, double jump, blink through walls | Blink through walls and over pits |
| **Stubbs** | Corgi | Jetpack, butt-bounce off hard landings | Hover — floats over pits, saws and spikes |
All dogs keep their weight class: Brick barely launches, Wisp flies across the map.
## Arenas
Every match generates a fresh seeded arena: stepped terrain, abyss pits,
wall-jump towers, floating islands, one-way platforms, spike patches, bounce
pads, rail saws on patrol routes, and crystal outcrops. Mine crystals (or bomb
them) for: tennis-ball launcher, bomb, shield, speed boost, heal. A care
package also parachutes in periodically.
## Tests
```bash
npm test # headless sim smoke test (node, no browser needed)
```
The sim core (`js/sim.js` + deps) is DOM-free by design: maps are seeded and
deterministic, matches run headlessly. See `MAP.md` for the code layout.