Ojnar, the trusty AI
The initial purpose of the AI was to use it more as a tool to solve the puzzles in the game. Unfortunately, due to time restraints, we didn't have time to implement it. We instead made it so the companion guides the player, showing it where to go next.
My job was to implement a way for designers to make a path for the AI to go via. As well as implement different behaviours when the AI traversed the path, i.e. jumping and interacting.
Our teammate, Yunis, set up the AI by creating an animator that would act as a state machine. He began with the interacting and the attacking for the AI companion Ojnar, but later put me in charge to finish it.
I wrote the functionality on when to switch states and to which state. For example when to jump over gaps and when to start the landing animation.
The waypoints are what guides Ojnar forward in the game.
Each waypoint is a prefab with a script that holds a reference to the AI. When starting the game, the waypoint adds itself to a list in the waypoint manager.
The Manager uses its list of waypoints to see which is closest to Ojnar and then sets the AI:s next destination. Upon arrival, the waypoint removes itself from the WaypointManagers list.
For this project, I also worked on our third-person camera. I wanted to provide the player with a smooth camera experience without any jittering or other motion sickness stuff.
I also wanted the camera to be easily changed by the designer, so the naming of variables and tooltips was important for this work.
Some functions were added so we could change the camera settings from the pause menu.
I made the pause menu for the game. It has the basic functions like changing the volume in-game, inverting the camera controller, changing the camera sensitivity, quitting the game, etc., making the games more accessible for the players.
With the help of some 2D-artists, Daniel and Carl, I set up the layout and design of the menus.
During this project, I learnt a little bit about working with FMOD. FMOD is a sound engine in which we added sounds and "sound functions" i.e. randomizing footsteps.
Another function in FMOD is creating buses with different sounds. A bus is basically a mixer, which gave me the ability to change the volume or pitch.
With these buses, I could hook up the master volume and other volume channels to the games pause menu. This gave the player the option to lower the volume for either just the music or SFX, or lower all the sounds in the game.