I designed a blockout of the chase scene to gauge the travel distance for the player and to visualize the placement of details like plants and moss. Inspired by nature documentaries, I incorporated a bird that chases the player as they attempt to reach a rock pile for cover.

With a plan to create a bird that more fits the art style of the project, I still needed something for now to help me plan the level. There was a perfectly good placeholder bird I have been using from the asset store that came with flying and attacking animations.

To start I wanted the bird to chase the player on trigger from the beginning to the end of the blockout scene. I also wanted to make the bird attack the player to cause a game over if the bird caught up with the player. The attack was to simulate being caught, as in nature documentaries when prey is caught it is game over. I learned that I had to have ways to give the player a chance to escape.

At first, an attack delay was introduced, but it seemed unnatural for the bird to stop and wait to attack.

Eventually, I worked out where the bird always chases and follows the player, and if the player stops running the bird will attack, and there is an attack delay timer to give the player a chance to reach the end of the level before the bird attacks. I also had to make the bird recognize when the player was climbing or if the player fell and is recovering from the fall, because in these moments the bird would immediately attack not giving the player a chance to do these actions. So the bird detects when the player is climbing and as long as they keep moving they will not be attacked, and the bird recognizes when the player is recovering from a fall and has a timer to allow them to start moving again before attacking.

With the help of AI tools, I was able to create settings to adjust various aspects of the bird to try and make the bird always feel close as it is chasing you, and to determine how much time you have to escape.

The bird’s scripts also take advantage of gizmo’s to help me visualize distance.

The bird's behavior is managed through a series of scripts designed to minimize complexities. This approach ensures a separation of concerns, making the system more manageable and efficient. PredatorFSM.cs is the Finite State Machine script that manages the bird’s various states. PredatorChaseUsingWaypoints.cs is a script that handles the movement.

I also wanted to have the feeling of the bird’s shadow looming over the player when the bird is close, so I made a copy of the bird, and created a shader where the mesh does not show but the shadow appears over the player. I had to make sure the shader worked properly with the URP High Fidelity pipeline that I am using in the project.

I am now in the process of introducing textures, rocks, and plants, replacing blocks, and refining the terrain.

The main character is born in the spawning pool. I am using special water materials from URP Water from the asset store to create the water. The material has the feature to use cubemaps to project an image on the surface of the water. I created a simple cubemap script that can take any image, and format it into a cube that can be used as reflection details on the water.

While adding art assets, I also focused on performance. I developed a profiler script that generates a text document with performance metrics. This allows me to share the data with ChatGPT for a detailed analysis of the game's performance.

I created rocks in Blender, textured them in Substance Painter, and also the ferns I created in SpeedTree. I created a culling script so that anything tagged as Cullable will not be rendered outside the camera’s view.

Since the character controller has a footstep script that is creating particles and audio sounds, I have also been experimenting with a pooling script, to keep reusing the resources more efficiently.

As I continue to move forward, I will keep performance in mind and never go below 60 FPS. I still have many more assets to develop and implement into the scene including some more plants I made in SpeedTree and rocks I made with Blender and Substance Painter.

I was also able to develop a shader for the ferns to give them subtle movement without having to rely on wind, and also they have a subsurface effect to glow a warm color as light passes through.

There were other challenges I had to work out like what I wanted the bird to do in specific situations like detecting an obstacle the player is climbing on and flying around it while still chasing the player.