Skip to content

Latest commit

 

History

History
101 lines (82 loc) · 3.29 KB

File metadata and controls

101 lines (82 loc) · 3.29 KB

Room of Secrets

Room of Secrets is an interactive virtual escape game where participants must solve puzzles across multiple levels to progress and win. The game features six challenging levels and offers a 4–5 hour-long immersive experience for teams or individuals.

Built Using

  • React.js
  • Material UI for styled components
  • AI-generated assets for enhanced horror visuals

Scary Effects

The website incorporates a dark and suspenseful theme using visual effects such as flickering elements, eerie typography, and unpredictable animations. Every design element — from fonts to sound — is crafted to maintain a haunting user experience.

About the Game

  • Utilizes Local Storage to preserve player health status.
  • Employs React Context for global state management of health.
  • Implements a custom useTimeout hook to reveal hints for 60 seconds.
  • Includes URL protection to prevent players from manually skipping levels.

Scoring System

Action Health Impact
Initial Health 500
Incorrect Answer -50
Hint Taken (60 seconds) -100
Give Up (Warning Page) -500 (Game Over)
Objective: Escape all rooms with remaining health greater than zero.

Full Screen Mode

The game provides an option to toggle between full-screen and windowed view dynamically.

document.addEventListener('fullscreenchange',
  setIsFullScreen(document.fullscreenElement !== null));

React re-renders components based on this state, ensuring accurate button labeling and consistent behavior.

Sound Effects

Players can toggle background music during gameplay. The button dynamically updates its label based on the audio’s state.

<audio ref="audioRef" loop>
  <source src="sound_effect" />
</audio>

Typewriter Effect

The game uses a typing animation to gradually render text on the screen, creating a suspenseful storytelling effect.

Authentication Check

  • Each route runs an useEffect authentication check on load.
  • Unauthenticated users are automatically redirected to the homepage.
  • Valid users with auth: true in their state can access subsequent levels.
This mechanism ensures only authenticated players can progress, maintaining game integrity and sequence.

Mission

Survive the mansion by solving cryptic puzzles and maintaining your health. Every action counts in the Room of Secrets.