EchoHunt is a sonar-based stealth and exploration game prototype developed in C++.
Instead of traditional lighting or vision, the player navigates a dark environment using echolocation. Sonar pulses reveal enemies, obstacles, and pickups temporarily, forcing the player to rely on sound and memory to survive.
The project focuses on technical systems design, where gameplay emerges from interacting systems such as ray propagation, AI behavior, and resource management.
- Ray-based sonar / echolocation system
- Multi-bounce ray reflections for indirect sound propagation
- Dynamic visibility reveal system
- Enemy AI with warning → lunge → recovery attack behavior
- Upgrade-based progression system
- Energy resource management
- Modular system-based architecture
The player explores a dark environment where visibility is extremely limited.
Instead of seeing the world directly, the player emits sonar pulses that propagate through the level and temporarily reveal objects.
These pulses can reveal:
- walls and obstacles
- enemies
- pickups
However, sonar pulses also alert nearby enemies, forcing the player to balance between information gathering and stealth.
- Navigate using limited visibility
- Use sonar pulses to reveal the environment
- Avoid or fight enemies
- Manage limited energy resources
- Survive until the level timer ends
- Choose upgrades between levels
The sonar system is the core mechanic of EchoHunt.
When activated, the player emits a sonar pulse that spawns multiple rays radially from the player's position.
Each ray propagates through the level until it reaches a maximum range or collides with an obstacle. When a ray intersects with an enemy, pickup, or wall, the object becomes visible for a short period.
This allows the player to reconstruct the environment through sound rather than vision.
Sonar rays can reflect off obstacles instead of stopping immediately.
Reflections are computed using the surface orientation of obstacles, allowing rays to bounce around corners and reveal objects that are not directly visible.
Each ray has:
- a maximum travel distance
- a limited number of reflections
This prevents infinite propagation while maintaining performance.
Objects are not permanently visible.
Entities become visible only when:
- hit by a sonar ray
- the player moves very close to them
Each object has a visibility value that fades over time, forcing the player to continuously refresh their awareness using sonar.
Enemies are controlled using a simple state machine.
States include:
- wandering
- chasing the player
- investigating the last known player position
- attacking
Enemies attack using a three-phase behavior:
-
Warn phase
The enemy stops and flashes rapidly, signaling an incoming attack. -
Lunge phase
The enemy dashes toward the player in a fixed direction. -
Recovery phase
The enemy slows down briefly before returning to normal behavior.
This pattern keeps combat readable even in low visibility.
After completing a level, the player selects one upgrade from three random options.
Possible upgrades include:
- increased movement speed
- larger sonar range
- additional sonar rays
- faster energy regeneration
- increased maximum energy
- healing
Because upgrades are randomized, different runs encourage different playstyles.
EchoHunt uses an energy system to limit sonar usage and attacks.
Each sonar pulse and attack consumes energy.
Energy regenerates gradually over time.
This forces the player to use sonar strategically rather than scanning the environment continuously.
Several additional systems support the core mechanics:
Handles player position updates and movement physics.
Centralizes controller and keyboard input and converts raw input into gameplay actions.
Implements close-range combat with energy cost and area damage.
Manages item interactions such as healing and energy restoration.
Controls enemy and pickup spawning while scaling difficulty over time.
Provides sound feedback for sonar pulses, combat, pickups, and UI events.
Handles main menu navigation and UI rendering.
EchoHunt is organized using a modular system-based architecture where data, utilities, and gameplay logic are clearly separated.
src/
├─ Game/
│ ├─ Player/
│ │ └─ PlayerController.cpp
│ ├─ Enemies/
│ │ └─ EnemyController.cpp
│ ├─ Systems/
│ │ ├─ SonarSystem.cpp
│ │ └─ UpgradeSystem.cpp
│ ├─ Core/
│ │ └─ GameManager.cpp
│ └─ main.cppResponsibilities are separated as follows:
- Entities store game data
- Systems implement gameplay logic
- Helpers provide shared utilities
- Game loop coordinates game states and flow
- Levels define environment layout and progression
This architecture makes it easier to add new gameplay systems without modifying existing code.
EchoHunt was developed using the Ubisoft NEXT Contest API and supports Windows and macOS.
-
Visual Studio 2022 Community
https://visualstudio.microsoft.com/vs/community/ -
CMake
https://cmake.org/
Install Homebrew:
Then install required packages:
brew install cmake
brew install freeglut
brew install SDL3