Commit Graph

23 Commits

Author SHA1 Message Date
root 87946bcb5c feat: add social interaction narration system (task 1.3)
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>
2026-03-08 19:29:43 +00:00
root 6514dde42e feat: track followed NPCs via socket for LLM narration priority
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>
2026-03-08 18:25:16 +00:00
root 57695043f2 feat: add socket.io events for narration broadcast
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>
2026-03-08 18:14:50 +00:00
root 541b70b781 feat: wire narration emitter into social system and GameLoop
Add narrationEmitter system that reads completed interactions from
socialState.lastOutcome and feeds them to the NarrationService. It runs
between socialSystem and relationshipSystem to capture outcomes before
they are cleared. Includes pair deduplication, proposal detection,
priority marking for followed NPCs and high-value relationships, and
personality formatting for LLM prompts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:02:59 +00:00
root 865054facc feat: add NarrationEvent type and template fallback narration generator
Define NarrationEvent and NarrationOutcome types in shared package for
social interaction narration. Add generateFallbackNarration() with
randomized templates for each outcome type (positive, negative,
proposal_accepted, proposal_rejected) to provide immediate text when
LLM narration is unavailable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:52:23 +00:00
root 0b028c2cec feat: add backstory field to EntityState shared type
Add optional backstory string to EntityState for NPC backstory generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:44:19 +00:00
root 215eb66c23 feat: add superlatives types and socket events to shared
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 04:37:07 +00:00
root b295ef1af7 feat: add gameTime to StateUpdate type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 03:03:23 +00:00
root 28533a3865 feat: add day/night cycle constants
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 03:03:13 +00:00
root 17621fbd59 feat: switch to LPC tileset with layered autotiling
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>
2026-03-07 23:40:15 +00:00
root 4a2819695b feat: procedural tilemap with river, ponds, dirt, and trees
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>
2026-03-07 22:45:09 +00:00
root 99e041d6cf feat: add proposal and bond types to shared protocol
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:18:38 +00:00
root 2ae3326b09 feat: add relationship types to shared
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:28:47 +00:00
root 1351708c7b feat: add Stats and StatModifiers types to shared
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:14:26 +00:00
root 4ff6f14746 feat: add spawn-npc event type and MAX_NPC_COUNT constant
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:33:38 +00:00
root ce55c86c5a feat: add SocialState types and social interaction constants
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:58:26 +00:00
root 0cf48ded61 feat: add NPC name generator and broadcast names in entity state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:33:42 +00:00
root 7a61b82c51 feat: add portrait slot types and sprite-to-portrait folder mapping
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:28:04 +00:00
andy b94ad32806 feat: viewport modes, configurable server URL, deployment docs
- 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>
2026-03-06 22:25:53 -05:00
andy 8fee2faf1e feat: add Socket.io server with state broadcasting and player input handling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:13:07 -05:00
andy ca05d36bc0 feat: add game loop with NPC spawning and system execution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:53:19 -05:00
andy 1fdae9e45c feat: add shared types and constants for ECS, networking, and assets
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:10:52 -05:00
andy 39c19568c1 feat: scaffold monorepo with shared, server, and client packages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:09:07 -05:00