Stone tiles now display as gray rectangles with darker borders instead of
being hidden under the base grass layer. Also treats stone as a land tile
for water edge autotiling so water/stone boundaries render correctly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire SocketClient to receive memory-event and memory-history socket
events. GameScene stores per-NPC memory events and updates the info
panel in follow mode. NpcInfoPanel gains a third "History" tab showing
a reverse-chronological event log with emoji icons per event type.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- determineTrigger now detects post_interaction (recent social outcome),
need_critical, idle (wandering), and periodic triggers
- Track active emoji per NPC, destroy previous before showing new one
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements LLM-powered narration for NPC social interactions:
- Rate limits updated to 20 RPM / 1000 per day (OpenRouter free tier)
- NarrationEvent type with template fallback text generator
- NarrationService with rolling event buffer and LLM priority queuing
- Narration emitter wired between social and relationship systems
- Socket.io events for real-time narration delivery
- Tabbed left panel (Stats + Events) replacing old Superlatives panel
- Recent events section in NPC info panel
- Follow tracking via socket for LLM narration priority
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Restore subscribeSuperlatives/unsubscribeSuperlatives/onSuperlativesUpdate
on SocketClient (lost during Task 5 refactor)
- Fix EventsFeed.updateEvent to rebuild entire element when LLM narration
arrives (names may be in different positions)
- Remove dead setFollowedEntity method from GameLoop (replaced by
SocketServer.rebuildFollowedEntityIds)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds follow-npc client event so the server knows which NPCs are being
watched, enabling priority LLM narration for followed entity interactions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show the last 3 narration events involving the followed NPC in the
Status tab, between the activity label and the diamond separator.
Events update live when new narrations arrive or LLM text replaces
template text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract SuperlativesPanel into content-only component, create LeftPanel
as the outer shell with two tabs (S for Stats, E for Events), and add
EventsFeed component for displaying narration events with clickable
NPC names and auto-scroll behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire narration events through the socket layer so clients receive
real-time narration updates. Server emits narration-event on creation,
narration-update when LLM text arrives, and narration-history on connect.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add trunk decoration layer to GameMap and mapGenerator
- Load trunk.png asset in BootScene
- Increase superlatives panel size and font sizes for readability
- Simplify mapGenerator (remove procedural terrain features)
- Add LLM integration planning documents
- Remove stale day-night cycle worktree plans
- Update local Claude settings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add backstory element to the Status tab between the activity label and
diamond separator. When a backstory arrives from the LLM, it fades in
with italic styling. Empty backstories remain hidden.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The watergrass inner corner tiles (rows 0-1) show mostly water with a
tiny grass patch — they're designed for water tiles at concave corners,
not for grass tiles. Removing them eliminates the reddish-brown artifacts
at diagonal water-grass boundaries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dirt tiles (dirt-on-transparent) must be applied to DIRT tiles checking
for non-dirt neighbors, not to GRASS tiles. The previous approach had
dirt edges facing the wrong direction because the dirt island's edges
point inward from the center, not outward from the grass.
Water edges (watergrass = grass-on-water) remain applied to GRASS tiles
since the grass portion aligns correctly with the base grass layer.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the 16x16 tileset with LPC Base Assets (32x32 tiles, 1.5x scale).
Uses a 4-layer rendering approach:
- Layer 0: solid grass base (grass.png)
- Layer 1: water transitions (watergrass.png) with LPC autotile edges
- Layer 2: dirt transitions (dirt.png) with LPC autotile edges
- Layer 3: tree canopy decorations (treetop.png)
LPC autotile format: 3x6 grid with inner/outer corners, edges, and fill
tiles. Edge tiles are selected based on 8-neighbor terrain analysis.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace colored-rectangle world rendering with a proper tilemap system
using a 16x16 RPG tileset scaled 3x. Server generates terrain via seeded
procedural generation (river, ponds, dirt patches, tree decorations) and
sends it to clients. Client renders 3-layer Phaser tilemap with
8-neighbor autotiling for water/dirt edges.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two bugs caused accessories to render independently of their NPC:
1. spawnEntities ran concurrently with state updates, allowing duplicate
sprites to be created for the same entity. The orphaned sprite would
animate in place but never move. Fixed by deferring onStateUpdate
registration until initial spawn completes.
2. CharacterCompositor tracked load intent (Set) rather than load
completion (Promise), so concurrent preloads could composite before
shared textures finished loading — producing sprites with missing
skin layers. Fixed by using a Map<string, Promise> so concurrent
callers await the same per-file load promise.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The updateRelationships method rebuilds DOM every broadcast tick,
which reset expand/collapse state. Now tracks expanded tiers in a
Set that persists across re-renders.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update CLAUDE.md with relationship system entry points, conventions, test count
- Restore NPC info panel to 280px width with original font sizes
- Add responsive scaling to Phaser game config
- Bump CommandPanel font sizes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Math.max(3, ...) to baseline drift in socialSystem to prevent
stats drifting below minimum (was only clamping upward with Math.min)
- Make NpcInfoPanel.updateStats private (only called from updateInfo)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two bugs fixed:
1. NPC sprites not fully rendering: createEntitySprite is async but was
called without await from handleStateUpdate. Concurrent state updates
triggered multiple simultaneous creation calls for the same entity.
The second call composited before textures loaded, producing empty
spritesheets. Fixed with a creatingEntities guard set.
2. Interaction emojis not appearing after first use: animationend
listener was attached during removal (when animation had already
completed), so it never fired. Ghost entries in activeEmojis map
blocked future emoji creation. Fixed by self-cleaning via
animationend listener attached at creation time.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Process phase transitions per-pair instead of per-entity to avoid
double-processing (latent bug for future side effects)
- Restore independent outcome rolls per NPC (as designed)
- Let emoji CSS animation finish before removing DOM element, preventing
visual pop when server broadcast timing doesn't align with animation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- getNpcIds() now excludes player-controlled entities
- Remove double updateNeeds call in handleStateUpdate (updateInfo already calls it)
- Mode text shows NPC name instead of just ID
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add follow mode (F key) to cycle camera between NPCs
- Make server URL configurable via VITE_SERVER_URL env var
- Add comprehensive README with Debian LXC deployment guide
- Add character sprite assets to repo
- Add design docs and implementation plans
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>