Skip to content

feat: Buddy World plaza polish + choose-your-town teleport - #147

Open
terpjwu1 wants to merge 8 commits into
integration/2.0.0from
feat/buddy-world-main
Open

feat: Buddy World plaza polish + choose-your-town teleport#147
terpjwu1 wants to merge 8 commits into
integration/2.0.0from
feat/buddy-world-main

Conversation

@terpjwu1

@terpjwu1 terpjwu1 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Stages the plaza/teleport feature work onto the 2.0.0 line. 7 commits, all
client plaza + world-sync (no installer/core coupling).

What's in it

  • ASCII sprite legibility — WCAG-AA contrast, saturated colors, dropped the
    heavy outline / frosted backing plate per user feedback.
  • Authentic per-city RO music — each town plays its real Ragnarok Online
    city theme (verified video IDs), plus per-town palettes + weather
    (snow/sand/petals).
  • Per-town flora — snow-capped pines (Lutie), cacti (Morroc), palms
    (Alberta), autumn canopies (Payon), leafy (Prontera/Geffen).
  • RO-blue jukebox — the YouTube music player styled as a classic RO window
    (titled bar + ✕), ToS-compliant (≥200×200, visible), 🎵/✕ both stop.
  • Choose-your-town teleportbuddy-world teleport <town> lets owners pick
    their buddy's home RO city instead of capacity-sharding; buddy-world towns
    lists them; status names the town. New towns.ts registry (drift-guarded),
    store.teleport() gains a move path, handler validates unknown_town/town_full.
    No new MCP tool (per token-budget constraint).

Tests

tsc clean; 63 new/updated world tests green (towns, drift guard, store move,
handler validation, CLI). The 2 plaza-smoke pixel tests (jitter, RO-essence)
fail only under local machine starvation — pre-existing, unrelated.

Next

E2E test (CLI teleport → world API → browser plaza) before this rides into
master with the 2.0.0 release.

🤖 Generated with Claude Code

terpjwu1 and others added 8 commits July 7, 2026 11:58
Buddies were blending into the busy bright flagstone. Now each sprite
sits on a subtle frosted plate (tinted to its hue) so the ASCII reads
against a clean surface, with a bold 14px font and a per-glyph dark
outline + halo so edges stay crisp on any background.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Per feedback — the thick per-glyph stroke was too heavy. Reverted to the
soft halo only; instead boosted sprite-color saturation (~1.55x chroma
before AA) so buddies pop through vividness, not weight. Frosted plate
kept for floor separation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Per feedback — the opaque panel behind each buddy (past the figure and
shadow) read as clutter. Removed; saturated color + soft halo carry
legibility on their own, keeping the clean floating-ASCII look.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each plaza now plays its REAL Ragnarok Online city BGM (video IDs verified
from the supplied OST playlist by loading each and confirming the title):
- Prontera D30M_vLMvWk, Payon zwM4pDzR-6g, Geffen yWgf7p3_z8w,
  Alberta lQjoaA9QqRA, Morroc 3-mLZN830y8, Lutie 7MSwhIBnqHg
Comodo isn't in the playlist, so the 6th town is Lutie (a real RO city
whose theme IS in the playlist — and a great distinct snow vibe).

Music toggle plays THIS town's single track (loop), labelled by town.
Each town also gets its own day palette + weather for a distinct vibe:
- Prontera royal blue, Payon warm village (cherry petals), Geffen violet
  mage-city, Alberta seaside cyan, Morroc desert (blowing sand),
  Lutie snow (falling snow, Christmas roofs).
Sky/floor/roof colors + sprite-contrast baseline all track the town.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, autumn (Payon)

Each city's greenery now matches its RO biome, completing the distinct-vibe
polish alongside per-town music, palettes, and weather.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Style the YouTube music player as a classic Ragnarok Online window: a
blue gradient title bar naming the town (♪ Prontera) with a ✕ 'put it
away' button. The panel stays small (220x200) and visible while playing
to respect YouTube's ToS (>=200x200, not hidden); both the 🎵 toggle and
the ✕ collapse-and-stop via a shared stopMusic(). Sits bottom-left,
clear of the bottom-right adopt CTA.

Also fixes a stale smoke assertion that expected the old whole-playlist
embed id — the shipped design plays each town's verified single-video
theme.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owners can now teleport their buddy to a chosen town instead of taking
whatever capacity-sharding assigns:

  buddy-world teleport geffen   # -> plaza-3, 'my buddy's a Geffen mage'
  buddy-world towns             # list the six RO cities
  buddy-world status            # now names the town

- New src/lib/world/towns.ts: single source of truth mapping town name <->
  plaza-N, ordered to match plaza.js TOWNS[]; drift-guarded by a new test.
- store.teleport() gains an optional desiredDistrict: sets it on create, and
  (the net-new bit) UPDATEs district on re-teleport — the 'move' path. Both
  Sqlite + D1 impls, verified by the shared describe.each suite.
- handleTeleport resolves a town name (or plaza-N) from the request body,
  400 unknown_town on a bad name, 409 town_full at capacity (but never
  bounces an existing occupant re-syncing).
- client.teleport(snapshot, { district }) threads it through; the worker
  already forwards the whole body, so no route change.

No new MCP tool — pure CLI, per the token-budget constraint. tsc clean;
all new unit/integration tests green (the 2 plaza-smoke pixel failures are
the pre-existing local-machine starvation flakes).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… merge)

Cross-environment handoff for an agent picking up the plaza/teleport work:
PR #147 status, feature map, validation, merge command, landmines, ship path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fiorastudio pushed a commit that referenced this pull request Aug 3, 2026
#147)

Ports the "choose-your-town teleport" feature the #159 reconciliation missed,
so an owner can pick a town — and re-teleporting MOVES their buddy between towns:
- src/lib/world/towns.ts: TOWN_NAMES + districtForTown/townForDistrict (6th town
  Comodo, matching the live plaza.js TOWNS order).
- store.teleport(..., desiredDistrict): existing citizens MOVE to the chosen
  district; new citizens can start in it (sqlite + D1).
- handleTeleport accepts payload.district (town name or plaza-N), resolves +
  capacity-gates (409 town_full; never bounces someone already there). Keeps the
  ?district= share URL from the earlier fix.
- client.teleport(snapshot, { district }); CLI: `buddy-world teleport <town>` +
  `buddy-world towns`.
- Fixes a missed regression: client.test/world-cli.test still asserted the old
  /b/<slug> share URL after the teleport-URL fix — updated to ?district=.

The browser plaza is anonymous and can't move YOUR buddy (no token); moving is a
CLI action. The browser warp button stays a spectator tour.

Suite: 1062 passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant