Commit Graph

54 Commits

Author SHA1 Message Date
root aebfad07ce feat: add getEffectiveStat helper for computed stat values
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:17:49 +00:00
root 9c6834c05f feat: add 3d6 stat generation for NPCs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:15:29 +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 349f8ef286 docs: add NPC stats implementation plan (12 tasks, TDD)
Covers shared types, stat generation, modifier system, system
integrations (needs decay, social), serialization, and UI display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:12:36 +00:00
root 56d8bd2eca docs: add NPC statistics system design
Two-tier stat system (Physical + Personality) using 3d6 generation,
transient modifiers, slow baseline drift, and integration points
for needs decay, brain, and social systems.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:09:30 +00:00
root c8a86eec3f feat: wire spawn hotkey and command panel visibility in GameScene
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:40:16 +00:00
root 526bb83d0b feat: create EarthBound-styled CommandPanel UI component
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:39:09 +00:00
root 953f9e8591 feat: add spawnNpc method to SocketClient
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:38:25 +00:00
root 7e5f430204 feat: handle spawn-npc socket event with cap and position logic
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:37:36 +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 fa02a6e93e feat: add findNearestWalkable method to GameMap
Adds a method that searches outward from a center position in Manhattan
distance rings to find the nearest walkable tile within a given radius.
Returns null if no walkable tile is found. Includes 5 tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:35:00 +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 a074683e4c docs: add camera mode commands implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:32:25 +00:00
root 7dfd9e55df docs: add camera mode commands design doc
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:30:28 +00:00
root 02a8fc7ce8 fix: prevent async race in sprite creation and emoji lifecycle leak
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>
2026-03-07 13:18:20 +00:00
root d011dcf183 fix: address code review - pair-based phase transitions and emoji animation lifecycle
- 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>
2026-03-07 13:12:01 +00:00
root 2a6c928c75 feat: show Socializing activity in NPC info panel during interactions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:08:47 +00:00
root cabb129fdf feat: add floating emoji overlay for NPC social interactions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:07:40 +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 7cfc8c0537 feat: add social interaction guards to brain and movement systems
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:05:05 +00:00
root ac3f26a470 feat: implement socialSystem with proximity detection and phase state machine
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:02:31 +00:00
root d0a7bfc4bc test: add failing tests for social interaction system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:00:34 +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 3fc04a6a3a docs: add NPC social interactions implementation plan
9-task TDD plan covering shared types, socialSystem, brain/movement
guards, game loop wiring, state serialization, client emoji overlay,
and info panel integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:55:08 +00:00
root cc8fc7def7 docs: add NPC social interactions design
Covers awareness zone, interaction state machine, cooldowns,
brain/movement guards, broadcast format, and client emoji overlay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:52:31 +00:00
root 50ccfd9c69 docs: update README and CLAUDE.md for portrait panel feature and Traefik deployment
- Document follow mode panel feature and controls
- Add Traefik reverse proxy deployment instructions
- Add security note about vite dev vs production serving
- Update CLAUDE.md with new entry points, test count, and conventions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 05:07:51 +00:00
root 836ea77c73 fix: allow game.conlon.fun in vite dev server
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:49:05 +00:00
root 4374914b29 fix: filter player entities from follow mode, remove redundant updateNeeds, show NPC name in mode text
- 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>
2026-03-07 04:43:40 +00:00
root 03849c9505 style: EarthBound-inspired NPC info panel with doubled borders and pixel aesthetic
Authentic SNES RPG window styling: doubled rounded borders with gap,
deep indigo palette, portrait frame, diamond separators, gradient
need bars with numeric readout, diagonal shine overlay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:40:11 +00:00
root d8d3e75157 feat: add Press Start 2P pixel font for NPC info panel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:38:49 +00:00
root dfed8401e4 feat: integrate NPC portrait panel with follow mode in GameScene
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:37:42 +00:00
root ffdfd1474e feat: add NpcInfoPanel HTML/CSS overlay with EarthBound-style UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:35:46 +00:00
root 1bbbba477b feat: add PortraitCompositor for layered NPC portrait images
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:35:20 +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 d46677389f feat: generate portrait features (brows, eyes, mouths) for NPCs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:31:22 +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
root 5de6b27ee9 chore: add .worktrees/ to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:26:02 +00:00
root 0e273f06a4 docs: add NPC portrait panel implementation plan
10-task TDD plan covering shared types, appearance generator,
name generator, portrait compositor, HTML/CSS panel, GameScene
integration, and EarthBound-inspired styling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:24:44 +00:00
root 43869914f4 docs: add NPC portrait panel design
Design for follow-mode NPC info panel with composited portraits,
EarthBound-inspired UI, live-updating needs bars, and name generator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:21:23 +00:00
root 78ab147d10 fix: remove duplicate step 6 in README deployment instructions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 03:59:26 +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 d543f8d3f1 docs: add README and CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:21:30 -05:00
andy fc29bc204c fix: give player entities an appearance component for avatar mode rendering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:21:05 -05:00
andy 6ffa52ffba feat: implement game scene with entity rendering, camera, and input
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:01:59 -05:00
andy 2305b48df2 feat: add character compositor that layers skin + accessories into cached textures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 19:13:07 -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 8b2e895da2 feat: add client entry point, boot scene, and socket client
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:53:09 -05:00
andy a8e18b9535 feat: add random appearance generator for NPC spawning
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:38:30 -05:00
andy 83660609fc feat: implement NPC systems (needs decay, brain, movement)
Add three ECS systems for NPC simulation:
- needsDecaySystem: decrements hunger/energy each tick, clamped at 0
- npcBrainSystem: goal selection based on need thresholds with pathfinding
- movementSystem: advances entities along computed paths

Includes 8 passing tests covering decay, goal prioritization, and movement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:19:07 -05:00