Commit Graph

311 Commits

Author SHA1 Message Date
Z. Cliffe Schreuders
14bc9af43e Add NPC inventory management and UI enhancements
- Introduced new NPC inventory system allowing NPCs to hold and give items to players.
- Updated ContainerMinigame to support NPC mode, displaying NPC avatars and available items.
- Enhanced chat and conversation systems to sync NPC item states with Ink variables, improving narrative interactions.
- Added event listeners for item changes, ensuring dynamic updates during conversations.
- Implemented new methods in NPCGameBridge for item giving and inventory display, streamlining item interactions.
2025-11-08 10:26:50 +00:00
Z. Cliffe Schreuders
4dd2a839f4 Enhance PersonChatUI to track characters with parallax animation
- Introduced a Set to keep track of characters that have undergone parallax animation, ensuring that the animation resets only for new speakers.
- Updated the logic to conditionally reset the parallax animation based on whether the speaker has been seen before, improving visual continuity during conversations.
2025-11-07 20:37:27 +00:00
Z. Cliffe Schreuders
d36b61f20e Enhance PersonChatMinigame and UI with improved caption area and parallax animation
- Updated CSS for the caption area to span the full width of the screen, enhancing visual consistency.
- Introduced a new inner container for caption content to maintain a maximum width, improving layout structure.
- Added parallax animation functionality in PersonChatPortraits for a more dynamic visual experience during conversations.
- Implemented automatic parallax animation reset when the speaker changes, ensuring smooth transitions between dialogues.
2025-11-07 20:33:54 +00:00
Z. Cliffe Schreuders
6f69ab52c1 Enhance PersonChatMinigame and related classes to support optional background images
- Added support for optional background image paths in PersonChatMinigame, PersonChatPortraits, and PersonChatUI, allowing for more dynamic visual presentations during conversations.
- Updated NPCManager to handle background image paths in timed conversations, improving narrative context.
- Enhanced canvas rendering logic to accommodate background images, ensuring proper scaling and alignment with character sprites.
2025-11-07 19:51:13 +00:00
Z. Cliffe Schreuders
8315abc932 Update sprite positioning in PersonChatPortraits to enhance visual alignment
- Adjusted sprite positioning by shifting it 20% away from the direction the character is facing, improving the visual representation for both NPCs and players.
- Ensured consistent handling of sprite and image centering across the canvas for better overall aesthetics.
2025-11-07 17:41:54 +00:00
Z. Cliffe Schreuders
717221cb3c Refactor PersonChatMinigame and update canvas handling in portraits
- Removed the outdated PersonChatMinigame implementation to streamline the codebase.
- Updated CSS for image handling in the chat minigame to use 'contain' for better aspect ratio maintenance.
- Improved canvas size management in PersonChatPortraits to ensure optimal rendering based on container dimensions, enhancing visual fidelity.
2025-11-07 17:27:35 +00:00
Z. Cliffe Schreuders
9a8ef9b9f5 Add Timed Conversations feature for Person NPCs
- Introduced a new documentation file detailing the Timed Conversations feature, which allows NPCs to automatically initiate dialogues after a specified delay.
- Included configuration examples and use cases to enhance narrative flow in scenarios.
- Updated NPCManager to support scheduling and triggering of timed conversations, improving interaction dynamics in the game.
2025-11-07 16:24:27 +00:00
Z. Cliffe Schreuders
1d889fe148 Enhance NPCManager to support timed conversations and update dialogue handling in PersonChatMinigame
- Added functionality to schedule timed conversations in NPCManager, allowing NPCs to automatically initiate dialogues after a specified delay.
- Updated PersonChatMinigame to handle multiple dialogue lines and speakers, improving the display logic for accumulated dialogue.
- Modified scenario JSON and Ink files to include timed conversation configurations for NPCs, enhancing narrative flow.
2025-11-07 16:15:52 +00:00
Z. Cliffe Schreuders
3f06b8fc8c Update GAME_CONFIG to disable debug mode for arcade physics 2025-11-07 00:36:22 +00:00
Z. Cliffe Schreuders
17848115a1 Implement NPCLazyLoader for per-room NPC loading and refactor related systems
- Introduced NPCLazyLoader class to handle NPC loading on a per-room basis, optimizing memory usage and performance.
- Updated the create() function to utilize the new lazy loading mechanism for NPCs in the starting room.
- Refactored loadRoom function to support asynchronous NPC loading, ensuring NPCs are registered before room visuals are created.
- Adjusted PersonChatMinigame to load NPCs from the current room context, enhancing NPC management.
- Updated scenarios to reflect the new NPC structure, moving NPC definitions from scenario root to individual rooms.
2025-11-07 00:33:22 +00:00
Z. Cliffe Schreuders
d4deec2376 Refactor NPC loading implementation and enhance error handling
- Consolidated async function updates for NPC loading in the `create()` function to streamline the process.
- Improved error handling during NPC loading for the starting room, ensuring room creation continues even if NPC loading fails.
- Updated documentation to reflect changes in the implementation checklist for better clarity on migration steps.
2025-11-07 00:17:19 +00:00
Z. Cliffe Schreuders
ffc7394fcd Enhance NPC migration documentation and progress tracking
- Updated various planning documents to include additional details and clarity on the NPC migration process.
- Added new sections to CLIENT_SERVER_SEPARATION_PLAN.md, NPC_MIGRATION_OPTIONS.md, RAILS_ENGINE_MIGRATION_PLAN.md, and README.md to improve overall documentation and ensure comprehensive coverage of migration strategies.
- Ensured all documents reflect the latest architectural decisions and implementation plans for better guidance during the migration process.
2025-11-07 00:12:24 +00:00
Z. Cliffe Schreuders
17603b3c97 Add comprehensive planning and implementation documentation for NPC lazy-loading architecture
- Create README.md outlining the entire migration plan, including executive summary, technical details, migration guide, API specification, and testing checklist.
- Introduce START_HERE.md as a quick start guide for implementation, detailing initial steps and phase breakdown.
- Develop VISUAL_GUIDE.md with diagrams and visual references for current vs. target architecture, NPC types, implementation phases, and memory usage comparisons.
2025-11-06 23:55:31 +00:00
Z. Cliffe Schreuders
75b7b3c5b2 feat(css): Improve caption area layout and adjust font sizes for better readability 2025-11-06 11:18:54 +00:00
Z. Cliffe Schreuders
09d35af661 feat(dialogue): Enhance dialogue block display to include choice handling after completion 2025-11-06 10:54:46 +00:00
Z. Cliffe Schreuders
6ab2340e54 feat(dialogue): Enhance sequential dialogue display with line accumulation 2025-11-06 10:49:29 +00:00
Z. Cliffe Schreuders
5a752d0aca feat(ui): Refactor dialogue and controls layout for improved interaction and visibility 2025-11-06 10:43:43 +00:00
Z. Cliffe Schreuders
b1686fc5eb feat(css): Enhance minigame styles with max-width and margin for better layout
refactor(js): Remove unused asset loading in preload function
feat(js): Implement optimal scale calculation for pixel-perfect rendering in person chat portraits
2025-11-06 01:54:55 +00:00
Z. Cliffe Schreuders
13f71baa82 feat(ui): Update font sizes for dialogue and speaker name for improved readability 2025-11-06 00:54:08 +00:00
Z. Cliffe Schreuders
f055d6c536 feat(npc): Update conversation flow to handle exit choices and NPC responses 2025-11-05 20:15:33 +00:00
Z. Cliffe Schreuders
2d0e30f157 Add helper NPC dialogue and interactions for mission assistance
- Created a new JSON file for the helper NPC with various dialogue options and interactions.
- Implemented responses for asking about the NPC, unlocking the CEO's office, and providing items.
- Enhanced trust-building mechanics with the NPC, allowing for item exchanges and hints based on player actions.
- Updated existing NPC dialogue to integrate new features and improve player guidance throughout the mission.
2025-11-05 20:15:26 +00:00
Z. Cliffe Schreuders
78cc3beab4 feat(person-chat): Implement click-through mode for dialogue advancement and enhance UI with continue button 2025-11-05 09:18:58 +00:00
Z. Cliffe Schreuders
4daaa87534 feat(npc): Implement conversation state management and enhance NPC interaction features 2025-11-05 01:03:08 +00:00
Z. Cliffe Schreuders
d217e5a02a feat(npc-interaction): Enhance NPC interaction system with click handling and distance checks 2025-11-04 23:25:41 +00:00
Z. Cliffe Schreuders
2c9d3a739c feat(npc-collisions): Implement comprehensive collision setup for NPC sprites including walls and chairs 2025-11-04 22:22:29 +00:00
Z. Cliffe Schreuders
518d8916be feat(person-chat): Implement multi-character support and enhance dialogue handling 2025-11-04 22:11:32 +00:00
Z. Cliffe Schreuders
e0cef60f37 feat(npc): Add talk icon system and update NPC sprite configurations 2025-11-04 21:31:00 +00:00
Z. Cliffe Schreuders
9f82abd072 feat(person-chat): Enhance player interaction by adding scenario data and improving dialogue handling 2025-11-04 14:21:35 +00:00
Z. Cliffe Schreuders
e73a6a038b Add NPC sprite test scenario, server for development, and HTML test pages
- Created a new JSON scenario file for testing NPC sprite functionality.
- Implemented a simple HTTP server with caching headers for development purposes.
- Added an HTML page for testing NPC interactions, including system checks and game controls.
- Introduced a separate HTML page for testing item delivery through person chat interactions.
2025-11-04 14:16:48 +00:00
Z. Cliffe Schreuders
5fd7ad9307 feat(interactions): Enhance interaction distance calculation for diagonal movements 2025-11-01 11:14:42 +00:00
Z. Cliffe Schreuders
6aa6fd4beb feat(sound): Refactor sound manager initialization to reuse instance across preload and create phases 2025-11-01 11:07:54 +00:00
Z. Cliffe Schreuders
cb8a9399a9 feat(npc): Remove unregisterNPC method and associated cleanup logic 2025-11-01 10:43:48 +00:00
Z. Cliffe Schreuders
1bd037d969 feat(npc): Enhance message handling by adding metadata support in addMessage method 2025-11-01 10:42:37 +00:00
Z. Cliffe Schreuders
2a5eed9963 feat: Implement comprehensive sound management system for Break Escape
- Created SoundManager class for centralized audio management using Phaser's audio system.
- Integrated 34 sound assets, including UI interactions, item collection, and lock attempts.
- Developed UI sound helpers for seamless attachment to DOM elements.
- Updated game.js to preload and initialize sound manager, ensuring global access.
- Modified interactions.js, unlock-system.js, and panels.js to incorporate sound feedback.
- Provided extensive documentation, including implementation summary and usage examples.
- Ensured backward compatibility and optimized performance for audio playback.
2025-11-01 08:58:07 +00:00
Z. Cliffe Schreuders
9aae3f9443 feat: Implement centralized sound management system
- Created SoundManager class for handling audio playback using Phaser's sound system.
- Added methods for preloading, initializing, and playing sounds with volume control.
- Integrated UI sound helpers for easier sound attachment to DOM elements.
- Updated game.js to initialize sound manager and preload sounds.
- Modified interactions.js, unlock-system.js, and panels.js to play appropriate sounds on interactions.
- Created SOUND_SYSTEM_QUICK_REFERENCE.md for documentation on sound system usage.
- Optimized NPCBarkSystem and NPCManager with caching and event listener cleanup.
2025-11-01 00:34:26 +00:00
Z. Cliffe Schreuders
e05b4d7903 feat(npc): Add pixel-art avatars for NPCs in bark notifications and update scenario configurations 2025-11-01 00:08:13 +00:00
Z. Cliffe Schreuders
34f1739484 feat(npc): Add audio feedback for NPC bark notifications with message received sound 2025-10-31 21:10:07 +00:00
Z. Cliffe Schreuders
40da85dac4 feat(npc): Enhance NPC interaction with room navigation events and refined greeting logic 2025-10-31 16:31:07 +00:00
Z. Cliffe Schreuders
c80aa5b68d Implement event-driven NPC reactions and fix event dispatcher issues
- Added event emissions for NPC interactions in core game systems:
  - Unlock System: door_unlocked, item_unlocked, door_unlock_attempt
  - Interactions System: object_interacted
  - Inventory System: item_picked_up:*
  - Minigame Framework: minigame_completed, minigame_failed

- Created event-triggered reactions for the helper NPC:
  - Added knots for lockpick pickup, success, failure, door unlock, and object interaction.
  - Implemented state tracking and context-aware responses.

- Updated event mappings in scenario JSON for the helper NPC to respond to various events.

- Fixed global variable references in event emission code to ensure proper event dispatching.

- Added debug logging to verify event emissions and NPC reactions.

- Documented implementation details and testing instructions for new features.
2025-10-31 11:48:43 +00:00
Z. Cliffe Schreuders
99097130f4 feat(npc): Implement NPC Game Bridge with helper NPC functionality
- Added NPCGameBridge class to facilitate interactions between NPCs and game state.
- Implemented methods for unlocking doors, giving items, setting objectives, revealing secrets, adding notes, triggering events, and discovering rooms.
- Introduced a helper NPC that can assist players by unlocking the CEO's office and providing items based on trust levels.
- Created comprehensive documentation for the NPC Game Bridge implementation.
- Updated scenario JSON to include the new helper NPC and its interactions.
- Added Ink story for the helper NPC demonstrating its capabilities.
2025-10-31 10:42:08 +00:00
Z. Cliffe Schreuders
e375537b61 feat: Implement phone badge system for unread messages; redesign bark notifications for better visual integration 2025-10-31 00:25:27 +00:00
Z. Cliffe Schreuders
b1843cd340 feat: Implement phone badge for unread messages; add timed messages for NPCs and update inventory UI 2025-10-30 23:35:13 +00:00
Z. Cliffe Schreuders
5f6cc7e59d feat: Add NPCs and phone interactions to the CEO exfiltration scenario; implement new dialogue for Neye Eve and Gossip Girl 2025-10-30 14:40:54 +00:00
Z. Cliffe Schreuders
b8bed005aa feat: Update minigame controls to use "Notepad" terminology and enhance NPC system initialization 2025-10-30 13:40:34 +00:00
Z. Cliffe Schreuders
01010e7e20 refactor: Remove old phone-messages minigame and transition to phone-chat
- Deleted `phone-messages-minigame.js` and archived related CSS.
- Updated `interactions.js` to exclusively use phone-chat with runtime conversion.
- Enhanced error handling for phone interactions.
- Marked completion of old phone minigame removal in implementation log.
- Added detailed cleanup summary documentation.
2025-10-30 10:16:31 +00:00
Z. Cliffe Schreuders
7a8e8a22a7 feat: Add voice message support to Phone Chat UI; integrate Web Speech API for playback and enhance UI with audio controls 2025-10-30 03:12:31 +00:00
Z. Cliffe Schreuders
f5f7de3d48 feat: Add voice message playback functionality using Web Speech API; implement voice selection and UI controls 2025-10-30 03:07:46 +00:00
Z. Cliffe Schreuders
f369b41547 feat: Implement voice messages in phone chat minigame
- Added support for voice messages prefixed with "voice:" in Ink files.
- Updated UI rendering to display voice message UI with play button and transcript.
- Implemented automatic conversion for scenario JSON with voice properties.
- Created test examples for pure voice messages and mixed content.
- Fixed issues with NPC registration and message duplication in test scenarios.
- Documented feature details, use cases, and testing procedures.
2025-10-30 02:45:05 +00:00
Z. Cliffe Schreuders
99a631f42f feat: Implement timed messages system for NPC interactions; preload intro messages and enhance UI with avatars 2025-10-30 01:31:37 +00:00
Z. Cliffe Schreuders
ef5d85b744 Refactor InkEngine to allow manual control of story continuation; enhance continue method for better text accumulation and logging
Update interactions.js to reference new version of constants

Improve NPCBarkSystem to dynamically import phone-chat minigame and handle fallback UI more gracefully

Modify constants.js to conditionally export GAME_CONFIG based on Phaser availability

Update implementation log for Phone Chat Minigame, detailing completed modules and next steps

Create detailed implementation plan for Phone Chat Minigame, outlining structure, features, and integration points

Add test HTML page for Phone Chat Minigame, including setup, chat tests, and history management functionalities
2025-10-29 19:17:51 +00:00