Loading...

A Deep World

Unity 2D stealth adventure game where you guide a small creature through a dangerous underwater world. Explore, hide, and outmaneuver procedurally animated predators to find a lost friend. As the main developer I created all gameplay systems, AI behaviors and game feel elements like lighting and vfx. Initially a student project with collaborators from Berklee School of Music, I continue the project for final release.

Winner of “best game” in “Principe de Los Paramos” 2025 awards in Colombia.

Main contributions

  • Created a dynamic flocking system supporting 700+ agents at 60fps with Unity Job system and Burst Compiler
  • Developer the enemy AI so our predators react to player actions, patrol areas, chase player and show frustration when player hides during a chase
  • Created a robust decoupled code architecture for all the systems using observer, singleton and state patterns across the project
  • Polished game feel through VFX, lighting, and animation tuning
  • Support our audio team by taking the role of audio programmer, dealing with fmod in Unity
  • Built a programmable cinematic system for in-game storytelling. Using the power of procedural animation our cinematic system is 100% by code and not Unity Timeline
  • Coordinated and analyzed insights from 20+ player playtests

Experience and Design goals

After multiple iterations (checkout the design process for more) I wanted to achieve specific goals:

  • Make the player feel scared and alone in an unknown world. A feeling of “I shouldn’t be here” caused by the environment and the AI behaviors of predators and other creatures around.
  • Embrace minimalist design by having just one core mechanic and using visuals to tell the player how to play and progress. The only text you see is the main menu and the pause menu.
  • Deliver a strong sense of vulnerability and tension through game feel (vfx, sound and visuals) and pacing

This is an effort on minimalist design with inspirations from games like Alien Isolation and Amnesia.

Making the enemy AI

The main idea was to mimic sight and sound perception. Meaning the predator can see you, follow you, chase you or even hear you and investigate where the sound comes from. For this we do a combination of code and behavior trees.

1. Eyesight perception

In our Predator code we have an “eyesight check” that runs every couple of frames. In order to be performant, the eyesight check is done in three passes.

#1 Distance check:
We check if the distance from the Predator to the player is at least in the Follow radius. If the distance is greater, we dont continue.

#2 FOV check
Since we know positions, the predator transform.up and the fov we can do some vector math to get the dot threshold which should be Cos(fov/2). So the dot product between the normalized predator transform.up and the normalized dir from predator to player must be at least that value.

#3 Raycast check
We know is close and on the fov, now we do a raycast to check there are no obstacles.

At the end we save a variable to know if the current predator is seeing the player or not. Doing it this way is quite performant because we leave the raycast at the end.

2. Following last player position when lost

Earlier iterations had the monster stopping when it couldn’t see the player anymore which is not very natural. Now, every time the monster sees the player (passes ell 3 checks) we are updating the last know player position. If the monster is doing an action (following or pursuing) but suddenly it can’t see the player, then it will continue to the last know player position.

3. Searching POI when lost player

Now, if the monster goes to the last known player position while on an action (following or pursuing) then it starts a “Search loop”. Basically, it takes the last known player position and gets all the Points of Interest (POI) around it and start going to those places. This gives a level a realism and force the player to still be aware of its surroundings

4. All in the behavior tree

Our behavior tree is the one that decides when to each of othe actions: pursuing, following, searching or the default of patrol.

Flocking System

In an effort to make the world feel more alive I created a flocking system with Unity Job system and Burst compiler. First, I started by actually reading a Craig Reynolds original Boids paper, learning about the principles of alignment, cohesion and separation. Afterwards I added my own twist to get specific behavior like following, orbit, hard and soft avoidance.

Flock patrolling an area defined by array of positions
Flocking preview of agents following the player

The FlockManager is responsible for creating and managing the agents, as well as establishing the behaviors that specific flock will have.

  • FlockCore behavior that handles the base alignment, cohesion and separation code. Without this theres no flock really
  • FlockGoal behavior handles if we want the flock to go somewhere specific like follow the player or patrol a route.
  • FlockContainment that handles if we want to contain the flock in a specific area (a collider is used for this)
  • FlockAvoid handles if the agents must avoid externals objects. A Hard void is that the agent will act like scary fish, if say the player gets near we make the agent go to the opposite direction with an extra acceleration. A soft avoid is the idea that the agent must “swim around” said object. This is still in progress as it is very costly.

The Design Process

Ideation: Visit to CSC

After experimenting with a few mechanic-based prototypes, my teammate and I visited the California Science Center for inspiration. Observing strange sea creatures turned out to be exactly what we needed. I became fascinated by organisms with reactive, tentacle-like filaments—they sparked the idea of capturing a living, surreal underwater ecosystem that is in constant movement by the use of procedural 2D animation.

Inspired by our visit to California Science Center, I worked in squid-like movement.

Preproduction: experimenting with goals and constraints

First couple of weeks experimenting. I built movement-focused prototypes and experiments to convey character emotions without dialogue. A trip to the California Science Center and procedural animation prototypes inspired our alien underwater world setting, also leading to our key design constraint: no dialogue, minimal text.

Every single prototype tried to answer a design question:

Can I make a player feel empathy towards a cube with just animation and audio?
How much spontaneous animation is needed to make players engaged with NPCs?

Minimalist stealth gameplay

Aiming for accessibility and simplicity, I focused on movement and a single versatile mechanic, a “call” mechanic. Inspired by games like Super Meat Boy, our character remains unchanged, you get no power ups or anything like that, is the situations that change. Playtesting proved to very extremely important to get the movement just right so that players feel as a fast but fragile underwater creature.

Using the “Call” to communicate with your friend

Using “Call” to get the monster’s attention

Using “Call” to open gates