A 3D survival horror game set in the abandoned halls of Sonoma State University
Escape from Lobo is a first-person 3D horror game where players must navigate the dark, twisted corridors of Sonoma State University while being hunted by a corrupted version of the school's mascot, Lobo. Your objective is to find ID cards scattered throughout the campus to unlock doors and ultimately escape before Lobo finds you.
- Immersive 3D Environment: Explore a meticulously crafted recreation of Sonoma State University's campus, transformed into a nightmarish version of itself
- Dynamic AI Enemy: Lobo hunts you using advanced pathfinding algorithms and sensory systems that react to sound, movement, and light
- Puzzle-Based Progression: Collect ID cards and solve environmental puzzles to unlock new areas and progress toward escape
- Atmospheric Horror: Experience tension through strategic lighting, dynamic sound design, and carefully crafted jump scares
- Stamina Management: Limited running capability forces strategic movement and hiding
Built with Unity 2022.3 LTS, leveraging the Universal Render Pipeline (URP) for optimized performance and visual fidelity. The project structure follows a modular approach:
Assets/
├── Scripts/
│ ├── Player/
│ ├── Enemy/
│ ├── Interactables/
│ ├── UI/
│ └── Systems/
├── Models/
├── Materials/
├── Textures/
├── Audio/
├── Scenes/
└── Prefabs/
The player controller uses Unity's Character Controller component with custom movement logic:
// PlayerMovement.cs
[RequireComponent(typeof(CharacterController))]
public class PlayerMovement : MonoBehaviour
{
[SerializeField] private float walkSpeed = 3.0f;
[SerializeField] private float runSpeed = 6.0f;
[SerializeField] private float maxStamina = 100.0f;
[SerializeField] private float staminaDrainRate = 20.0f;
[SerializeField] private float staminaRegenRate = 10.0f;
private CharacterController controller;
private float currentStamina;
private bool isRunning;
// Implementation details...
}Lobo's AI is powered by a behavior tree system with multiple states:
- Patrol: Follows predetermined waypoints around the campus
- Investigate: Moves toward suspicious sounds or sightings
- Chase: Directly pursues the player when detected
- Search: Intelligently searches the last known location when the player breaks line of sight
The AI uses NavMesh for pathfinding and raycasting for vision detection.
ID cards are managed through a centralized inventory system that tracks collection progress:
// IDCardManager.cs
public class IDCardManager : MonoBehaviour
{
[SerializeField] private int totalIDCards = 8;
[SerializeField] private Door[] lockedDoors;
private int collectedCards = 0;
public void CollectCard()
{
collectedCards++;
UpdateDoorStates();
// Trigger UI updates and sound effects
}
private void UpdateDoorStates()
{
// Unlock doors based on collected cards
}
}- Occlusion Culling: Carefully configured to maximize performance in complex indoor environments
- Level of Detail (LOD): Multiple detail levels for complex models to maintain performance at distance
- Texture Atlasing: Reduced draw calls by combining textures for similar objects
- Light Baking: Pre-calculated lighting for static elements while using dynamic lighting only where necessary
The audio system uses a combination of ambient sounds, dynamic music, and 3D positional audio:
- Footsteps change based on surface material
- Lobo's growls and movements are spatialized to help players locate the threat
- Adaptive music system that responds to tension and proximity to danger
One of the biggest challenges was optimizing Lobo's pathfinding to create an enemy that felt intelligent without consuming excessive CPU resources. The solution involved:
- Using a hierarchical pathfinding system
- Implementing path prediction for common routes
- Adjusting update frequency based on distance from player
Balancing the horror atmosphere (which requires dynamic shadows and lighting) with performance was solved by:
- Using a hybrid lighting approach with baked indirect lighting
- Implementing custom shadow distance scaling
- Creating an optimized flashlight shader that minimizes overdraw
Escape from Lobo combines psychological horror with technical innovation to create an immersive experience. The game demonstrates how careful system design and optimization can create a compelling horror experience even with limited resources.
Note: This game is a fan project and is not affiliated with or endorsed by Sonoma State University.
