Samsara is a souls-like action-RPG inspired by Tibetan culture. One Tibetan theme was the focus of my development - the Heavenly Kings. My development focus was on creating the Heavenly King West, a character with the power of the serpent, a fire type. They utilise the serpent to have a strong punch to attack the player, and shoot fire balls once "enraged".
Role: AI Programmer
Team: 2 developers (encounter) + whole studio
Timeframe: 4 weeks
Engine: Unreal Engine 5 (C++ & Blueprints)
I worked on this project as part of the Skills Bootcamp run by Infinity27. The bootcamp was intended to teach the core skills required by developers. This included: Blueprints, Code Design & Standards, Source Control, Mathematics for Games, Optimisation, Testing & Debugging, Iterative Development, C++ Development, Communication & Collaboration, Research, Problem Solving, Agile & Scrum, Version Control, Remote Working, Time & Project Management, Documentation. Over the four weeks, I worked alongside another Bootcamp Developer to create a duo enemy encounter. We both created one enemy to be part of an encounter, a mini boss-battle before the final boss of the game.
The first task I undertook was creating an AI controller for my enemy. This was created with Blueprints. The enemy uses the CombatManager component present in the game to perform Melee attacks when in range. It also flanks the player, to get to an advantageous position behind them. The controller also has an event that triggers an "enraged" attack. This occurs when the other enemy in the encounter is killed. The enraged attack consists of two actions: one that is triggered once when the enraged state is first entered, and one that is triggered on a timer repeatedly until the enemy runs out of the required item to cast the action.Â
To manage the encounter and the "enraged" state of the enemies, I, along with the other developer, created a manager to track each enemy and trigger events on the other enemies. This stores a reference to each of the enemies and binds an event to health reaching zero. This then triggers the enraged event on the AI controller. The combat state of one enemy is also tracked which controls the other. If my enemy is in melee combat, the other enemy, which uses ranged attacks will become idle until the player has moved out of range of the melee attack.
After making a playable prototype and creating LOF1, it was decided that the enraged functionality would work best as a C++ component that could be placed on any enemy in the game. This is an important part of the encounter, and it was required to be re-written for every enemy. Making a component made the enraged ability dynamic, performing any action on any enemy. It also improved the performace of the enraged attack, moving it away from blueprints. With a small runtime performance increase, reducing dependancies significantly improved compile times.