Brynn Edwards' Portfolio Site
  • Home
  • Projects
  • Code Samples
  • Contact

Eyes of the Forest

Gameplay & Game AI Programmer
Most of my work on Eyes of the Forest revolved around the Mentor Character, Russel. He was designed to both tutorialize the player and to be a major narrative attachment. The original idea behind this entire game was actually the final moments where you have to wait for Russel, only for him to never arrive. With that in mind, Russel needed to be at least somewhat believably in the space with the player. He needed to often face the same challenges that the player does to help build that attachment. It was my role on the team to make sure that the mentor not only acted believably, but also was able to have constantly changing movement behaviors depending on his environment, and lastly, that his behavior could be easily edited and tweaked as design needed.
The first goal for Russel was a simple movement behavior where he walked in front of the player and led them around. There were two separate implementation ideas here, first was to use waypoint pathfinding. Storing a series of 'Waypoints' or locations that the Mentor would path to in order. This had some limitations and would require a significant amount of work to smoothen the path and prevent the mentor from running ahead without the player. The second option was to use a Spline Curve, and simply have the mentor follow the spline. The easiest way to do this was to simply have him path to a point shortly ahead of where he was on the spline. This allowed our designers to create a more detailed, highly specific path for the mentor using Unreal Engine's built-in Spline Editor. Ultimately, I implemented the second one, which had some more use cases later on.

Trailer

Play Now
That basic movement behavior was then expanded to account for different problems. In hindsight, this would've been an ideal time to swap to a Behavior Tree or some other AI architecture to better follow the single responsibility principle. Instead I continued to expand on the one script responsible for all of the Mentor's Movement Behaviors. Instead, I added several new different types of behaviors. The big ones early on were climbing and following behaviors. While the following behavior was ultimately scrapped, it was implemented fully, and had some interesting transitions between the other two. Mainly, in order to implement climbing while following, I had the mentor briefly swap to the spline movement until it reached it's destination and swapped back to following. This is because climbing required following a spline. Climbing was essentially a flying movement. To get climbing to work, I disabled Mentor Gravity and teleported him along the spline curve until he reached his destination. A lot of the decisions to change behaviors were made through trigger boxes. The idea being that when the mentor got to a certain point in his spline path he would hit a trigger box that would make him start climbing, or following. Again, an idea I had later would've been to use the same collider and logic that the player used for climbing. However this would've prevented the mentor from being able to climb up things that the player couldn't, which was implemented a couple times throughout the games development.
The last major behavior for the Mentor was the ability to stealth through some of the stealth sections in the game. This required the mentor to essentially cheat and talk to the enemy in order to determine where the enemy was looking. Then, when the mentor knew the enemy was looking elsewhere, he would sneak to the next section. While it did resemble waypoint pathfinding quite a bit, it still used spline pathfinding, and used another trigger box that told the mentor to wait until the enemy was looking elsewhere. To note, determining when the enemy was looking else where was pretty simple, as the detection spotlight also moved along a spline. So we simply got the spline value of the spotlight, compared it the spline value of the mentor, and checked if it was outside a certain buffer value that could be customized per waypoint.
Proudly powered by Weebly
  • Home
  • Projects
  • Code Samples
  • Contact