Commit Graph

804 Commits

Author SHA1 Message Date
Z. Cliffe Schreuders
a5f0b9164d feat: Update NPC and avatar configurations for phone interactions and enhance avatar sizes in chat UI 2026-02-17 10:40:16 +00:00
Z. Cliffe Schreuders
8dfc5f04f4 feat: Add player preferences modal for character configuration and enhance sprite selection functionality 2026-02-17 01:25:44 +00:00
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
dbd532fdce feat: Add NPC state management with server synchronization for KO and health changes 2026-02-17 00:07:16 +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
8c8fded7a1 feat: Remove startHostile flag from NPC behavior configuration in scenario 2026-02-16 17:11:25 +00:00
Z. Cliffe Schreuders
9b4cb8c069 feat: Update NPC behavior configuration to include startHostile flag and enhance game over screen delay 2026-02-16 10:49:02 +00:00
Z. Cliffe Schreuders
5c4e3c690f feat: Enhance NPC hostile behavior configuration with attack damage and pause mechanics 2026-02-16 10:40:46 +00:00
Z. Cliffe Schreuders
c0f530c5a1 feat: Update NPC sprite sheets to reflect security guard characters 2026-02-16 01:36:19 +00:00
Z. Cliffe Schreuders
2377029ed5 feat: Implement door walkability marking in pathfinding for unlocked/opened doors 2026-02-15 23:59:22 +00:00
Z. Cliffe Schreuders
f1ac7ee383 feat: Enhance NPC pathfinding and line of sight checks for improved chase behavior across rooms 2026-02-15 23:14:13 +00:00
Z. Cliffe Schreuders
af8b0e1cb3 feat: Improve player movement logic to calculate direct path to NPCs and objects, ensuring precise stopping distance 2026-02-15 22:49:42 +00:00
Z. Cliffe Schreuders
ead3b05799 feat: Implement wall-aware collision handling for NPCs to prevent pushing through obstacles 2026-02-15 03:18:47 +00:00
Z. Cliffe Schreuders
8fc432164c feat: Enhance item interaction logic to always attempt adding takeable items to inventory and improve notification handling 2026-02-15 00:56:13 +00:00
Z. Cliffe Schreuders
6500354400 feat: Add new inventory items and enhance NPC item drop logic with texture validation and notifications 2026-02-15 00:49:02 +00:00
Z. Cliffe Schreuders
a6458a9ff2 feat: Add sprite padding constants and adjust depth calculations for player and NPC sprites 2026-02-15 00:30:24 +00:00
Z. Cliffe Schreuders
ba13b6aa73 feat: Adjust player movement to stop short of NPCs and objects for improved interaction precision 2026-02-14 01:11:45 +00:00
Z. Cliffe Schreuders
8b97bcdfb1 feat: Add hop effect for player when stepping over items and improve visual overlay management 2026-02-14 00:44:32 +00:00
Z. Cliffe Schreuders
40551a2eae feat: Improve NPC and player combat interactions with enhanced state management and safety checks 2026-02-13 23:34:37 +00:00
Z. Cliffe Schreuders
a28e79bd6d feat: Enhance combat mechanics with knockback and animation improvements
- Added knockback functionality for both player and NPCs, allowing for dynamic interactions during combat.
- Implemented new animations for player and NPC hit reactions, including 'taking-punch' and 'death' animations.
- Updated player and NPC behavior to prevent animation interruptions during attacks and knockouts.
- Improved player health system to trigger death animations and disable movement upon KO.
- Refactored NPC combat to manage attack states and ensure animations play correctly.
- Introduced utility functions for applying knockback effects and checking knockback states.
2026-02-13 23:26:09 +00:00
Z. Cliffe Schreuders
e749d705c6 feat: Simplify NPC hostility conversion by removing manual behavior updates 2026-02-13 16:53:27 +00:00
Z. Cliffe Schreuders
1b7c112fbe feat: Enhance inventory management by preventing duplicate items and adding error handling 2026-02-13 16:44:31 +00:00
Z. Cliffe Schreuders
b27e603668 feat: Add punch interaction mode for player combat and prevent default context menu on right-click 2026-02-13 16:44:27 +00:00
Z. Cliffe Schreuders
7cdcc354c1 feat: Implement three-mode interaction system in HUD
- Added hand frames PNG for interaction modes.
- Updated HUD CSS to support new player HUD buttons and styles.
- Enhanced combat configuration to define interaction modes: interact, jab, and cross.
- Integrated player HUD creation and management in the game core.
- Improved player combat system to handle interaction modes and associated animations.
- Modified interaction handling to auto-switch modes for chairs and hostile NPCs.
- Updated health UI to always display health status.
- Created a new HUD JavaScript module to manage avatar and interaction mode toggle.
- Added a test HTML file for the three-mode toggle functionality.
2026-02-13 16:04:02 +00:00
Z. Cliffe Schreuders
a84d309809 Enhance player combat animations and effects with punch mechanics 2026-02-13 09:53:58 +00:00
Z. Cliffe Schreuders
61afc0a666 Refactor character assets and player preferences
- Deleted unused character images: woman_in_science_lab_coat.png and woman_with_black_long_hair_bow_in_hair_long_sleeve_(1).png.
- Added new padlock icon asset for UI.
- Introduced player_preferences.css for styling the player preferences configuration screen.
- Updated game.js to load new character atlases with simplified filenames.
- Enhanced player.js to create custom idle animations for characters.
- Implemented sprite-grid.js for sprite selection UI, including a preview feature.
- Updated database schema to include break_escape_player_preferences table for storing player settings.
- Modified convert_pixellab_to_spritesheet.py to map character names to simplified filenames and extract headshots from character images.
2026-02-12 14:35:14 +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
d1e38bad29 Refactor inventory handling to prevent duplicates and clean up game state
- Updated the games_controller to remove starting items from the inventory response, ensuring no duplicates are sent to the client.
- Enhanced the inventory processing logic in JavaScript to check for existing items by ID, type, or name before adding new items, preventing duplicate entries in the player's inventory.

Files modified:
- games_controller.rb: Adjusted inventory response handling.
- inventory.js: Added duplicate item check during inventory processing.
2026-02-10 16:17:36 +00:00
Z. Cliffe Schreuders
6847fca429 Add keyboard controls for choice selection in PersonChatMinigame
- Implemented keyboard event handling to allow players to use the spacebar to continue and number keys (1-9) to select choices in the minigame.
- Updated UI to display choice buttons with number prefixes for easier selection.

Files modified:
- person-chat-minigame.js: Added keyboard event listener for choice selection.
- person-chat-ui.js: Updated choice button creation to include number prefixes.
2026-02-10 16:07:28 +00:00
Z. Cliffe Schreuders
95c18a76a3 Enhance Operation Shatter narrative and reporting mechanics
- Added a new task to report the discovery of Operation Shatter to SAFETYNET, including dialogue for Agent 0x99.
- Introduced new variables to track player interactions regarding the operation and its implications.
- Updated scenario files to reflect the urgency and details of the operation, emphasizing the calculated casualties and the psychological warfare aspect.
- Shortened the opening briefing to streamline the introduction of the mission and its stakes.

Files modified:
- scenario.json.erb: Added new task for reporting Operation Shatter.
- m01_closing_debrief.json: Updated dialogue to reflect new mission details.
- m01_derek_confrontation.json: Adjusted confrontation dialogue to align with new narrative elements.
- m01_npc_maya.ink: Enhanced Maya's dialogue regarding Operation Shatter.
- m01_opening_briefing.ink: Streamlined introduction and urgency explanation.
- m01_phone_agent0x99.ink: Added reporting mechanics for Operation Shatter discovery.
2026-02-10 14:23:50 +00:00
Z. Cliffe Schreuders
b620430895 Add locked field to Professor's briefcase in scenario.json.erb 2026-02-10 14:12:48 +00:00
Z. Cliffe Schreuders
321a500f24 Enhance object unlocking logic, add locked field to containers, and validate scenario schema 2026-02-10 14:12:39 +00:00
Z. Cliffe Schreuders
6ad3cda6ae Remove old scenario selection HTML and testing guide files 2026-02-10 12:02:22 +00:00
Z. Cliffe Schreuders
dbede74035 Move some planning files 2026-02-10 11:56:13 +00:00
Z. Cliffe Schreuders
0f6abd2a7a Moved CODEBASE_EXPLORATION.md and updated LICENSE file 2026-02-10 11:33:05 +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
b7223af010 Refactor MissionsController and enhance mission display
- Refactored the MissionsController to use local variable `missions` instead of instance variable `@missions` for better clarity and performance.
- Introduced grouping of missions by collection for display, improving the organization of mission listings.
- Updated the view to iterate over `@missions_by_collection`, enhancing the presentation of missions by their respective collections.
- Added new CSS styles for collection headings to improve UI aesthetics.

Additionally, removed invalid missions from the database and updated mission collections for better categorization.

Files modified:
- missions_controller.rb: Refactored mission retrieval logic.
- index.html.erb: Updated mission display logic and added new styles.
- migration file: Added cleanup for invalid missions.
- Various mission JSON files: Updated collections for consistency.
2026-01-14 13:24:46 +00:00
Z. Cliffe Schreuders
1a8da6df23 Add interactive tutorial system for new players
Implements a comprehensive tutorial system that:
- Prompts first-time players with option to take tutorial
- Detects device type (mobile vs keyboard) for appropriate instructions
- Shows interactive steps with objectives for basic controls:
  * Keyboard: WASD movement, Shift to run, E to interact
  * Mobile: Click/tap to move and interact
- Tracks player actions to progress through tutorial steps
- Saves completion status in localStorage
- Includes polished UI with animations and responsive design

Files added:
- tutorial-manager.js: Core tutorial logic and state management
- tutorial.css: Styled UI components with animations

Files modified:
- game.js: Integrated tutorial check on first load
- player.js: Added tutorial notifications for movement/running
- interactions.js: Added tutorial notification for interactions
- main.js: Imported tutorial manager system
- index.html: Added tutorial CSS stylesheet
2026-01-14 10:10:12 +00:00
Z. Cliffe Schreuders
6a21147a45 Add security audit dialogue to Mission 1: First Contact
Adds a new dialogue option for Kevin where the player can provide a
preliminary security audit update. The feature includes:

- 5 MCQ-style security assessment questions covering:
  * Physical security (locks and access control)
  * Access control patterns (Derek's suspicious activities)
  * Password security (predictable patterns)
  * Personnel security (Patricia's firing)
  * Data protection (network segmentation)

- Answer tracking system (correct/wrong counts)
- Kevin provides context-appropriate responses to each answer
- Influence point adjustments based on answers
- Available after player makes progress (gets items from Kevin)

- Debrief feedback section that evaluates player's security analysis:
  * Excellent performance: 4+ correct answers
  * Solid performance: 3 correct answers
  * Poor performance: ≤2 correct answers
  * Feedback on tradecraft and cover maintenance

This enhances the undercover security consultant role-play and provides
educational value on security assessment best practices.
2026-01-14 10:06:32 +00:00
Z. Cliffe Schreuders
3fd1cdc22c Remove moralizing tone from fight choice in Derek confrontation
- Change debrief to be tactical/professional rather than judgmental
- Add emphasis on field immunity for SAFETYNET operatives
- Frame fight as valid tactical choice, not a mistake
- Keep practical implications without moral judgment
- Update mission summary: "Hostile engagement neutralized" instead of "Excessive force allegations"
- Agent 0x99 now validates player agency rather than shaming the choice
2026-01-14 10:05:13 +00:00
Z. Cliffe Schreuders
d299b8e824 Add objective and event emission for hostile Derek defeat
- Add objective "defeat_derek_hostile" when Derek becomes hostile
- Emit event "hostile_npc_defeated:derek" when Derek is subdued
- Complete objective when Derek is defeated in fight outcome
2026-01-14 10:05:13 +00:00
Z. Cliffe Schreuders
80662cfbea Add fight option to Derek confrontation in Mission 1
- Add "fight" choice alongside arrest/recruit/expose options
- Derek becomes hostile when player chooses to fight (#hostile tag)
- Closing debrief includes moral consequences of fighting vs arresting
- Agent 0x99 discusses excessive force and SAFETYNET protocol
- Mission summary reflects fight outcome with allegations
2026-01-14 10:05:13 +00:00
Z. Cliffe Schreuders
53881d5767 Fix door and room loading issues with multiple paths
Fixes two critical issues when multiple doors lead to the same room:

1. Room reloading: Added checks in loadRoom() and createRoom() to prevent
   reloading/recreating rooms that are already loaded. This prevents the
   room from being unnecessarily recreated when opening a second door to
   the same room.

2. Door location detection: Updated removeMatchingDoorSprite() to use
   position and direction when finding the matching door. Previously it
   only checked connectedRoom, which caused it to remove the wrong door
   when multiple doors connected the same two rooms at different locations.
   Now it checks:
   - Opposite direction matches
   - Position matches within tolerance (X for N/S doors, Y for E/W doors)

This ensures that opening different doors to the same room works correctly
without causing room reloads or removing the wrong door sprites.
2026-01-14 10:02:08 +00:00
Z. Cliffe Schreuders
91fcb05666 Add Mission 8 development status tracking
Created comprehensive development status document:
- Progress tracking: ~40% complete (design phase done)
- Completed: README, mission.json, scenario.json.erb, evidence system
- Pending: 8 Ink dialogue files, validation fix, solution guide
- Detailed notes on Nightshade confrontation (critical scene)
- Red herring design for Cipher and Phantom
- Evidence trail flow documented

Status: Core design complete, ready for Ink dialogue development
2026-01-14 09:46:34 +00:00
Z. Cliffe Schreuders
e68a4db58a Add Mission 8 scenario.json.erb with complete SAFETYNET HQ layout
Created comprehensive scenario file for Mission 8:
- 9 detailed rooms: Lobby, Director's Office, Operations Floor, Intel Analysis,
  Server Room, Security Archives, Cryptography Lab, Interrogation Room, Break Room
- All key NPCs: Director Cross, Agent 0x99, suspects (Cipher, Phantom, Nightshade)
- Evidence trail: Server logs, encrypted comms, psychological profiles
- VM integration: GitList exploitation terminal with flag submission
- Locks: RFID (server room), password (archives), key (interrogation)
- 30+ items and readables with investigation clues
- Global variables tracking investigation progress
- Campaign connections to Mission 7 outcomes

Note: Minor validation issue to debug - structure is complete
2026-01-14 09:46:34 +00:00
Z. Cliffe Schreuders
b11e7e0d4e Initialize Mission 8: The Mole - Internal investigation scenario
Created initial design documents for Mission 8:
- README.md: Complete mission design with 9-room SAFETYNET HQ layout
- mission.json: Metadata, CyBOK mappings, campaign connections

Mission 8 Key Features:
- Internal investigation at SAFETYNET headquarters
- Identify mole (Agent 0x47 'Nightshade') among 3 suspects
- GitList exploitation VM challenge (SecGen 'Such a git')
- Moral choice: Arrest vs. Turn Triple Agent
- Reveals The Architect stole global threat database
- Sets up Mission 9 (Tomb Gamma coordinates revealed)

Status: Initial design phase - scenario.json.erb and Ink files next
2026-01-14 09:46:34 +00:00
Z. Cliffe Schreuders
fc4c52e611 Add comprehensive solution guide and update development status
Added complete Mission 7 solution guide:
- Detailed map diagram of SAFETYNET facility
- Step-by-step walkthrough for all 4 crisis paths
- VM challenge solutions (all 4 flags)
- Deterministic outcomes matrix
- Recruitment strategies for all antagonists
- Intelligence collection guide
- Speedrun route and optimization tips
- FAQ and achievement checklist

Updated DEVELOPMENT_STATUS.md:
- Status: 100% COMPLETE - FULLY PLAYABLE
- All Ink compilation issues resolved
- Schema validation: 0 errors
- Final statistics: 297KB dialogue, ~20,000 words
- Production-ready status confirmed
2026-01-14 09:46:34 +00:00
Z. Cliffe Schreuders
eb7f058cec Add Mission 7 completion summary and final status 2026-01-14 09:46:34 +00:00
Z. Cliffe Schreuders
40471e560a Complete all Mission 7 Ink dialogue compilation
Fixed and compiled all 9 Ink dialogue files for Mission 7:
- m07_opening_briefing.json (45KB)
- m07_director_morgan.json (25KB)
- m07_architect_comms.json (20KB)
- m07_phone_agent_0x99.json (30KB)
- m07_closing_debrief.json (29KB)
- m07_crisis_infrastructure.json (39KB)
- m07_crisis_data.json (46KB)
- m07_crisis_supply_chain.json (29KB)
- m07_crisis_corporate.json (34KB)

Key fixes applied:
- Fixed missing knot references (typos and renamed knots)
- Resolved nested conditional blocks using if-else chains
- Moved choices inside conditional blocks to avoid flow errors
- Used conditional choice syntax (* {condition}) where appropriate
- Consolidated multi-line bullet points to avoid Ink syntax conflicts
- Added explicit diverts where needed

Total compiled dialogue: 297KB (~20,000+ words)
Mission 7 is now 100% complete and fully playable.
2026-01-14 09:46:34 +00:00
Z. Cliffe Schreuders
5d0a2ba789 Add session summary for Mission 7 development progress 2026-01-14 09:46:34 +00:00