top of page

Personal Project: Function Showcase

Engine: Unreal Engine 4 (C++ & Blueprints)

This page is just for my personal programming function showcase only. All assets (animation, model) that apply to the function showcase are all free from Unreal Marketplace.

1. Targeting System

2. Combat System

3. Ai 

Attack

Strafe

The Challenge and Solutions:

1. Targeting 

For the targeting system, basically just need to get the location for both player and target to get the rotation by using the find look at function. In order to get the smooth rotation and fixed the camera angle within a specific value, interpolation for rotation and clamp will apply to the rotation toward the target.

2. Player Combat System

Basically, the player combat animation was accessed from the data table. All of the different combat types will assemble inside the data table for convenient access and don't need to edit too many variables inside player characters. 

In order to make the combo work, the integer will be used to determine the number of data values. During the attack, stop movement immediately will be apply to prevent player continue moving while attacking. In the future, handle animation priority will be expected. Make sure dodge and the rotation of the character can be smoother than current state.

Regarding the damage system, the interface will be applied in order to call the function easily without casting to the enemy script itself. However, due to the hp and stamina system haven't set up yet, the interface execution will just print string only.

3. Ai

The ai just has 3 main states: attack, strafe and chase. During the attack state, once the ai can't reach the target, they will keep chasing. In the future will expect more ai behaviour like dodge, special attack, air attack and etc.

In terms of the combat system for ai, it just plays the random attack combo from the array of the data table. For both player and ai, the same type of data table was applied. In order to make sure that ai completed the attack before switching the state, this function also returns the float which is the montages duration. In the future, more complex attack behaviour could be expected such as based on the distance to stop the attack behaviour, dodge from the player attack, stun and parry.

For strafing behaviour, as of now just apply a simple environment query system which will return a random item within the range. In the future, the environment query system may apply more tests such as dot product and distance for filter and score.

bottom of page