I'll create a 3D horror game with an immersive storyline. Let me start by exploring the project structure.
I'll build a full 3D first-person horror game with Three.js. Let me install dependencies and start creating the core modules.
Now the procedural audio engine and maze generation:
Now procedural textures generated on canvas (no external assets):
Now the core 3D engine — the biggest piece:
Let me fix the unused variable warnings:
Now let me build the UI layer. First, check the CSS setup:
Now the HUD overlay component:
Now the narrative screens (menu, intros, journal, death, endings):
Now the main App that orchestrates the game state machine:
Let me fix the death sequence pointer-lock interaction and add ESC-to-resume:
Now let me update the page title and build:
The build succeeds. Now let me polish gameplay balance and fix a few runtime details:
Let me brighten the torch beam for better visibility and verify the final result:
Let me fix a stuck-key edge case when pausing/resuming:
THE HOLLOW LIGHT — a complete 3D first-person horror game built from scratch with Three.js.
🩸 The Story
You are Mira Kestrel, returning to Blackmoor Asylum where your twin brother Theo vanished twelve years ago. Across three chapters you uncover 15 hand-written documents that reveal the truth about the 1974 "Hollow Light" experiments — eleven patients went in, one thing came out, and it has been hungry for a twelfth ever since. The finale gives you a timed moral choice with two distinct endings.
| Chapter | Location | Objective | Stalker |
|---|
| I — The West Ward | Ground floor | 4 patient files | The Matron (slow) |
| II — The Undercroft | Sub-level 2 | 5 ward keys | The Choir (fast) |
| III — The Hollow | ??? | 6 memory shards | Theo (relentless) |
🎮 Gameplay Systems
- True 3D first-person — pointer-lock mouse look, WASD, sprint, head-bob, hand-held torch model
- Procedural mazes — recursive-backtracker layouts with carved rooms, props, loops; new seed every run
- Hunting AI — BFS pathfinding with wander → search → hunt states, line-of-sight + hearing detection. Sprinting and using your torch make you easier to find. Getting caught triggers a scripted grab-cam death.
- Three resources:
TORCH battery (light = safety but also visibility), NERVE (drains in darkness → hallucinations, distorted audio, forced game-over at zero), BREATH stamina
- Memory Pulse (Q) — a cooldown ability that points toward the nearest unfound document
🔊 100% Procedural Audio (no assets)
Web Audio synthesises the detuned drone bed, convolution reverb, heartbeat that accelerates with proximity, footsteps, whispers, growls, and jump-scare stingers — all mixed dynamically by tension and sanity.
🎨 Visuals
Canvas-generated grime/tile/paper/face textures, dense exponential fog, real-time shadow-casting spotlight, flickering pooled ceiling lights, plus CSS film grain, scanlines, vignette and blood-pulse overlays. Journal pages render as aged typewritten paper with a typewriter reveal.
Press Begin the Descent — headphones strongly recommended.
Files built: src/game/story.ts, src/game/audio.ts, src/game/maze.ts, src/game/textures.ts, src/game/engine.ts, src/index.css, src/components/Hud.tsx, src/components/Screens.tsx, src/App.tsx, index.html