47 Commits

Author SHA1 Message Date
root b2ac0e7a00 feat: add Reset Stats button to admin LLM tracking panel
Allows resetting the LLM stats aggregation window without deleting
historical data. Stores a reset timestamp in metadata and filters
the aggregation query to only include calls after that point.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 01:59:24 +00:00
root d39fb14914 feat: add NAP_BUFFER constant for daytime nap system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 03:04:05 +00:00
root 49016073ad feat: render berry bushes with 3-phase growth cycle on map
Add berry plant tileset (growing/ripe/picked phases) and wire berry bush
state from server to client so plants visually update as NPCs forage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 02:36:53 +00:00
root 9be78e3f8c fix: add 'thirst' to MemoryEvent.need type union
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:51:10 +00:00
root 955dd61117 refactor: remove all food POI references, clean up dead code
Remove pointsOfInterest from WorldState type, state serializer,
and client rendering. Remove foodPositions from map generator
interface and output. Update stale comment in worldSerializer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:47:47 +00:00
root 5da03ebb69 feat: add thirst to Needs, drink/forage to GoalType, thirst constants
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:26:54 +00:00
root c810c99a89 feat: add dayNumber to StateUpdate type 2026-03-10 19:13:16 +00:00
root fb78d8cc9c feat: add LLM analytics types and socket events to shared
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:14:55 +00:00
root 778eeb3832 feat: add TunableConstants, LogEntry types and socket events
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 02:16:27 +00:00
root 034f799431 feat: multi-tile trees with treesnstone tileset and trunk bridging
Replace single-tile tree rendering with 6 multi-tile tree variants using
the treesnstone.png tileset. Each tree is 3 tiles wide with canopy tiles
on the decorations layer (above characters) and ground/shadow tiles on
the trunkDecorations layer (below characters). Add trunk bridge tiles
(tile 41) behind transparent canopy areas to connect canopy to ground
visually, fixing floating canopy appearance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 01:22:47 +00:00
root 57e8b3a98a feat: add Desire types to shared
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 23:41:07 +00:00
root 3294879bab fix: address code review findings for sleep system
- Fix NpcInfoPanel activity label: rest→sleep (functional bug)
- Remove unnecessary array spread in mapGenerator reserved set
- Remove unused SLEEP_NIGHT_END constant

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:02:04 +00:00
root 65ee23c5be refactor: remove rest POIs from map generation, persistence, and client rendering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:58:02 +00:00
root fa4f0ce44d feat(shared): add sleep system constants and replace rest with sleep goal type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:47:53 +00:00
root afbf85d7ff feat(client): improve day/night cycle and add time indicator
Fix vertical line artifacts in nighttime overlay by using a single
rectangle for full night and a base+sweep approach for transitions.
Increase night darkness from 0.3 to 0.45 for more distinct nighttime.
Add a time indicator bar at top-center showing day/night progress
with sun/moon icons matching the EarthBound-inspired UI style.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:19:05 +00:00
root 9e02cd973e feat(shared): add StockpileLogEntry type, pickup goal, and stockpile socket events
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 02:47:26 +00:00
root f362619c5f feat(shared): add InventionSummary type and socket events
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 00:40:00 +00:00
root e5457b2446 feat(superlatives): add mostInventive superlative
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 23:49:40 +00:00
root 69a07248ce feat(shared): add 'invention' to MemoryEventType and NarrationEvent type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 23:48:50 +00:00
root b019beff82 feat(shared): add craft, build, dropoff goal types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 23:19:05 +00:00
root 53750df48b feat(shared): add productivity need, gather goal, inventory, STONE terrain
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 22:40:09 +00:00
root ba487839fd feat(memory): add MemoryEvent types and socket events to shared
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 21:50:08 +00:00
root d58e623c14 tweak: reduce stat drift rates and increase social cooldowns
- Halve sociability/empathy drift on positive outcome (0.05 -> 0.025)
- Halve temperament drift on negative outcome (0.02 -> 0.01)
- Increase social global cooldown (50 -> 75 ticks)
- Increase social pair cooldown (300 -> 450 ticks)
- Increase base proposal cooldown (500 -> 750)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 21:18:03 +00:00
root e33a253c5b feat(thought): add thought config and npc-thought socket event type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 21:02:50 +00:00
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