I'll create a 3D horror game with a compelling storyline using React, Three.js, and Vite. Let me start by exploring the project structure and then building the game.
Now I'll install the necessary packages for 3D graphics and create the horror game:
Great! Now I'll create the 3D horror game with a storyline. I'll create multiple component files for better organization:
- First, let me create the main App component:
Now I'll create all the necessary component files:
Now I'll create the main GameScene component with Three.js:
Let me fix the errors in the files:
Good! Now let's update the index.html with an appropriate title:
Now let's build the project to see if everything compiles correctly:
Excellent! The project builds successfully. Now let me enhance the game with more interactive features and polish. I'll add better audio atmosphere cues and interactive objects:
Now let me add the AudioVisualizerUI to the main App:
Now let me enhance the GameScene to add more interactive elements and environmental storytelling:
Now let me add more atmospheric elements like particle effects and better lighting:
Now let me add visual warning effects when the player gets close to danger or encounters shadows:
Now let me add some polish with a fade effect during screen transitions and enhance the story display. Let me also add a glitch effect when suspense is high:
Now let me add more varied game mechanics and a secret area. Let me enhance the GameScene with better environmental interaction:
Perfect! Now let's build the project again to make sure everything compiles:
Excellent! The game builds successfully. Now let me add some final polish with screen shake and vignette effects for maximum horror atmosphere:
Now let's add a hint system and make the story more immersive. Let me create an enhanced version with proper z-index layering:
Now let me add a hint system to help guide the player through the mansion:
Perfect! Now let me build the project again to ensure everything works:
Perfect! Now let me add some final enhancements - a day/night cycle effect and some enhanced environmental details:
Now let me add an eerie wind effect simulation and make the game more immersive with better visual feedback:
Let me add a better intro cinematic and enhance the MainMenu with a compelling atmosphere:
Perfect! Now let's build the game one more time to ensure everything compiles correctly:
Excellent! The game compiles successfully. Let me now add a README with game information and create one more enhancement - better ending screens:
Perfect! Now let me enhance the end screens to be more atmospheric:
Perfect! Now let's make sure everything builds correctly one final time:
Perfect! The game is complete and builds successfully! Let me create a quick summary of what was created:
🎮 The Crimson Manor - 3D Horror Game Complete!
I've successfully created a fully-featured 3D horror game with an immersive storyline. Here's what was built:
Core Features:
1. 3D Game Environment (Three.js)
- Full 3D mansion with multiple rooms (main hall, library, corridors, basement)
- Dynamic shadow entities that move and pulse with eerie effects
- Atmospheric lighting with red and purple accents
- Realistic shadow mapping and fog effects
2. Compelling Narrative
- 6-chapter story that unfolds as you explore
- Psychological horror narrative about memory, sacrifice, and temporal anomalies
- Story overlays appear when you reach key locations
- Progressively darker atmosphere as you descend into the basement
3. Dynamic Suspense System
- Health meter that tracks your condition
- Suspense meter that increases near danger zones
- Environmental warnings and audio cues (visual only)
- Visual effects intensify as suspense increases
4. Atmospheric Effects
- Glitch effects at high suspense
- Vignette darkening at screen edges
- Screen shake when danger is near
- Pulsing lights and shadows
- Particle drift animation on main menu
5. Immersive UI
- Main menu with atmospheric background
- HUD showing health and suspense
- Story overlay system
- Hint system to guide progression
- Audio visualization cues
- Multiple ending screens
6. Game Mechanics
- WASD movement controls
- Mouse-look camera system
- Boundary checking (can't leave the mansion)
- Story triggers at specific locations
- Victory condition: reach the deepest basement chamber
Technical Implementation:
- Framework: React + Vite
- 3D Graphics: Three.js with shadows, materials, and lighting
- Styling: Tailwind CSS with custom animations
- Language: TypeScript for type safety
- Components: Modular architecture with separate components for each system
Game Flow:
- Main Menu → Atmospheric introduction
- Exploration Phase → Discover the mansion and story
- Escalation → Suspense increases in dangerous areas
- Climax → Face the truth in the basement
- Ending → Escape or succumb to darkness
The game is fully playable, responsive, and ready to be served! The narrative creates a psychological horror experience where players gradually uncover a mystery about reincarnation, sacrifice, and the cyclical nature of torment within the Crimson Manor.
Files built: src/App.tsx, src/components/MainMenu.tsx, src/components/HUD.tsx, src/components/StoryOverlay.tsx, src/components/GameScene.tsx, index.html, src/components/AudioCues.tsx, src/components/GlitchEffect.tsx, src/components/VignetteEffect.tsx, src/components/HintSystem.tsx, src/components/ScreenShake.tsx, GAME_README.md