8 Commits

Author SHA1 Message Date
Z. Cliffe Schreuders
0f6abd2a7a Moved CODEBASE_EXPLORATION.md and updated LICENSE file 2026-02-10 11:33:05 +00:00
Z. Cliffe Schreuders
b1356c1157 docs: Add simplified Rails Engine migration approach
RECOMMENDED APPROACH: 12-14 weeks instead of 22 weeks

KEY SIMPLIFICATIONS:
- Use JSON storage for game state (already in that format)
- 3 database tables instead of 10+
  - game_instances (with player_state JSONB)
  - scenarios (with scenario_data JSONB)
  - npc_scripts (Ink JSON)

- 6 API endpoints instead of 15+
  - Bootstrap game
  - Load room (when unlocked)
  - Attempt unlock
  - Update inventory
  - Load NPC script (on encounter)
  - Sync state (periodic)

VALIDATION STRATEGY:
- Validate unlock attempts (server has solutions)
- Validate room/object access (check unlocked state)
- Validate inventory changes (check item in unlocked location)
- NPCs: Load Ink scripts on encounter, run conversations 100% client-side
- NPC door unlocks: Simple check (encountered NPC + scenario permission)

WHAT WE DON'T TRACK:
- Every event (client-side only)
- Every conversation turn (no sync needed)
- Every minigame action (only result matters)
- Complex NPC permissions (simple rule: encountered = trusted)

BENEFITS:
- Faster development (12-14 weeks vs 22 weeks)
- Easier maintenance (JSON matches existing format)
- Better performance (fewer queries, JSONB indexing)
- More flexible (easy to modify game state structure)
- Simpler logic (clear validation rules)

Updated README_UPDATED.md to recommend simplified approach first.
Complex approach documentation retained for reference.
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
1e775ef89c docs: Update Rails Engine migration plans for current codebase
Updated migration plans to reflect significant codebase evolution:

NEW SYSTEMS DOCUMENTED:
- NPC system (fully implemented with NPCManager, conversation state, events)
- Event system (80+ events across codebase)
- Global game state management (window.gameState.globalVariables)
- Multiple scenarios (24 total, up from 1 originally planned)

KEY UPDATES:
- UPDATED_MIGRATION_STATUS.md: Comprehensive status of what's changed
  - What's implemented vs what still needs server-side integration
  - Updated timeline: 22 weeks (was 18 weeks)
  - New database schema requirements
  - Updated risk assessment

- CLIENT_SERVER_SEPARATION_PLAN.md: Added 3 new systems
  - System 5: NPC System (hybrid approach confirmed)
  - System 6: Event System (selective logging)
  - System 7: Global Game State (server as source of truth)
  - Updated migration checklist: 9 phases (was 7)
  - Updated timeline: 18-22 weeks

- README_UPDATED.md: New master index document
  - Quick start guide
  - Document index
  - What's changed summary
  - Timeline breakdown
  - Architecture decisions
  - Success metrics

MIGRATION APPROACH:
- Hybrid NPC approach: Scripts client-side, validation server-side
- Selective event logging: Critical events only
- State sync: Server as source of truth, client cache for performance
- Incremental rollout with dual-mode support

TIMELINE: 22 weeks (~5.5 months)
- Added 4 weeks for NPC, Event, State integration
- Original: 18 weeks → Updated: 22 weeks (+22%)

All plans are complete, self-contained, actionable, and feature-focused.
Ready for team review and implementation.
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
72e2e6293f feat: Implement NPC security guard interaction for lockpicking detection
- Added a new security guard NPC with conversation flow for lockpicking attempts.
- Integrated influence system to determine NPC reactions based on player choices.
- Created a new JSON scenario for the security guard's behavior and interactions.
- Refactored lockpicking system to allow NPC interruptions during attempts.
- Developed a test scenario to visualize NPC patrol and line-of-sight detection.
- Added a debug panel for testing line-of-sight visualization in the game.
2025-11-11 01:07:05 +00:00
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
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
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
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