Spotlight Panic is a browser-based local co-op party maze game with a dark retro arcade horror style.
The runner explores a maze while the only spotlight is controlled through the webcam by moving a bright object, such as a phone with a white screen or white paper. It can be played solo, but it is designed to be more chaotic as a party game where someone else takes over the light.
- 960x540 HTML Canvas maze gameplay
- Webcam-controlled spotlight tracking for the light operator
- Mouse spotlight fallback for development and camera failures
- Three hand-designed levels
- Chaser, patrol, and stalker enemy types
- Collectible keys and fake key traps
- Floor 67 ritual: activate
6then7with the spotlight - Local player leaderboard using
localStorage - Seeded runs and replayable seed support
- Neon pixel arcade UI
- Background music and Web Audio sound effects
- Vite
- Vanilla TypeScript
- HTML Canvas
- CSS
- Web Audio API
- Webcam access through
navigator.mediaDevices.getUserMedia
No React, backend, Supabase, ML, or external game engine.
Install dependencies:
npm installStart the development server:
npm run devBuild for production:
npm run buildPreview the production build:
npm run preview- Enter a player name.
- Start a run.
- Move the runner with
WASDor arrow keys. - Control the spotlight by holding a bright phone screen or white object in front of the webcam.
- Collect 3 real keys.
- Avoid ghosts and fake keys.
- Complete the Floor 67 ritual by shining the spotlight on
6, then7. - Escape through the unlocked door.
For party play, one person can control movement while another controls the spotlight. For solo play, the same person can handle both.
Visible gameplay is designed around camera spotlight control.
Keyboard controls:
WASDor arrow keys: move playerP: pause
Hidden developer shortcuts:
M: mouse spotlight fallbackC: camera spotlightL: toggle darkness
- Chaser Ghost: moves directly toward the player and rushes when lit.
- Patrol Ghost: follows fixed waypoint routes and blocks corridors.
- Stalker Ghost: moves in darkness and slows in the light.
The score rewards fast, clean runs:
- Time reduces score continuously.
- Ghost hits reduce score.
- Fake keys reduce score.
- Clearing levels adds score.
- Completing Floor 67 adds a bonus.
- Clean runs can earn no-hit and no-fake-key bonuses.
Leaderboard entries are saved locally in the browser.
src/
audio.ts Sound effects and background music
constants.ts Shared game constants
leaderboard.ts Score, rank, and localStorage leaderboard logic
levels.ts Hand-designed level data and spawn pools
main.ts Canvas game loop, UI, input, webcam tracking
random.ts Seeded random helpers
style.css Neon arcade UI styling
types.ts Shared TypeScript types
Webcam access requires a browser that supports getUserMedia. If camera permission is denied or unavailable, the game can still be played with the hidden mouse fallback.