top of page

March 9th 2024

Mar 9, 2024
2 min read

Updated: Mar 14, 2025

Unfortuantley I had some medical issues during this 4-5 week period so development was all over the place, while i did complete some features when i was feeling upto it, I couldnt commit to git nor was the schedule for features stuck to.


Listed below is features I added during this period and how they were implemented



Mini map:


I wanted to create a minimap system similar to games like Deus Ex and Call of duty: Modern Warfare 2019 which would display the players location and orientation along with where enimies are, which direction they are facing and what state they are in. I also wanted it to show some or all of the objects in the map.


To do this i attached a spring arm to the player with a 'Scene capture component 2D' on the end of it. The screen capture component is used to capture a snapshot of the scene from a single plane and pass this to a render target this render target. The player mini map icon is a small white arrow you will see during gameplay in the centre of the mini map in the viewport the icon is directly under the camera though this does not affect the view as the projection type for the scene capture component is set to orthographic. This ensures that the size of mini map icons does not change if their Z location changes.



This image shows the viewport for the player blueprint.


Enemy AI:


The base work for the enemy AI was also done during this period, the intial behaviour tree was set up and made and the functions in the AI controller were delared.



The behaviour tree is made up of 5 primary branches and one subtree. Each branch handles a different state with a decorator on each sequence to check if the required state is true. The prioritisation of state branches from left to right is dead, chasing , seeking, searching, passive. Passive being the lowest priority because it is the default state with the lowest aggression meaning if any other state becomes true then passive is immediately out prioritised. The dead state is the highest priority because no other states matter if the character has been killed (enemy cannot chase if it is dead).


The behaviour tree uses a series of custom tasks made to help the ai carry out its set processes depending on what state is assigned to it by the AIController


Above is a look at a small part of the AIController blueprint


This ai controller inherits 3 componnents from its parent class ‘AIControler’. A pawn actions component, a transform component and a path following component. This controller also has an ai perception component. This component collects information from three senses, sight, sound and damage. The first thing this blueprint does is run a behaviour tree when the controller posses a pawn. It does this through a ‘Run Behaviour Tree’ node connected to the event ‘On Posses’. Connected to these nodes are nodes which are responsible for creating a timer so that ‘CheckIfForgotten’ constantly runs (explanation of this below).


More level design and bug fixes were completed during this time aswell.

 



 
 
 

Comments


bottom of page