Norsk

Creating a Living Ocean World for the Copepod Pip - the development of a digital game

Creating a Living Ocean World for the Copepod Pip - the development of a digital game

20 October 2025 blog

As part of the Migratory Crossroads project we are developing a digital game about thye copepod Pip. Here we descripe how we have worked to create a living ocean environment for Pip through making day-night cycles, horizontal scrolling & diel vertical migration.

Text by Varshani Brabaharan

With Pip now swimming beautifully elegantly on screen, our next challenge was making the ocean feel alive and authentic. Real copepods don't just float in empty blue space—they navigate a dynamic underwater world with changing light, moving currents, and other daily rhythms that drive their behaviour. Let me show you how we coded these environmental systems to create an immersive oceanic experience.

Programming the Day-Night Cycle

One of the most crucial aspects of copepod behaviour is diel vertical migration—the daily journey these tiny creatures make up and down through the water column. During the day, they dive deep, mainly to avoid predators. At night, they rise to surface waters to feed on phytoplankton. To simulate this behaviour, we needed to create a realistic day-night cycle.

Using Unity's lighting system, we programmed a "DayNightCycle" script that smoothly transitions between day and night over a customizable time period (typically 60 seconds in our game, representing a full 24-hour cycle). The system doesn't just change the brightness—it creates a beautiful gradient of colours:

Night: Deep blue hues that mimic the mysterious depths

Dawn: Warm orange tones as sunlight begins filtering through water

Day: Bright, clear lighting representing peak photosynthesis hours

Dusk: Rich red-orange colours as day transitions to night

Illustration: The lighting changes follow a smooth sine wave pattern, just like how natural light gradually shifts throughout the day. This isn't just pretty—it gives players visual cues about when Pip should migrate up or down in the water column.

Video to explain: https://www.mynewsdesk.com/no/...


Simulating Ocean Currents and Movement

Static backgrounds make games feel lifeless, so we needed our ocean environment to flow and move like real water. Our "BackgroundScroller" system creates the illusion of ocean currents in two ways:

Horizontal Scrolling: Represents the constant lateral movement of water masses, giving players the immersive sense that Pip is swimming through moving currents rather than floating in still water.

Vertical Migration Simulation: This is where marine biology meets game programming magic. The background automatically shifts up and down based on the day-night cycle, simulating how the simulated planktonic entities move vertically through the water column. During the day, the background drifts downward, representing the deep-water environment where copepods "hide" from visual predators. At night, everything rises upward toward the food-rich surface waters.

Technical Magic Behind the Scenes

The beauty of this system lies in how these elements work together seamlessly:

1.The day-night cycle tracks time and calculates current light conditions

2.The background scroller reads this information and adjusts vertical position accordingly

3.Pip's behavior can respond to these environmental cues, encouraging players to follow realistic migration patterns

We use animation curves to make the vertical movement feel natural—not a rigid up-down motion, but a gentle, organic flow that mirrors how real ocean layers shift and mix.

Creating Authentic Gameplay

This environmental system does more than look pretty—it creates authentic learning experiences. Players begin to notice patterns: "The water looks darker now, maybe I should swim up for some food” or when sunlight starts to fall “Hmm its time to dive down or I will be eaten”

Video to explain: https://www.mynewsdesk.com/no/...


Bringing the Ocean to Life with Shader Graphs


To make the ocean environment feel dynamic and visually rich, we leveraged Unity’s Shader Graph system, allowing us to manipulate textures and light in real-time. The diagram above illustrates the setup we used for the background of Pip’s underwater world. Here’s a breakdown of how it works:

Texture Sampling and Tiling:The "_MainTex" node holds our ocean texture, representing the underwater scenery. To create movement, we adjusted its UV (2D position within a texture – example (0.0, 0,0) is the bottom left corner and (1.0, 1.0) is the top right corner) coordinates using the Tiling and Offset node. By combining the base UVs with a "_UVOffset" multiplied by a factor (X: 2, Y: 2 in our setup), we can control both horizontal scrolling and vertical drift. This makes the water appear to flow continuously, simulating currents.

Dynamic Coloring: The "_Color" node allows us to modulate the brightness and tint of the texture, which can respond to the day-night cycle. By multiplying the texture sample with this color node, we can darken the ocean during night and brighten it during day, matching the gradient transitions described in the "DayNightCycle" system.

Output to Fragment: Finally, the multiplied color output is sent to the Fragment node, defining the final pixel colors displayed on screen. This ensures that all changes—UV movement, tiling, and color shifts—are reflected in real-time as Pip swims through the environment.

The interplay of these nodes enables a seamless illusion of a living, breathing ocean. Horizontal scrolling simulates currents, vertical offset responds to diel migration, and dynamic color changes reflect the time of day.

Creating Immersive, Educational Gameplay

By combining our day-night cycle, background scroller, and shader-based ocean, we achieve more than just visual fidelity. Players are subtly taught real ecological patterns. Pip’s vertical movements are mirrored in the environment, helping players intuitively understand diel vertical migration and how light, predation, and nutrient availability affect marine life behaviour. The ocean feels alive, and every swim becomes a tiny lesson in marine biology.

Coming up next: Pip’s encounters with predators

Our tiny copepod friend, Pip, isn’t just navigating the ocean—it’s constantly on the lookout for danger. In the next chapter, we’ll explore the variety of predators that lurk in the waters, from stealthy fish to opportunistic jellyfish, and show how Pip’s behaviour helps it survive these threats. We’ll dive into how we’ve designed these predator-prey interactions in the game, making the ocean feel alive and challenging for our little hero.

This is just the beginning of Pip’s thrilling underwater adventure. As the game develops, new predators, surprising encounters, and evolving survival strategies will keep the excitement flowing.

Stay tuned for more updates as we continue building this vibrant, interactive ocean world!

Follow the series on - https://akvaplan.no/en/project... --