Update 8 (v1.8) has gone live on the Unreal Engine Marketplace. This is a v4.12 exclusive update & listed below are the main changes introduced in this update:
- Implemented a new & improved component based Threat Detection system for the Creep AI. The four new components - Visual Perception, Damage Perception, Threat Analyzer, & Threat Response together form a modular system that enables creation of new AI as well as extending features of existing AI with ease. Here is a brief overview of the components:
Visual Perception component: This component uses a combination of distance, angular, & line trace based checks to provide the parent class with information about it’s spatial relation to all potential targets.
Damage Perception component: This component keeps track of incoming damage from all potential targets & relays the information back to the owning actor. It is also responsible for controlling the relevance of damage inflicted over a long period of time. This allows the owner to focus on the immediate threat instead of focusing on an actor that may have inflicted some damage 30 seconds ago.
Threat Analyzer component: While the previous two components focus on gathering data, this component focuses on retrieving the aforementioned data & evaluation of potential targets based on it. It also allows the designer to specify the relative importance of visual perception weightage vs the damage perception weightage for the parent actor. For example, if you want a creep that generates more aggression toward damage causing agents than closer targets, it’s as simple as improving the maximum weightage of the damage perception while reducing the same for visual perception within this component. The component also makes sure that the active target gets special preference over other targets to prevent the parent actor from rapidly shifting focus between targets based on weightage changes. The evaluated results are passed on to the parent actor through it’s associated interface functions.
Threat Response component: This component comes into play once the parent actor has acquired an active target. It determines whether to move to/attack the active target based on the distance to it. The final decision is then relayed back to the parent actor for execution. For example, an attack order to melee parent actor would be executed in a different manner when compared to the execution by a ranged parent actor.
The components act independently & are not aware of the existence of other components. They are only aware of their own existence as well as that of the owning actor. Any information that is being relayed between these components happen through the parent class & interface functions. This facilitates creation of new creep types with different combination of components [along with their associated interfaces]. For example, both the melee & ranged creep classes will now be equipped with all 4 components by default, while the corebomber class will only use visual perception component in conjunction with some custom logic in the parent class tailored to it’s requirements. Similarly if you do not want a certain type of creep to not respond to damage causing agents, just add all components & interfaces excluding the ones related to damage perception.
-
All static Tower parameters are now retrieved dynamically from the Tower Data Array, thus reducing the number of variables that need to be stored in each tower actor. Only parameters that can be changed at runtime, such as DPS, Range, etc are stored within the tower actors.
-
The Selected Tower Data Array which served the purpose of storing all data pertaining to the list of towers available to the player, has been replaced with an integer based array which only stores the Tower Class indices of the selected towers. This ensures that data is not copied around unnecessarily & ensures that accessing information related to the Towers happen solely through the Tower Data Array, provided that entity that requires the said data can provide the Tower Class index.
-
The Grid Snapping system which enabled placement of towers in the Unreal Level Editor, has been simplified.
-
Removed unnecessary collision responses for all actors in the toolkit.
-
The Power Core now calculates a set of perimeter locations, which are used by the creep actors for navigation purposes, thus acting as a middle ground between the previous implementations which either relied on usage of completely random locations or the creeps grouping together in one region. The number of locations to be calculated can be adjusted easily through the editor using a globally exposed variable.
-
Added a new Creep AI Manager class that keeps track of all potential targets for the creeps, thus freeing them to only focus directly on the targets. It gets alerted everytime a potential target has been spawned or destroyed anywhere in the map. The Creep AI Manager then relays this information to all relevant creep actors in the level, so that their target weightage information always remain up to date.
-
Fixed a bug that prevented the towers from returning the tower resources when it’s associated tower base is sold.
-
Fixed a bug that caused the wave generator to stop functioning due to event access conflict when multiple groups of the same creep class are spawned from multiple enemy spawn points in the same time frame.
-
Introduced a new Focus Fire system that enables the player to request all relevant towers to focus fire on a designated target. This system is driven by a component based approach, thus facilitating easy integration into any new towers that maybe added in the future.
The Focus Fire component has been added to the Laser Tower, Machine Gun Tower & the Sniper Tower by default as these are the three towers capable of focusing on a single target. Along with the associated Manual Target Override interface, this component serves the purpose of overriding any active target & focusing on a new target specified by the player, provided the target is within range.
With this new system, the player will be able to play a more tactical role during the combat phase of the game.
All changes within the blueprints are marked with the boolean variable ‘Version1.8’ in order to easily identify the workflow changes introduced with this update. Comments are also written to describe the major changes. The new variables as well as functions added to existing blueprints are also marked in the event graph.