CHRONO-DETECTIVE: THE MOBILE TIMELINE SHOWDOWN
PROJECT DOCUMENTATION
================================================================================
INSPIRATION
================================================================================
The concept of Chrono-Detective was born from a fascination with classic detective mysteries and the innovative potential of Generative AI in immersive gaming. We wanted to create an experience that combines:
- Classic Whodunit Mystery: Inspired by Agatha Christie's murder mysteries and games like Clue and LA Noire
- Interactive Storytelling: Where players actively participate in uncovering the truth through exploration and interrogation
- Cutting-Edge Technology: Leveraging Meta Horizon's GenAI NPC capabilities to create believable, conversational characters
- Mobile-First Design: Built specifically for the Meta Quest platform with mobile performance in mind
The central question driving our development was: "Can we create a believable murder mystery where AI-powered NPCs can lie, deceive, and maintain their alibis while players hunt for the truth?"
================================================================================
WHAT IT DOES
================================================================================
Chrono-Detective is an immersive murder mystery game where players step into the role of a detective investigating the murder of a wealthy woman in her mansion. The victim was stabbed in the bedroom, and a valuable diamond was stolen from the locker. The player must interrogate suspects, collect physical evidence, and use photography to document the crime scene—all while uncovering which of the four suspects is the killer.
IMMERSIVE CRIME SCENE INVESTIGATION
Players explore five meticulously crafted rooms:
- Detective Office: The hub where players start and solve the case
- Living Room: Scene of suspicious activity with broken furniture
- Garden: Outdoor area where the gardener witnessed key events
- Bedroom: The primary crime scene with the victim's body
- Husband's Office: Where the husband claims he was sleeping during the murder
CLUE COLLECTION SYSTEM
Players must discover and document seven critical pieces of evidence:
- Broken Photo Frame - Signs of struggle
- Bloody Cloth - DNA evidence
- Broken Glass Table - Indicating violence
- Broken Pot - From the garden altercation
- Letter - Revealing hidden motives
- Knife with Blood - The murder weapon (planted in husband's hand)
- Dead Body - Must be photographed using the in-game camera
The game uses Meta Horizon's Camera API to allow players to photograph evidence, creating an authentic forensic investigation experience.
NPC INTERROGATION WITH GENAI
Four unique suspects inhabit the mansion, each with their own story:
SOFIA (HOUSE MAID) - THE KILLER
- Claims: "I was tidying the Living Room and Kitchen. I never left the main floor."
- Reality: She murdered the victim, stole the diamond, and framed the husband
- Behavior: Confident, lying, maintains her alibi perfectly
JACK (HUSBAND)
- Claims: "I fell asleep at my desk working late. I didn't hear anything."
- Reality: He was genuinely asleep and is being framed
- Behavior: Confused, defensive, worried about false accusations
JUSTIN (GARDENER)
- Claims: "I was tending roses near the fence. I heard glass breaking from the living room."
- Reality: He's telling the truth and is a key witness
- Behavior: Nervous but honest, provides crucial testimony
COOK (KITCHEN STAFF)
- Claims: "I was preparing meals in the kitchen all evening."
- Reality: Working in kitchen, away from the crime scene
- Behavior: Professional, cooperative, limited knowledge
Each NPC features:
- Proximity-Based Dialogue: NPCs automatically greet players when they enter trigger zones
- GenAI-Powered Conversations: Players can ask custom questions and receive contextual responses
- Maintained Alibis: The killer (Sofia) consistently lies while maintaining her innocent act
- Attention System: NPCs face and track players during conversations
CASE RESOLUTION: THE BOARD
Once all evidence is collected and the body is photographed, players return to the Detective Office where a case board awaits. The board presents:
- 10 Multiple Choice Questions testing the player's deductive reasoning
- Evidence-Based Queries: Questions about motives, alibis, timeline, and physical evidence
- Perfect Score Requirement: Players must answer all 10 questions correctly to solve the case
- Feedback System: Wrong answers trigger "Sorry, try again" message with retry opportunity
Win Condition: 10/10 correct answers = Case Solved!
================================================================================
HOW WE BUILT IT
================================================================================
ENVIRONMENT SETUP
We created a multi-room mansion using Meta Horizon World's building tools:
- Custom Room Design: Five interconnected rooms with distinct aesthetics
- Interactive Props: Clue objects placed strategically throughout the environment
- Navigation System: Button-based teleportation between rooms using Room_Spawn_Teleporter.ts
- Trigger Zones: Proximity-based areas around each NPC for automatic conversation initiation
GENAI NPC SCRIPTING
The heart of our game lies in the AI-powered NPCs. Technical implementation:
Key Technical Features:
- Npc vs NpcPlayer Separation: Npc entity handles conversation, NpcPlayer manages attention/behavior
- Conversation API: Used npcEntity.conversation.speak() for dialogue delivery
- Attention Target System: addAttentionTarget() makes NPCs face and track players naturally
- Event-Driven Architecture: CodeBlockEvents for OnPlayerEnterTrigger/ OnPlayerExitTrigger
- Error Handling: Comprehensive validation for missing entities and disabled conversation AI
CUSTOM UI AND INTERACTIVITY
Camera System (CameraFlashEffect.ts):
- Grabbable camera object with flash mechanic
- Light gizmo activation on trigger press
- Shot counter and ammo display system
- Audio feedback for camera shots
Item Collection (ItemManager.ts):
- Dynamic spawning system for collectibles
- Battery pickup mechanics for camera recharging
- Particle effects and visual feedback
Navigation (Room_Spawn_Teleporter.ts):
- Button-based teleportation system
- Uses this.world.findEntity() to locate spawn points
- Instant transport between rooms for mobile optimization
CASE BOARD & QUESTION SYSTEM
Built using Meta Horizon's UI components:
- Conditional Activation: Board only unlocks after all clues collected + body photographed
- MCQ Interface: 10 questions with multiple choice options
- Score Validation: Logic to check for perfect 10/10 score
- Retry Mechanism: Failed attempts allow players to try again
================================================================================
CHALLENGES WE RAN INTO
================================================================================
1. MOBILE PERFORMANCE CONSTRAINTS
CHALLENGE: Meta Quest has limited processing power compared to PC VR. Initial builds with high-poly models and complex lighting caused frame rate drops.
SOLUTION:
- Optimized 3D assets with lower polygon counts
- Used baked lighting instead of real-time shadows where possible
- Implemented teleportation instead of smooth locomotion to reduce motion sickness
- Limited particle effects and visual complexity in each scene
- Strategic use of occlusion culling in room designs
2. NARRATIVE RELIABILITY VS. LLM FREEDOM
CHALLENGE: While GenAI NPCs provide engaging conversations, they sometimes deviated from their scripted alibis or revealed information too early, breaking the mystery.
SOLUTION:
- Hybrid Approach: Scripted initial messages for critical alibi information
- Proximity-Based Auto-Speak: NPCs deliver their main statement automatically when players enter trigger zones
- Conversation AI for Follow-up: Players can ask custom questions after the scripted intro
- One-Time Delivery: Used hasSpoken Map to ensure each player hears the message only once
- Session Management: Tracked player interactions per session to maintain consistency
3. TYPESCRIPT API INTEGRATION
CHALLENGE: Horizon Worlds uses specific API patterns that differed from standard TypeScript:
- Confusion between Npc and NpcPlayer classes
- ReadableHorizonProperty requiring .get() and .set() methods
- Module import paths (horizon/core, horizon/npc) not well-documented
SOLUTION:
- Studied .d.ts type definition files extensively
- Created reusable patterns across all NPC scripts
- Implemented proper error checking with isConversationEnabled()
- Used as() casting for entity type conversion
4. CAMERA API INTEGRATION
CHALLENGE: Integrating Meta's Camera API for evidence photography while maintaining game state.
SOLUTION:
- Created custom CameraFlashEffect component with shot counter
- Linked camera usage to clue validation system
- Used network events to broadcast camera flash across clients
- Implemented visual and audio feedback for successful photos
================================================================================
ACCOMPLISHMENTS THAT WE'RE PROUD OF
================================================================================
EFFECTIVE GENAI INTEGRATION
We successfully created a murder mystery where:
- AI NPCs maintain complex alibis throughout multiple player interactions
- The killer (Sofia) lies convincingly while other NPCs tell the truth
- Natural conversation flow emerges from hybrid scripted + GenAI approach
- Players can't easily "break" NPCs with unexpected questions due to carefully crafted conversation contexts
This represents one of the first fully playable VR detective games powered by Generative AI on the Meta Quest platform.
SEAMLESS MOBILE VR EXPERIENCE
Despite Quest's hardware limitations, we achieved:
- Stable 72fps performance across all five rooms
- Intuitive VR interactions with grabbable objects and camera
- Zero motion sickness reports from playtesters (thanks to teleportation)
- Rich narrative experience without compromising performance
COMPLETE GAME LOOP
We built a fully functional end-to-end detective game:
- Immersive crime scene with multiple rooms
- Interactive NPC interrogations with AI
- Physical clue collection system
- Camera-based evidence documentation
- Logic puzzle resolution with MCQ board
- Win/lose conditions with feedback
Many Mobile game prototypes remain incomplete—we're proud to have shipped a polished, playable experience from start to finish.
================================================================================
WHAT WE LEARNED
================================================================================
TECHNICAL LEARNINGS
- Meta Horizon Worlds Scripting: Deep dive into TypeScript-based world building, component architecture, and event systems
- GenAI NPC Development: Understanding the balance between AI freedom and narrative control
- VR UX Design: How spatial interaction differs from traditional gaming (proximity triggers > click buttons)
- Performance Optimization: Mobile VR requires aggressive optimization at every level
GAME DESIGN LEARNINGS
- Player Agency vs. Narrative Structure: Too much freedom confuses players; we need clear objectives and progression gates
- Environmental Storytelling: Physical clues placed in logical locations tell a story without explicit exposition
- Pacing: The 10/10 perfect score requirement creates tension and encourages thorough investigation
TEAM COLLABORATION
- Documentation Importance: Creating setup guides (SOFIA_NPC_SETUP_GUIDE.md, etc.) was crucial for team members to configure entities correctly
- Iterative Playtesting: Early feedback revealed that players needed more guidance on where to find clues
- Version Control for VR Assets: Managing Horizon World states required careful coordination
================================================================================
WHAT'S NEXT FOR CHRONO-DETECTIVE
================================================================================
EXPANDING THE STORY
- Multiple Cases: Add 3-5 additional murder mysteries with different suspects, motives, and locations
- Dynamic Killer Selection: Randomize which NPC is the killer each playthrough for replay value
- Branching Narratives: Player choices during interrogations affect which endings are available
- Backstory Layers: Deeper character development with hidden relationships and motives
CLUE VALIDATION SYSTEM
Currently, the board unlocks based on: if (allCluesCollected && bodyPhotographed) { enableBoard(); }
Future Enhancement:
- Photo Quality Checks: Validate that evidence photos actually capture the clue clearly
- OCR Integration: Read text from photographed letters/documents
- Clue Notebook: Visual inventory showing collected evidence with photos
- Timeline Reconstruction: Players arrange events in chronological order
ADVANCED GENAI FEATURES
- Dynamic Alibi Generation: NPCs generate unique alibis each playthrough using LLM
- Relationship System: NPCs reference each other's testimonies dynamically
- Emotional States: NPC behavior changes if confronted with contradictory evidence
- Voice Synthesis: Integrate Meta's text-to-speech for more natural NPC dialogue
MULTIPLAYER EXPANSION
- Co-op Mode: 2-4 detectives work together to solve cases faster
- Competitive Mode: Race against other detectives to solve first
- Asymmetric Gameplay: One player is the killer trying to deceive AI detectives
ACCESSIBILITY & LOCALIZATION
- Subtitles: Full text support for NPC dialogue
- Colorblind Modes: Alternative visual markers for clues
- Multiple Languages: Translate story content and UI to Spanish, French, Japanese
- Difficulty Settings: Adjustable clue requirements and question count
================================================================================
CONCLUSION
================================================================================
Chrono-Detective: The Mobile Timeline Showdown demonstrates the exciting potential of Generative AI in immersive storytelling. By combining classic detective game mechanics with cutting-edge NPC technology, we've created an experience that feels fresh yet familiar—a VR murder mystery where you truly interrogate intelligent suspects who can lie, deceive, and maintain complex alibis.
Our journey from concept to playable game taught us that the future of VR gaming isn't just about graphics or performance—it's about creating believable worlds populated by intelligent characters that react and adapt to player actions in meaningful ways.
As VR hardware improves and AI becomes more sophisticated, we envision detective games where:
- Every playthrough is unique
- NPCs remember your previous cases
- Clues emerge from natural conversation rather than scripted triggers
- The line between playing a game and living a story disappears
Chrono-Detective is just the beginning. The detective is ready—will you solve the case?
================================================================================
TECHNICAL STACK
================================================================================
Platform: Meta Quest (Horizon Worlds) Language: TypeScript
APIs Used:
- horizon/core - World management, components, events
- horizon/npc - GenAI NPCs and conversation
- horizon/camera - Photography mechanics
- horizon/ui - User interface components
Key Components:
- NPC Proximity Speakers (Sofia, Jack, Justin)
- Room Spawn Teleporter
- Camera Flash Effect
- Item Manager
- Case Board Logic
Built With
- ambient
- custom-ui-api
- genai
- generation
- horizon/camera
- horizon/core
- horizon/gizmo
- horizon/npc
- horizon/ui
- meta-horizon-worlds-desktop-editor
- meta-quest-sdk
- npcs-api
- trigger-volume-api
- typescript

Log in or sign up for Devpost to join the conversation.