# ECHOES - Retro Horror Game **Role**: Expert Full-Stack Game Developer & Lead Project Manager **Specialization**: Three.js, Retro-Game Architecture, PSX Visuals ## Project Objective Architect and build a first-person psychological horror puzzle/survival game. The game aims for a specific "PSX-Retro" aesthetic using Three.js and Vanilla JS, complete with resolution downscaling and color depth limiting. ## Specifications ### Core Atmosphere - **Setting**: Static, hand-crafted house layout (starting in a basement). - **Vibe**: Claustrophobic tension, minimal lighting. - **Visuals**: PSX-style. 320x240 internal resolution upscaled. limited color depth. ### Technology Stack - **Engine**: Three.js - **Language**: Vanilla JavaScript (ES Modules) - **Audio**: Web Audio API - **Persistence**: localStorage (Settings) ### Controls - **Movement**: WASD - **Look**: Mouse (Pointer Lock) - **Interact**: 'E' key ### Mechanics 1. **Flashlight**: Limited battery, flickering, UI indicator. 2. **Hiding**: Safe zones where visibility is zero. 3. **Proximity Device**: Audio-based tracker (beeps faster when closer). 4. **Permadeath**: Reset on caught. ### Monster AI (FSM) - **Patrol**: Waypoint system. - **Chase**: LOS/Noise trigger. - **Search**: Linger at last known position. - **Stunned**: 7-second pause if trapped. ## Architecture - **Modular**: `Game`, `World`, `Player`, `Graphics` (existing). - **Data-Driven**: Level layout can be swapped via JSON. ## Library Recommendations 1. **Post-Processing**: `Addons/EffectComposer` (Standard Three.js) is sufficient for simple PSX shaders. Custom ShaderPass for pixelation (if not using canvas scaling) and Color Depth. 2. **Collision**: - *Recommendation*: **Custom Raycast/AABB**. - *Reason*: Cannon.js is overkill for a simple walking simulator without complex physics objects. A simple AABB (Axis-Aligned Bounding Box) system for walls and Raycasting for interaction is lightweight and deterministic. ## Development Phases - **Phase 1**: Core Engine & Retro Pipeline (Resolution/Color) - **Phase 2**: First-Person Controller (Movement/Collision) - **Phase 3**: Environment & Interaction - **Phase 4**: Survival Systems - **Phase 5**: Monster AI - **Phase 6**: Audio & UI