DreamScapes

Major Project

DreamScapes is the third group project I have worked on. It is a single-boss hack n' slash experience with tense, reaction-based combat. In this game I worked on many different features. The core feature I worked on is the boss, Penathos of the Abyss's, AI and how he functions.

You can find the project using this itch link. https://joshuabo212.itch.io/dreamscapes

Artificial Intelligence

Penathos uses a state machine that cycles between two states, phase 1 and phase 2. Phase 1 has simple behaviour and moves based on the players distance. I store all available moves the boss can use in an array that stores the move ID and the range it can use the move. When the boss can select and use a move, it will compare the first vector and check if the distance is between the two values. It then adds those moves to a list and picks a random one out of the moves in range.

The selected move is then stored by its ID in the Y component of the vector and that is passed through a switch case that applies the necessary functions for animations, timers and materials.

When the boss loses its first HP bar, it will enter phase 2 of the fight using the state machine. This resets all current timers and employs a different behaviour. Instead of having all the moves available in one move list, they are all spilt apart into 3 categories, close, middle and far. The boss then selects moves from those pools depending on its distance from the player.

When the boss goes to select a move, only the moves in the respective category is considered. The list storing the move data is different from phase 1 where the ID is first and the range is second. If the boss is not in range to use the selected move, it will submerge to an ideal distance away from the player. The selected move is then run through the switch case like phase 1.

HitBoxes

Another core feature I worked on is the hitboxes of the boss and how they function with the animations. This was done using Unreal Engine 4's animation notify states. I created a class inheriting from the animation notify state and was able to create hitboxes similar to the way Souls games do them. The hitbox is generated when the attack commences by spawning in a hitbox. This was very interesting to use because I could choose when the hitbox would spawn and despawn.

I was able to expose many custom variables I could use to edit the hitboxes and this was very useful when tuning them.

Last updated