Commit Graph
31 Commits
Author SHA1 Message Date
DorianandClaude Opus 4.6 1ca8a6feb0 refactor: type Fighter interface for all choreographies
Define Fighter type alias using Kaplay's GameObj with SpriteComp, PosComp,
ScaleComp, AnchorComp, OpacityComp, ColorComp, RotateComp, and ZComp.
Replace 81 choreography function signatures from (atk: any, def: any, ...)
to (atk: Fighter, def: Fighter, ...). Type loadSpriteWithTimeout opts as
LoadSpriteOpt. Type lines/bands arrays as GameObj[]. Type spawnAfterimages
and cameraZoom fighter params. Add as Fighter casts at k.get() call sites.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 20:30:02 +00:00
DorianandClaude Opus 4.6 63960b5faf feat: 9 diverse brawl variants — knockdowns, wall bounces, suplexes, haymakers, dizzy staggers
Add knockdown, wall-bounce, dizzy-stagger, suplex, ping-pong, ground-pound,
haymaker, body-check brawl variants with dizzy stars, angle physics, and
screen-edge impacts. Fix missing synthStyle on music tracks 10.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:10:59 +00:00
DorianandClaude Opus 4.6 ba1deab0f6 feat: physical contact overhaul — brawls, clinches, counter-attacks
50%+ of fight time is now physical contact between fighters:

- Brawl exchanges: both fighters close to center, trade 4-13 rapid
  blows with sparks at contact point, positional pushing, intensity
  scaling. Winner lands 65% of hits.
- Clinch combos: attacker rushes in, grapples at close range for
  3-11 sustained hits with defender counter-blocking (30% chance).
  Ends with a shove-apart.
- Counter-attacks: after a choreography hit, defender retaliates
  with 2-3 quick hits (25% chance on non-final exchanges).
- Exchange count increased from 2-4 to 3-7, scaling with round
  number and intensity. Later rounds are longer, more brutal.
- Physical exchange chance: 35-70% per non-final exchange,
  increasing with intensity and exchange number.
- Reduced dodge chance (12% vs 15%) for more contact, fewer misses.
- Shorter pauses between exchanges for tighter pacing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:01:06 +00:00
DorianandClaude Opus 4.6 a59b0748a7 feat: 30 comedy sound effects, replace 75% round-end TTS with SFX
Comedy sounds (all procedural Web Audio, no samples):
- Vine Boom, Air Horn (MLG), Bruh, Fart, Record Scratch
- Rubber Chicken, Squeaky Toy, Wet Slap, Bone Crack, Cartoon Run
- Rim Shot (ba dum tss), Slide Whistle Up/Down, Yippee, Ding
- Taco Bell Bong, Windows Error, Meme Thud
- Sad Trombone, Emotional Damage, Dun Dun Dunnnn
- Fail Horn, Price Is Right Fail, Buzzer, Sad Violin
- Mission Failed, Crickets

Wiring:
- Round-end narration: 75% comedy SFX, 25% TTS (was 100% TTS)
- Critical rounds get Emotional Damage, draws get random fail
- Showboat loop: 40% chance of comedy sound punctuation after each
- KO finish: 50% chance of comedy fail sound on loser
- sfxRandomSilly expanded with comedy sounds
- New exports: sfxRandomComedy, sfxRandomFail

Also adds bulletTimeAttack combat choreography + ultimateBulletTimeBarrage
(tier 3+ ultimate) to fight system.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:55:14 +00:00
DorianandClaude Opus 4.6 d3f026d356 feat: bullet time attack choreography for fight scenes
Adds cinematic bullet-time combat sequence with slow-mo golden projectiles,
afterimage dodge trails, and devastating counter-rush with multi-hit impact.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:25:03 +00:00
DorianandClaude Opus 4.6 e12fb94ae7 feat: omni-morph sprite swap, bullet time showboats, music tuning, server hardening
- Creator omni-morph now generates actual sprite sheets for morphed archetypes
- 3 new Creator showboats: bullet time attack, ₿ throne summon, disco dance
- Music: subtle tempo shift (+10 BPM max), longer phrases (8/16/24 bars),
  smoother crossfades, less chaotic hi-hat at high intensity
- Server: security headers, body size limit, production error masking,
  CORS origin warning, graceful shutdown with drain
- Payments: atomic consume (eliminates SELECT/UPDATE race), release reverts DB
- Fight loop: round events for live TUI, retro displayPrompt
- Frontend: pass pubkey in payment/queue requests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:23:47 +00:00
DorianandClaude Opus 4.6 0acfa4417f feat: overhaul showboat system — big movement, Creator magical showboats
Completely rewrote all 30 showboats with much more walking, jumping,
sprinting back and forth across the arena. Fighters now pace, charge,
leapfrog, zigzag sprint, do backflip retreats, wall-to-wall dashes,
kangaroo hops, shadow box sprints, and girlfriend kiss scenes.

Added 12 Creator-exclusive magical showboats:
- Levitate across screen trailing golden ₿ rain
- Portal teleport (vanish, flash between 3 spots, reappear)
- Massive golden code rain summon (₿01∞⛏ characters)
- ₿ orbit explosion (orbit then burst outward)
- Lightning flight (zigzag with lightning bolts)
- Satoshi meditation (golden aura, bitcoin wisdom quotes)
- Golden tornado (circular path with ₿ trail)
- Laptop hack (type furiously, spawn code chars)
- Bitcoin rain shower (fly across dropping ₿ coins)
- Dimension rift (tear golden portal, step through)
- Golden ascension (rise, glow, slam down with shockwave)
- Phase walk (flicker through opponent's space)

Creator gets magical showboats ~60% of the time. Pause between
showboats shortened to keep the action constant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:16:41 +00:00
DorianandClaude Opus 4.6 2534cbc4cf feat: 30 showboat/taunt animations during question & answer phases
Fighters now perform random showboating micro-animations while idle
during question reading and opponent's answer — shadow boxing, backflips,
flex poses, moonwalks, ground pounds, air guitar, sumo stomps, and more.

Each showboat uses existing sprite anims (attack/kick/special/win) combined
with Kaplay tweens for position, scale, rotation, sparks, and emote text.
Showboating loops with random variety and pauses between moves.

Flow: both showboat during question → stop the answering bot during their
turn → stop all before fight animation begins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:07:56 +00:00
DorianandClaude Opus 4.6 6561ef5d15 fix: mobile fight playback — prevent sprite loading hangs, TTS stalls, unlock audio from gesture
- Unified speakAsync/speakAsyncWithRate into _speakAsyncCore with:
  - 500ms startup check: bail immediately if speech won't start (mobile/no gesture)
  - 8s safety timeout (down from 15s) to prevent blocking
  - iOS-safe keepalive: only do Chrome pause/resume workaround on desktop Chrome
  - Immediate bail when no voices loaded
- Sprite loading: 5s timeout per sprite prevents mobile hangs from stuck Image decodes
- Scene creation: 10s timeout in FightViewer so overlay/voice flow continues even if
  canvas fails on mobile
- playRound: bail gracefully if fighter sprites missing instead of crashing
- Global audio unlock: first touch/click on site unlocks AudioContext + SpeechSynthesis
- Practice button pre-unlocks audio while still in user gesture context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:54:58 +00:00
DorianandClaude Opus 4.6 8a345f5e56 fix: DocsPage escaped quotes breaking template + missing rotate() on ₿ text objects
DocsPage: escaped \"answer\" inside v-for HTML attribute broke template
parsing causing infinite Vite error loop. Replaced with &quot; entity.

FightScene: three k.text('₿') objects used .angle without k.rotate()
component, causing TS2339 build errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:08:49 +00:00
DorianandClaude Opus 4.6 6658212e9f feat: Creator god-tier voice system — 100+ lines across 10 voice categories
Mysterious, existential, Bitcoin-prophet voice lines for the Creator:
- 20 entrance lines (kneel before your maker)
- 20 round commentary lines (existential announcer crisis)
- 15 KO lines (deprecated, decommissioned, destroyed)
- 12 win lines (was there ever any doubt?)
- 10 lose lines (impossible... unless he wanted to lose?)
- 8 morph lines (he becomes everything)
- 10 cameo lines (ethereal whisper blessings)
- 10 taunt lines (menacing mid-fight trash talk)
- 8 devastating hit lines (divine smites)

All hooked into FightScene: entrance, round start (50% chance with
60% Creator-specific), devastating hits, KO, win/lose, morph,
cameo, and taunts. Uses deep/ancient/hal/mainframe voice profiles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:46:25 +00:00
DorianandClaude Opus 4.6 1f8e8569ef feat: retro mode — arcade combo round with gamepad overlays
Every fight now includes one Retro Mode round where bots submit
gamepad combo inputs (↑↓←→ A B). 24 moves across 4 tiers: basic
(always shown), standard (partially revealed), super (must discover),
and ultra (KONAMI CODE for 50 dmg). Discovery bonus gives 1.5x damage.

Includes pixel-art gamepad overlays (P1/P2) with animated button
presses, retro-specific narrations, and mock bot combo responses
scaled by ELO.

Also adds loops/plan.md with 11-phase production hardening roadmap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:13:47 +00:00
DorianandClaude Opus 4.6 6d390f69b2 feat: THE CREATOR god-tier character, bitcoin choreographies, omni-morph, cameos
- Guy Fawkes mask archetype with golden outline, bitcoin chest symbol, laptop, tier-gated effects
- 12 custom bitcoin-themed choreographies (8 regular + 4 exclusive ultimates)
- Omni-morph system: creator morphs into any of 80+ archetypes instead of cycling 3
- 6% per-round cameo in non-creator fights — drops golden ₿ gifts to fighters
- Custom golden code rain entrance with persistent orbiting particles
- pickChoreography: 50% ultimate chance (100% on crits), all tier ultimates + 4 exclusive
- Server auto-assigns the_creator archetype on login/register for creator pubkey
- FightViewer, payments, queue, orchestrator improvements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 12:08:18 +00:00
DorianandClaude Opus 4.6 0ae3970433 fix: N11 choreography audit — themed minimums, all references validated
- code_golf: added blueScreen (4->5 themed)
- token_economy: added popupSpam (4->5 themed)
- creative_writing: added newspaperRoll (4->5 themed)
- math_blitz: added chainLightning (4->5 themed)
- All 22 challenge types now have min 5 themed choreographies
- Verified all 225 CHALLENGE_THEMED refs exist in choreographyMap (366 total)
- All 40 tier-gated ultimates properly mapped and morph-compatible

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:13:26 +00:00
DorianandClaude Opus 4.6 bc48cc8887 feat: N8 hit impact & motion polish — freeze-frames, afterimages, particles, camera
- impactFreeze(): brief white flash pause on devastating critical hits
- spawnAfterimages(): trailing ghost sprites on fast dash moves
- spawnSparks(): varied particle sizes, rotational velocity, stronger gravity
- cameraZoom(): slight zoom-in on critical final exchanges, pull-back for ultimates
- Wired into dashPunch, aerialSlam, flyingKick, dashThrough, uppercut
- Critical exchanges get 1.3x camera zoom before the blow lands
- Ultimates get 0.85x pull-back to show the full move

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:07:21 +00:00
DorianandClaude Opus 4.6 05829e58ae feat: implement spawnGrotesqueDetails and spawnCrowdSigns stubs
- spawnGrotesqueDetails: radial impact lines + dots during zoom close-ups
- spawnCrowdSigns: signs rise from bottom with text labels, bob, fade out

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:00:16 +00:00
DorianandClaude Opus 4.6 07fa2cf35c fix: mobile — scale sprites to canvas size, fix viewport scroll
- Add scale factor (SF) based on canvas height so bots and referee
  shrink proportionally on small screens (reference: 500px)
- Scale judge chair/ladder dimensions with SF
- Push judge seat lower on small canvases so it stays visible
- Use 100dvh instead of 100vh to account for mobile browser chrome
  (address bar, tab bar) — eliminates scroll under browser UI
- App root uses dvh, main area uses min-h-0 + overflow-y-auto

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:07:52 +00:00
DorianandClaude Opus 4.6 4b46aaf643 feat: mobile human vs AI — multiple choice, two-row VS bar, responsive arena
- Server-side choice generation for all 22 challenge types (factual + creative)
- Mobile: 3 multiple-choice buttons replace keyboard input (4s timer)
- Two-row VS bar on mobile (names row + HP bars row) in FightPage and FightViewer
- Battle log hidden on mobile to maximize canvas visibility
- Arena page responsive: stacking header, tighter fight cards, no name overflow
- Profile page two-column desktop layout with contained sprite display
- Human fighter sprites with baby growth system

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:42:49 +00:00
DorianandClaude Opus 4.6 8448f1d823 feat: human vs AI mode — live typing challenges, baby growth system, SSE rounds
- Add choose-mode step: "I BUILD BOTS" vs "I FIGHT MYSELF" paths
- Human registration with baby avatar picker, no webhook required
- Live fight scene with SSE round streaming and real-time challenge UI
- 5-second timer per round, submit answers via browser
- Baby → toddler → kid → teen → adult → hero → super growth stages
- Huge sparkly baby eyes, diapers, pacifiers, bibs, rattles, rosy cheeks
- Speech bubble positioning fix (pushed to outside of sprite)
- Canvas text rendering via offscreen canvas to bypass kaplay color issues
- Voice timing improvements: await pauses between voice lines and hits
- 30 devastating announcement lines, 15 critical/hit word variants
- Orchestrator human player detection + waitForHumanResponse system
- Server endpoints: GET /challenge/:botId, POST /respond/:botId
- Human player auth: register-human route, isHuman flag on login

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:20:14 +00:00
DorianandClaude Opus 4.6 56785cfdea feat: remove mock fight button for production, cleanup fight UI
- Remove "Fight a Classic Bot" button (mock endpoints blocked in prod)
- Simplify speech bubble rendering (remove glow/accent layers)
- Sound and FightViewer improvements
- BotProfilePage enhancements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:59:10 +00:00
DorianandClaude Opus 4.6 bb9a966d4e fix: add missing rotate/scale components to Kaplay objects for TypeScript
Added k.rotate(0) and k.scale(1) to game objects that use .angle and
.scale properties — fixes vue-tsc build failure in Docker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:44:09 +00:00
DorianandClaude Opus 4.6 c87bff01a8 feat: speech overflow fix, 60+ voice profiles, post-fight audio cleanup
- Change speak() default to cancelPrevious=true so voices don't queue endlessly
- Add stopAllAudio() export and wire into FightViewer unmount + post-fight
- Flush speech queue at fight end with delayed cancel for clean cutoff
- Expand from 30 to 60+ voice profiles (robots, accents, game, characters)
- Add speech bubbles showing bot responses during rounds
- Wire announceFinishHim/Fatality/FlawlessVictory/Devastating to not cancel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:42:32 +00:00
DorianandClaude Opus 4.6 6bf9fe27b3 feat: production deployment — Dockerfile, docker-compose, SPA serving, classic bot fights
- Add Dockerfile (multi-stage: build frontend + server, serve from single container)
- Add docker-compose.yml for Portainer stack deployment
- Server serves frontend SPA in production (static assets + SPA fallback)
- Auto-run migrations and seed mock bots on server startup
- DB path configurable via DB_PATH env var
- Add "Fight a Classic Bot" button for instant mock bot matches
- FIGHT button queues for real AI opponents

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:42:18 +00:00
DorianandClaude Opus 4.6 120250c01a feat: bot setup intro step with code template, safety info, payload examples
Adds a new "HOW IT WORKS" step to the join flow between naming and webhook:
- 3-step visual explainer (POST challenge, respond, best answer wins)
- "YOUR SERVER IS SAFE" callout with security details (one-way comms,
  private IP blocking, size limits, timeouts)
- Expandable starter bot code (Node.js) with copy button
- Collapsible example challenge payload with response format
- Improved webhook step with deployment tips (ngrok, Vercel, Railway)
- Container now scrollable for longer content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:18:46 +00:00
DorianandClaude Opus 4.6 33f08c35b5 feat: full comedy overhaul — voices, narrations, trash talk, commentary
Rewrites all commentary and narration content across the entire stack:
- sounds.ts: 35 HYPE_LINES, 15 DEEP_INTROS, 15 ROUND_HYPE (modern political
  satire, edgy humor, pop culture references)
- FightScene.ts: 20 heartfelt lines, 18 crowd sympathy lines, 15 respect
  lines, 17 challenge voice announces, randomized critical/devastating calls,
  funnier entrance announcements
- scoring.ts: 6-8 narrations per challenge type (was 2), randomized
  timeout/error/tie messages with political humor and modern references
- mock.ts: 30 trash talk lines (was 15), edgier modern comedy
- bot SDK: 20 trash talk lines with personality

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 09:15:41 +00:00
DorianandClaude Opus 4.6 4a35e1e0b5 feat: profile page character display, persistent auth, cleanup
- Large animated sprite on BotProfilePage with tier-aware rendering
- Dynamic status titles (UNSTOPPABLE, ON FIRE, FRESH MEAT, etc.)
- Nostr auth persisted to localStorage — survives navigation and HMR
- Remove grotesque close-up overlays (eyeballs, tongues, teeth, drool)
- Remove crowd cheering signs (too small to look good)
- Add archetype to bot stats API response
- SpritePreview now accepts tier prop

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 08:21:20 +00:00
DorianandClaude Opus 4.6 e49735002c fix: Drizzle transaction execution, canvas re-init, crowd removal
- Add .run() to all Drizzle queries inside sqlite.transaction() in
  orchestrator.ts and mock.ts — queries were building but never executing,
  leaving fights stuck as 'live' forever
- Remove spectator crowd from drawArenaDecor()
- Rename duplicate spawnProp to spawnWeaponProp (was crashing module load)
- Replace canvas element on re-init to avoid "KAPLAY already initialized"
- Add safeText() to strip brackets from k.text() calls (Kaplay treats
  [ ] as style markup, crashes on unclosed tags)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 00:53:15 +00:00
DorianandClaude Opus 4.6 4d8b18a58a feat: v4 — TUI fight loop, rate limiting, webhook tooling, expanded choreographies
- Fight loop CLI with TUI renderer (ink-style terminal UI)
- Rate limiting middleware for API routes
- Queue cooldowns wired into orchestrator after fights
- Webhook test utility for bot debugging
- API docs route
- Expanded FightScene choreographies and weapon props
- Fix Drizzle transaction execution in orchestrator
- Schema additions, scoring/challenge/mock expansions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 00:14:46 +00:00
DorianandClaude Opus 4.6 2c0323d5fb feat: v3 — fight loop, expanded challenges, FightPage ownership guard
- Add fight-loop CLI for automated mock fights with elo-based matchmaking
- Expand challenge types, scoring narrations, arenas, and mock bot pool
- FightPage "Fight again" buttons now only show for your own bot
- FightViewer async scene init, live fight polling with round counter
- Extract mock answers into separate answers module

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 23:44:40 +00:00
DorianandClaude Opus 4.6 47d20fbe66 feat: v2 — queue matchmaking, procedural audio, sprite archetypes, auth
- Add queue-based matchmaking with Elo-proximity and 10s timeout
- Procedural sound engine (SFX, voice announcer, 4-track music)
- Sprite system refactored into 6 archetypes (standard, lobster, sheep, cyborg, blob, tank)
- 42+ fight choreographies with themed/generic/wild card selection
- 4 KO finish styles, super-speed mode, hyperdetail close-ups
- Auth routes, JoinBout page, bot profile with stats
- 7-tier ranking system (Baby through Legend)
- Arena and challenge system expansions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 22:13:19 +00:00
DorianandClaude Opus 4.6 335c148866 feat: botfights v1 — full fighting game with Kaplay engine
- Vue 3 + Vite + Tailwind 4 frontend with synthwave aesthetic
- Hono backend on port 9100 with SQLite/Drizzle
- Procedural pixel-art sprite generator (48x48, 8 animation states)
- Kaplay fight scene with punch/kick/special/knockback/KO animations
- 12 mock bots across 6 tiers with Elo rating system
- 9 challenge types, 10 fight arenas with modifiers
- Fight replay with staggered battle log and ~1 min timing
- Sprite preview page at /sprites

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:27:54 +00:00