AI Programming (Unreal Engine 5)
The game currently consists of a single boss battle with the player fighting a giant tuba man. The player can use ranged blasts from her violin to attack the boss while dodging slams, leaps, and tuba blasts from the boss. After certain thresholds, the boss can also enter a defensive mode where they put up a shield that the player must break with the corresponding type of attack.
I was a programmer primarily in charge of the boss' AI and attacks. Since this was my first time using UE, I was learning the ins-and-outs while programming the boss. I primarily stuck to using blueprint in order to not overload myself with new information.
For the AI, I used Unreal's behaviour tree. The boss has four main attacks: the slam, jump-slam, charge, and projectile barrage. Every few seconds, the boss chooses a new move to use. Depending on how close the boss is to the player, they will use a different move. The slam and charge are used at close range, the charge and jump-slam are used at long range, and the jump slam and projectiles are used at long range. The boss will also sometimes move towards the player if they are at a certain distance from the player... At least, that's what it was in older versions of the game. For the final version, the designers decided to scrap all that and just have the boss randomly pick a move regardless of range so that was cool š„².
The boss also has a defensive phase that activates at certain health percentages. The first two shields can only be damaged by one of the player's attack types (blue or red). In those phases, the boss only uses their projectile attack. This was a relatively late addition so there wasn't time to fully iron out the kinks with it, but it works well for the most part. Notably, the first move the boss uses after the shield breaks is always a jump-slam.
This was my first time using Unreal Engine
The game was inspired by that one meme of the guy wearing a bunch of tubas.
Ending of the charge attack.
Ending of the jump-slam attack.
The entire game was inspired by this image.