Commit Graph

18 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 94e4f4b9c2 fix: restore superlatives methods, fix event update rebuild, remove dead method
- 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>
2026-03-08 18:38:06 +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 8c793578ae feat: wire backstory generation into NPC spawn flow
Trigger fire-and-forget backstory generation whenever an NPC spawns,
both during initial spawn and via player spawn-npc requests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:52:13 +00:00
root 180f056570 feat: add backstory component to spawner and serializer
Initialize empty backstory on NPC spawn, serialize it for broadcast,
and add test coverage for the new component.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:44:23 +00:00
root 3a86e09e39 feat(llm): wire LLM service into GameLoop
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:30:32 +00:00
root a778bee58d fix: round cycleTicks to prevent float precision drift
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 03:08:05 +00:00
root f5857f72d8 feat: server tracks and broadcasts game time
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 03:04:08 +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 db808bca86 feat: initialize bond registry singleton and update spawner
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:21:54 +00:00
root 97c2176b75 feat: wire relationship system into spawner, game loop, and serializer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:35:59 +00:00
root df0f036cf2 feat: emit lastOutcome from socialSystem for relationship processing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:31:47 +00:00
root c5d75fa0b0 feat: wire stats into NPC spawner and game loop
Add stats and statModifiers components to spawnNPC, and run
statModifierSystem as the first system in the GameLoop update cycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:20:43 +00:00
root 1576e6b717 feat: add optional positionHint to spawnNPC
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:36:37 +00:00
root 8daecfaa3f feat: wire socialSystem into game loop, spawner, and state serializer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:06:08 +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
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 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