Commit Graph

274 Commits

Author SHA1 Message Date
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
Z. Cliffe Schreuders
9fffb6b4e4 Add NPC dialogue and interaction scripts
- Created a generic NPC script with conversation handling.
- Developed an Alice NPC script demonstrating branching dialogue and state tracking.
- Implemented a test NPC script for development purposes.
- Added JSON representations for the NPC scripts.
- Created an HTML test interface for NPC integration testing.
- Included event handling and bark systems for NPC interactions.
2025-10-29 13:48:22 +00:00
Z. Cliffe Schreuders
887e5f6443 Add NPC integration planning documents and example scenario
- Created `05_EXAMPLE_SCENARIO.md` with a complete Ink script for the Biometric Breach scenario featuring NPCs Alice and Bob.
- Added `QUICK_REFERENCE.md` as a cheat sheet for NPC system components, event types, and common patterns.
- Introduced `README.md` as an index for NPC integration planning, outlining document structure and key concepts.
2025-10-29 00:18:22 +00:00
Z. Cliffe Schreuders
c4dfa9482a fix: Update lockpick inventory alert message for clarity 2025-10-28 23:29:56 +00:00
Z. Cliffe Schreuders
9ed2c38f70 refactor: Simplify key selection UI method calls by removing parent references 2025-10-28 23:15:26 +00:00
Z. Cliffe Schreuders
94c9caa4eb feat: Add running mechanics with speed and animation multipliers for player movement 2025-10-28 23:02:31 +00:00
Z. Cliffe Schreuders
158d8fb37a fix: Update key visual feedback method to use instance method for flashing lock 2025-10-28 22:47:03 +00:00
Z. Cliffe Schreuders
81d762685d feat: Implement keyboard input pause/resume functionality for minigames 2025-10-28 22:45:41 +00:00
Z. Cliffe Schreuders
f8068ecadd feat: Implement keyPins normalization and conversion logic for accurate cut generation in minigames 2025-10-28 20:09:07 +00:00
Z. Cliffe Schreuders
cf3268e6b5 feat: Normalize keyPins in starting inventory and generate cuts from lock configuration in minigames 2025-10-28 20:01:47 +00:00
Z. Cliffe Schreuders
5cd07b5d4b refactor: remove outdated documentation 2025-10-28 16:11:16 +00:00
Z. Cliffe Schreuders
17ef1e6995 fix: Adjust container height calculation in key selection UI for improved layout 2025-10-28 16:09:20 +00:00
Z. Cliffe Schreuders
5436abe538 feat: Enhance key selection with additional key presets and improve random key generation logic 2025-10-28 16:03:50 +00:00
Z. Cliffe Schreuders
0ded5cae05 refactor: Simplify key generation by using generic names for keys in KeySelection 2025-10-28 14:26:52 +00:00
Z. Cliffe Schreuders
1228bc15fe feat: Normalize keyPins from 0-100 scale to 25-65 scale across scenarios and rooms 2025-10-28 13:31:20 +00:00
Z. Cliffe Schreuders
90fa4d0047 feat: Implement scenario-based keyPins for locks and keys, enhancing lockpicking mechanics 2025-10-28 11:33:54 +00:00
Z. Cliffe Schreuders
004a537936 feat: Enhance chair wall collision handling to ignore low-velocity collisions 2025-10-27 17:59:07 +00:00
Z. Cliffe Schreuders
5d4a44fc70 Refactor: Remove KeyPointGeometry module and update LockpickingMinigamePhaser to use KeyGeometry 2025-10-27 17:49:25 +00:00
Z. Cliffe Schreuders
741ec55864 Refactor lockpicking mechanics and visuals
- Updated PinManagement to utilize new PinVisuals class for handling pin visuals and interactions.
- Replaced direct feedback updates with keyInsertion feedback methods for consistency.
- Introduced a new PinVisuals class to encapsulate pin rendering logic and improve code organization.
- Adjusted tool manager feedback methods to align with the new structure.
- Enhanced pin highlighting and visual updates during gameplay for better user experience.
2025-10-27 16:53:18 +00:00
Z. Cliffe Schreuders
f27ad53cc2 feat: Add ToolManager class for managing lockpicking tools and modes
- Implemented ToolManager to handle the visibility and behavior of lockpicking tools.
- Added methods for switching between key mode and lockpicking mode.
- Included functionality to return hook to starting position and flash wrench red.
- Integrated cleanup and initialization processes for the lockpicking game state.
- Enhanced user feedback and UI updates during mode transitions.
2025-10-27 16:34:48 +00:00
Z. Cliffe Schreuders
d9703930e1 Fix: Add missing createKeyBladeCollision and getKeySurfaceHeightAtPosition to KeyOperations 2025-10-27 16:17:30 +00:00
Z. Cliffe Schreuders
8077391ba6 Merge: Combine KeyVisualFeedback into KeyOperations module 2025-10-27 16:15:17 +00:00
Z. Cliffe Schreuders
b224f4043d Fix: Save original keyData before modification in createKeyVisual 2025-10-27 16:11:45 +00:00
Z. Cliffe Schreuders
b20d159ffc Extract: Phases 3-6 complete (Key Data Generator, Key Selection, Key Visual Feedback, Key Operations) 2025-10-27 16:10:12 +00:00
Z. Cliffe Schreuders
cf776cb693 Add KeySelection module to lockpicking minigame: Extract key generation logic and integrate into LockpickingMinigamePhaser for improved modularity. 2025-10-27 15:58:56 +00:00
Z. Cliffe Schreuders
a6d04d3e28 Add KeyDataGenerator module and refactor key data generation logic in lockpicking minigame 2025-10-27 15:34:04 +00:00
Z. Cliffe Schreuders
0b9f1cb2de Integrate LockGraphics module into lockpicking minigame: Initialize LockGraphics in the LockpickingMinigamePhaser class for enhanced graphical representation. 2025-10-27 15:21:22 +00:00
Z. Cliffe Schreuders
cb9f7d1cba Refactor lockpicking minigame: Extract lock configuration logic into LockConfiguration class
- Created a new LockConfiguration class in lock-configuration.js to encapsulate lock configuration methods.
- Removed lock configuration methods from lockpicking-game-phaser.js and replaced them with an instance of LockConfiguration.
- Added methods for saving, loading, clearing, and resetting lock configurations in the new class.
- Updated lockpicking-game-phaser.js to utilize the new LockConfiguration class for managing lock states.
- Introduced scripts for extracting methods and listing JavaScript functions for better code organization and maintainability.
2025-10-27 14:52:43 +00:00
Z. Cliffe Schreuders
7acb65babc Refactor key management in CEO exfil scenario: Simplify key ID structure by separating key IDs and pin codes for improved clarity and maintainability. 2025-10-27 12:54:48 +00:00
Z. Cliffe Schreuders
946cae2b16 Refactor phone messages minigame: Remove drag-to-scroll functionality for cleaner code. Update scenario JSON files to include voice, sender, and timestamp attributes for phone messages, enhancing narrative clarity. 2025-10-25 23:43:16 +01:00
Z. Cliffe Schreuders
2e23d50aec Refactor scenarios: Remove deprecated XML files and update JSON scenarios with starting inventory items. Adjust room creation logic to prevent sprite creation for starting inventory items. Update scenario select paths for consistency. 2025-10-25 23:28:25 +01:00
Z. Cliffe Schreuders
ae270d2fa6 Refactor interaction distance calculation: Introduce getInteractionDistance function to improve accuracy based on player direction. Update interaction range constant to half of the previous value for refined interaction mechanics. 2025-10-24 10:19:11 +01:00
Z. Cliffe Schreuders
6f4cfd43c8 Enhance office room layout and interactions
- Updated room_office2.tmj to adjust object positions and dimensions for better alignment.
- Added new objects and refined existing ones to improve gameplay experience.
- Modified TiledItemPool in rooms.js to support regular and table items separately, ensuring proper item matching and prioritization.
- Improved interaction handling for swivel chairs, allowing them to be kicked and spin upon collision with walls.
- Updated object physics to handle swivel chair collisions dynamically, enhancing realism.
- Revised scenario details in cybok_heist.json for clarity and improved narrative flow.
2025-10-24 09:59:11 +01:00
Z. Cliffe Schreuders
a2a9359a02 Enhance Container Minigame: Implement notes item handling to trigger the notes minigame before taking items, and manage container state for returning after the minigame. Update unlock system alert message for clarity. Modify CyBOK heist scenario by removing unnecessary objects and updating item descriptions for better gameplay experience. 2025-10-22 18:47:01 +01:00
Z. Cliffe Schreuders
97391c2988 Refactor Container Minigame: Enhance item handling to properly manage takeable items and delegate interactions to the main game handler. Update inventory management to prevent duplicate pickups and streamline object interactions.
Add new scenario: Introduce "CyBOK Heist" with detailed room and object interactions, including clues and challenges related to cybersecurity concepts.
2025-10-22 17:16:10 +01:00
Z. Cliffe Schreuders
28becd0772 Enhance TiledItemPool: Update getUnreservedItems to exclude conditional items and add inventory item handling in createRoom to prevent sprite creation for marked items. 2025-10-22 13:46:34 +01:00
Z. Cliffe Schreuders
baceea6dab Add AI Coding Agent Instructions: Introduce comprehensive documentation for the Break Escape project, detailing architecture, data flow, key patterns, and essential development workflows to enhance onboarding and developer understanding. 2025-10-22 13:29:16 +01:00
Z. Cliffe Schreuders
1b313fbdaa Implement keyboard controls for player movement and interaction
- Added keyboard input handling for movement using arrow keys and WASD.
- Integrated spacebar for jump functionality and 'E' key for interacting with nearest objects.
- Enhanced player movement logic to prioritize keyboard input over mouse movement.
- Created visual effects for player jumping, including cooldown management and overlay animations.
2025-10-22 13:20:05 +01:00