30 Commits

Author SHA1 Message Date
Z. Cliffe Schreuders
3d1570a030 feat: Implement strong parameters for room state synchronization and enhance item validation against NPC inventory 2026-02-17 00:34:19 +00:00
Z. Cliffe Schreuders
e18e1d7228 feat: Implement dynamic room state management with server synchronization for items, NPCs, and object states 2026-02-16 23:51:59 +00:00
Z. Cliffe Schreuders
fb6e9b603c Enhance character sprite loading and animation handling
- Updated the game to support new character sprite atlases for both male and female characters, allowing for a wider variety of NPC designs.
- Improved player sprite initialization to dynamically select between atlas-based and legacy sprites, enhancing flexibility in character representation.
- Refined collision box settings based on sprite type, ensuring accurate physics interactions for both atlas (80x80) and legacy (64x64) sprites.
- Enhanced NPC behavior to utilize atlas animations, allowing for more fluid and diverse animations based on available frames.

Files modified:
- game.js: Added new character atlases and updated sprite loading logic.
- player.js: Improved player sprite handling and collision box adjustments.
- npc-behavior.js: Updated animation handling for NPCs to support atlas-based animations.
- npc-sprites.js: Enhanced NPC sprite creation to accommodate atlas detection and initial frame selection.
- scenario.json.erb: Updated player and NPC configurations to utilize new sprite sheets and animation settings.
- m01_npc_sarah.ink: Revised dialogue options to include new interactions related to NPCs.
2026-02-11 00:18:21 +00:00
Z. Cliffe Schreuders
dbede74035 Move some planning files 2026-02-10 11:56:13 +00:00
Z. Cliffe Schreuders
5c28743144 Update CSS file paths and enhance tutorial system
- Changed CSS file paths in index.html and show.html.erb to reflect new directory structure under public/break_escape.
- Added a new tutorial.css file with styles tailored for the tutorial system, ensuring a cohesive pixel-art aesthetic.
- Enhanced the tutorial manager to track player interactions, including clicks to move and inventory item usage, improving the tutorial experience for new players.
- Updated tutorial steps to dynamically include objectives based on the current scenario.

Files modified:
- index.html: Updated CSS links.
- show.html.erb: Updated CSS links.
- tutorial.css: New styles for the tutorial system.
- player.js: Added notifications for player actions.
- tutorial-manager.js: Enhanced logic for tracking tutorial progress and objectives.
- interactions.js: Added notifications for inventory interactions.
2026-01-19 09:54:15 +00:00
Z. Cliffe Schreuders
5a89ce945c Update INK best practices and instructor scenarios for influence tracking
- Added critical requirements for including `#influence_increased` and `#influence_decreased` tags after modifying influence variables to ensure visual feedback in the game.
- Enhanced documentation on best practices for dialogue formatting, emphasizing the importance of avoiding lists and keeping exit conversations brief.
- Updated multiple instructor scenarios to include the necessary influence tags, ensuring consistent feedback for player actions.
- Corrected room connection direction in scenario.json.erb for improved navigation.
2025-12-04 14:13:21 +00:00
Z. Cliffe Schreuders
333ea39c56 Implement submit_flags task functionality and enhance game mechanics
- Added support for submit_flags tasks in GamesController, allowing players to submit flags for validation and task completion.
- Updated game state management to track submitted flags and validate against required flags for task completion.
- Enhanced ObjectivesManager to handle flag submissions, including syncing progress with the server and managing task states.
- Introduced a new locksmith NPC for lockpicking tutorials, expanding gameplay elements and player engagement.
- Updated scenario schema to include submit_flags task type and associated properties, ensuring proper integration into the game mechanics.
- Improved logging and debugging information for flag submissions and task progress updates, enhancing visibility into game state changes.
2025-12-04 14:00:26 +00:00
Z. Cliffe Schreuders
47eaffa4c3 Scenario development WiP 2025-12-01 08:48:43 +00:00
Z. Cliffe Schreuders
bca619aeac Add Lock Scenario and System Architecture Documentation
- Introduced `LOCK_SCENARIO_GUIDE.md` to provide a comprehensive reference for implementing locks in scenarios, detailing room and object lock configurations, lock types, and quick examples.
- Added `LOCK_SYSTEM_ARCHITECTURE.md` to outline the data flow from scenario definition to server validation, including steps for scenario definition, server bootstrap filtering, client lock checks, and server validation processes.
- Included security notes and references for various lockable object types and items related to the locking system.
2025-11-29 23:46:39 +00:00
Z. Cliffe Schreuders
f412d9ba25 feat: Add comprehensive Objectives and Tasks Guide with examples and best practices 2025-11-26 22:42:19 +00:00
Z. Cliffe Schreuders
c4622f2dee feat(rfid): Enhance hex generation with improved hash-based approach for realistic card data 2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
bd8b9a4f85 docs: Add comprehensive RFID keycard lock system planning documentation
Planning documentation for new RFID keycard lock system feature:

Documentation:
- Complete planning docs in planning_notes/rfid_keycard/
- 7 planning documents (~16,000 words)
- 90+ implementation tasks with estimates
- Technical architecture and code design
- Asset specifications and creation guides

Assets Created:
- 4 keycard sprite variants (CEO, Security, Maintenance, Generic)
- RFID cloner device sprite (Flipper Zero-inspired)
- 2 icon assets (RFID icon, NFC waves)
- Helper scripts for placeholder creation

System Documentation:
- Lock & key system architecture reference
- Lock & key quick start guide

Feature Overview:
- New lock type: "rfid"
- New items: keycard, rfid_cloner
- New minigame: Flipper Zero-style RFID reader/cloner
- Ink tag support: # clone_keycard:name|hex
- Inventory integration: Click cards to clone
- Two modes: Unlock (tap/emulate) and Clone (read/save)

Implementation:
- Estimated time: 91 hours (~11 working days)
- 11 new files, 5 modified files
- Full test plan included
- Ready for immediate implementation

All placeholder assets functional for development.
Documentation provides complete roadmap from planning to deployment.
2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
1a09862dbd Remove cut-scene improvements documentation and refactor visibility management
- Deleted the `CUTSCENE_IMPROVEMENTS.md` file as it contained outdated information.
- Refactored the game canvas visibility management in `game.js` and `minigame-manager.js` to streamline the handling of cut-scene visibility.
- Updated `PersonChatMinigame` to simplify the handling of the `canEscConversation` parameter.
- Adjusted `NPCManager` to pass relevant parameters for minigame initialization without relying on deprecated settings.
2025-11-14 12:19:28 +00:00
Z. Cliffe Schreuders
9044ac7ae4 Implement minigame canvas visibility management and conversation controls
- Added functionality to hide the main game canvas and inventory during minigames based on scenario settings.
- Enhanced the MinigameFramework to track and manage visibility states for the game canvas and inventory.
- Updated PersonChatMinigame to conditionally hide close and cancel buttons based on the new `canEscConversation` parameter.
- Modified NPCManager to pass new parameters for minigame initialization, including visibility and conversation settings.
- Updated scenario configuration to support hiding the game during minigames and disabling escape key functionality.
2025-11-14 10:15:44 +00:00
Z. Cliffe Schreuders
2707027de2 Implement Line-of-Sight (LOS) System for NPCs
- Added core LOS detection module (`js/systems/npc-los.js`) with functions for distance and angle checks, and debug visualization.
- Integrated LOS checks into NPC manager (`js/systems/npc-manager.js`) to enhance lockpicking interruption logic based on player visibility.
- Updated scenario configurations for NPCs to include LOS properties.
- Created comprehensive documentation covering implementation details, configuration options, and testing procedures.
- Enhanced debugging capabilities with console commands and visualization options.
- Established performance metrics and future enhancement plans for server-side validation and obstacle detection.
2025-11-12 11:58:29 +00:00
Z. Cliffe Schreuders
f41b2a41ac feat(npc): Implement multi-room navigation for NPCs with route validation and automatic transitions 2025-11-10 13:20:27 +00:00
Z. Cliffe Schreuders
db681fd8b0 Implement NPC-to-NPC and NPC-to-Player Collision Avoidance
- Added automatic collision avoidance for NPCs when colliding with each other and the player.
- Updated `setupNPCToNPCCollisions()` to include collision callbacks for NPC-to-NPC interactions.
- Created `handleNPCCollision()` to manage NPC-to-NPC collision responses, moving NPCs 5px northeast and recalculating paths.
- Implemented `handleNPCPlayerCollision()` for NPC-to-Player collisions, ensuring consistent behavior with NPC-to-NPC avoidance.
- Modified `updatePatrol()` to check for path recalculation after collisions.
- Enhanced console logging for collision events and path recalculations.
- Created comprehensive documentation covering implementation details, quick reference, and testing procedures.
- Ensured minimal performance impact with efficient pathfinding and collision detection.
2025-11-10 08:29:06 +00:00
Z. Cliffe Schreuders
adc5f3baa4 Add NPC Patrol Features Documentation and Implementation Scripts
- Created comprehensive documentation for two new NPC patrol features: Waypoint Patrol and Cross-Room Navigation.
- Added `QUICK_START_NPC_FEATURES.md` detailing configuration, implementation phases, and testing guidelines.
- Introduced `README_NPC_FEATURES.md` as an index for navigating the documentation package.
- Implemented `update_tileset.py` script to update Tiled map with all objects from the assets directory, ensuring proper GIDs.
- Updated test scenarios for NPC patrol behaviors, including waypoint patrol tests in `test-npc-waypoints.json`.
- Adjusted positions in existing test scenarios for better alignment with new patrol features.
2025-11-10 02:00:27 +00:00
Z. Cliffe Schreuders
2b3642f2d3 Update Ink best practices and NPC dialogue for consistency in player choices and exit handling 2025-11-09 01:09:41 +00:00
Z. Cliffe Schreuders
0b32d076e3 Add documentation for #exit_conversation tag usage and implement tag detection in phone chat minigame 2025-11-09 00:58:11 +00:00
Z. Cliffe Schreuders
5ae0c4c54e Implement NPC Influence System with visual feedback for relationship changes 2025-11-08 20:47:10 +00:00
Z. Cliffe Schreuders
cb95a857fd Implement global variable system for NPC conversations
- Introduced a data-driven global variable system to manage narrative state across NPC interactions.
- Added support for global variables in scenario JSON, allowing for easy extension and management.
- Implemented synchronization of global variables between Ink stories and the game state, ensuring real-time updates across conversations.
- Enhanced state persistence, allowing global variables to survive page reloads and be restored during conversations.
- Created comprehensive documentation and testing guides to facilitate usage and verification of the new system.
2025-11-08 15:44:24 +00:00
Z. Cliffe Schreuders
14e2600e5c Add NPC item giving examples and enhance container UI functionality
- Created a new documentation file detailing usage examples for the NPC item giving system, including immediate and container-based item transfers.
- Updated the ContainerMinigame to support additional NPC context, enhancing the user experience when interacting with NPC inventories.
- Implemented new NPC configurations in the scenario JSON to demonstrate item giving mechanics and container UI features.
- Added an Ink script for the Equipment Officer NPC, showcasing how to present items through the container UI and manage player interactions.
2025-11-08 10:44:34 +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
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
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
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
f1471c7d29 Add Minigame Documentation: Introduce detailed usage guides for the Container and Notes minigames, outlining features, usage scenarios, and integration with existing systems. Include example data structures and testing instructions to enhance developer understanding and facilitate future enhancements. 2025-10-22 11:43:45 +01:00
Z. Cliffe Schreuders
21a3c40026 Remove Deprecated Files: Delete unused asset lists, minigame usage documentation, and room loading summaries to streamline the project. Update CSS for container and password minigames to improve layout consistency. Refactor image source references in minigames to utilize texture keys for better asset management. 2025-10-22 11:43:17 +01:00