Z. Cliffe Schreuders 4101fcb838 Add clear constant objectives reference for Mission 2
Created OBJECTIVES.md as quick-reference guide for Mission 2's constant objectives:

📋 Clear Structure:
- 5 Main Objectives clearly listed with descriptions
- 15 Total Tasks with unlock conditions
- Visual progression flow diagram
- Quick reference table for developers/players

Objectives Summary:
1. Infiltrate Hospital (3 tasks) - Active at start
2. Access IT Systems (3 tasks) - Unlocks after Objective 1
3. Exploit ENTROPY's Backdoor (4 tasks) - Unlocks after server room access
4. Recover Offline Backup Keys (3 tasks) - Unlocks after database flag
5. Make Critical Decisions (2 tasks) - Unlocks after Objectives 3 & 4

🔒 Progressive Unlock System:
Start → Obj 1 → Obj 2 → Obj 3 + Obj 4 → Obj 5 → Complete

 Constant Objectives Guaranteed:
- Defined once in scenario.json.erb (lines 41-183)
- Same 5 objectives, same 15 tasks throughout mission
- No dynamic or changing objectives
- Clear unlock conditions for each objective

Quick Reference Includes:
- Task IDs for development
- Minimum completion requirements (60% vs 100%)
- Key answers (PIN: 1987, passwords, flags)
- Moral choice options

Purpose:
- Player reference during gameplay
- Developer reference for implementation
- QA reference for testing
- Documentation of constant objective set

This ensures Mission 2 has a clear, constant, and well-documented set of objectives.
2026-01-14 09:46:31 +00:00
2025-05-16 10:42:42 +01:00
2025-11-21 15:27:53 +00:00
2025-11-21 15:27:53 +00:00
2025-11-14 19:47:54 +00:00

BreakEscape Rails Engine

Cybersecurity training escape room game as a mountable Rails Engine.

Features

  • 24+ cybersecurity escape room scenarios
  • Server-side progress tracking with 2-table schema
  • Randomized passwords per game instance via ERB
  • JIT Ink script compilation for NPC dialogue
  • Polymorphic player support (User/DemoUser)
  • Pundit authorization
  • RESTful API for game state management
  • Session-based state persistence

Installation

In your Gemfile:

gem 'break_escape', path: 'path/to/break_escape'

Then:

bundle install
rails break_escape:install:migrations
rails db:migrate
rails db:seed  # Optional: creates missions from scenarios

Mounting in Host App

In your config/routes.rb:

mount BreakEscape::Engine => "/break_escape"

Usage

Standalone Mode (Development)

export BREAK_ESCAPE_STANDALONE=true
rails server
# Visit http://localhost:3000/break_escape/

Mounted Mode (Production)

Mount in Hacktivity or another Rails app. The engine will use the host app's current_user via Devise.

Configuration

# config/initializers/break_escape.rb
BreakEscape.configure do |config|
  config.standalone_mode = false  # true for development
  config.demo_user_handle = 'demo_player'
end

Database Schema

  • break_escape_missions - Scenario metadata (name, display_name, published, difficulty)
  • break_escape_games - Player state + scenario snapshot (JSONB)
  • break_escape_demo_users - Standalone mode only (optional)

API Endpoints

  • GET /games/:id/scenario - Scenario JSON (ERB-generated)
  • GET /games/:id/ink?npc=X - NPC script (JIT compiled from .ink)
  • GET /games/:id/bootstrap - Initial game data
  • PUT /games/:id/sync_state - Sync player state
  • POST /games/:id/unlock - Validate unlock attempt
  • POST /games/:id/inventory - Update inventory

Architecture

ERB Scenario Generation

Scenarios are stored as .json.erb templates and rendered on-demand with randomized values:

  • <%= random_password %> - Generates unique password per game
  • <%= random_pin %> - Generates unique 4-digit PIN
  • <%= random_code %> - Generates unique hex code

JIT Ink Compilation

NPC dialogue scripts compile on first request (~300ms):

  1. Check if .json exists and is newer than .ink
  2. If needed, run inklecate to compile
  3. Cache compiled JSON for subsequent requests

State Management

Player state stored in JSONB column:

  • Current room and unlocked rooms
  • Inventory and collected items
  • NPC encounters
  • Global variables (synced with client)
  • Health and minigame state

Testing

rails test

License

AGPL v3 - See LICENSE file for details

Documentation

See HACKTIVITY_INTEGRATION.md for integration guide.

Description
No description provided
Readme 72 MiB
Languages
JavaScript 86.5%
Ink 7%
HTML 2.9%
CSS 2.5%
Ruby 0.9%
Other 0.2%