Wednesday, March 1, 2017

FPS Tower Defense Toolkit v2.1 Update Change Log

The v2.1 update for FPS Tower Defense Toolkit has gone live on the Unreal Engine Marketplace: https://www.unrealengine.com/marketplace/fps-tower-defense-toolkit

Features:


1. The Holographic Tower Display implementation has received a complete design revamp focused on a more data driven approach, while removing the multiple layers of inheritance based class system present in the previous versions. The Tower Holograms are now split into two categories: Holographic Tower Constructor Hologram & Holographic Tower Highlighter.

The Holographic Tower Constructor displays a Hologram of the tower model that has been designated by the player for construction. The physical attributes of this Hologram including the mesh types, their world coordinates, etc are set dynamically using a data driven approach that relies on the information specified by the designer in the new 'Holo Tower Constructor Data array'. The Hologram itself will be displayed as long as the selected tower model can be created at the focused location. However, based on the construction pre-requisites like availability of tower resources & valid navigational paths, the hologram may change it's color to reflect the feasibility of constructing a tower of the selected variety under the given conditions.

The Holographic Tower Highlighter, on the other hand, displays a Hologram based on the focused actor. As long as the focused actor meets the requirements (in this case, being a tower class entity), the Hologram will dynamically alter itself to match the physical properties of the aforementioned actor. This highlighter uses a different color coding system to make it visually stand out from the constructor hologram, as there can be scenarios which require display of both types of holograms.


Apart from these modifications, a Grid Cell Indicator has also been added as a visual cue to identify the grid cell (if any) associated with the focused actor. This ensures that player always receive a minimal amount of feedback based on their interaction with the grid systems, even when Holograms are not displayed due to the particular grid location not meeting the pre-requisites for construction of the selected Tower class.

2. The Tower Stats Display system has also received some modifications as well as new additional new features that improve upon it's previous iterations.

In conjunction with the display of Holographic Tower Constructors, the Tower Stats Display will now present the Setup Cost information for the selected Tower model.

The previous Tower Upgrade Stats system has been extensively modified to facilitate display of information about the Current Stats, Upgraded Stats, as well as Recycle Stats for the focused Tower, using a new dynamic design model that requires minimal amount of hand crafted HUD changes.


3. The Holographic Tower Display system is now driven through a component based approach in order to increase it's modularity & thus facilitate easy implementation with new custom player character classes.

4. Fixed a bug that allowed placement of towers even when navigational paths was blocked, as long as the player were to initiate tower placement before the nav mesh updates finished processing.


Gameplay demo of the v2.1 FPS Tower Defense Toolkit (Windows) edition: https://www.dropbox.com/s/a4myd6m1ocqkojc/FPS%20Tower%20Defense%20Toolkit%20Sample%20Game%20Demo.7z?dl=0


All changes within the blueprints are marked with the boolean variable 'Version2.1' 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 as shown below:


------------------------------------------------------------------------------------------------------------

Changes in the Content Browser:

1. Added new actor component: BPC_HolographicTowerDisplay.

2. Added new enum: EFocusedActorType.

3. Added new interface: BPI_HolographicTowerDisplay.

4. Added new blueprint: BP_TowerHologram.

5. Removed the blueprint BP_TowerHolo_Parent & all it's child classes.

6. Added new structs: Struct_HoloConstructorData & Struct_UnitStat.

7. Added new member SetupCost_TowerBases & renamed TowerCost to SetupCost_TowerPoints in Struct_TowerData.

8. Added new widgets: Widget_BinaryStatModule & Widget_TowerConstructor.

9. Renamed widgets Widget_Stats & Widget_TowerUpgradeData to Widget_UnaryStatModule & Widget_TowerStatsDisplay.

Tuesday, February 21, 2017

Tower Defense Starter Kit v1.6 Update Change Log

The v1.6 update for Tower Defense Starter Kit has gone live on the Unreal Engine Marketplace: https://www.unrealengine.com/marketplace/tower-defense-starter-kit

Features:


1. Added a new component to handle the 'Lock-on System' for Towers. The core functionality of the towers remain the same, but moving the aforementioned feature out of the tower using a modular component based approach should significantly improve the workflow involved in adding new custom Towers.

As of this update, towers like the Laser Tower, Machine Gun Tower, Sniper Tower, & the Artillery Tower, that focus on a single target actor/region are equipped with the new Turret Lock-on system.

2. Added a new AI class: the Tower Disabler. The Tower Disabler bots periodically triggers EMP waves that temporarily deactivate nearby towers. Deactivated towers cease to perform their core functions & do not respond to player-driven UI operations like Upgrades, Tower Abilities, etc.


Gameplay demo of the v1.6 Tower Defense Starter Kit (Windows): https://www.dropbox.com/s/867s17cejslhwdp/Tower%20Defense%20Starter%20Kit%20Sample%20Game%20Demo.7z?dl=0

Note: All changes within the blueprints are marked with the boolean variable 'Version1.6' 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 as shown below:


------------------------------------------------------------------------------------------------------------

Changes in the Content Browser:

1. Added new actor component: BPC_TurretLockOnSystem.

2. Added new character blueprint: BP_EnemyAI_TowerDisabler.

3. Added new entry to the enum 'ECreepType': Disabler.

4. Added new interface: BPI_TurretLockOnSystem.

Friday, January 27, 2017

FPS Tower Defense Toolkit v2.0 Update Change Log

The v2.0 update for FPS Tower Defense Toolkit has gone live on the Unreal Engine Marketplace: https://www.unrealengine.com/marketplace/fps-tower-defense-toolkit

Features:


1. Added a new component to handle the 'Lock-on System' for Towers. The core functionality of the towers remain the same, but moving the aforementioned feature out of the tower using a modular component based approach should significantly improve the workflow involved in adding new custom Towers.

As of this update, towers like the Laser Tower, Machine Gun Tower, & the Sniper Tower, that focus on a single target are equipped with the new Turret Lock-on system.

2. Added a new component to handle the Tower Stats display when the player focuses the cursor on a tower. As a result, the tower blueprints themselves do not have to contain the logic required to handle HUD updates. All that's required of them is to have the 'Tower Stats Display' component, implement the necessary interface & provide the information requested by the component through interface functions.

3. Added a new blueprint function library to act as a container for custom math functions that are required across multiple blueprints.


Note: All changes within the blueprints are marked with the boolean variable 'Version2.0' 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 as shown below:



------------------------------------------------------------------------------------------------------------

Changes in the Content Browser:

1. Added new actor components: BPC_TowerStatsDisplay & BPC_TurretLockOnSystem.

2. Added new interfaces: BPI_DynamicPostProcessSettings, BPI_TowerStatsDisplay, & BPI_LockOnSystem.

3. Added new blueprint function library: BPFL_MathFunctions.


For more details about the FPS Tower Defense Toolkit, check out the official Unreal Engine forum support thread at: https://forums.unrealengine.com/showthread.php?79300-FPS-Tower-Defense-Toolkit

Wednesday, December 28, 2016

Tower Defense Starter Kit Tutorial: How to create custom Enemy Units

[The following information is based on the v1.5 edition of Tower Defense Starter Kit & hence may not remain entirely relevant in later versions. For more information about the toolkit, check out the official support thread in the Unreal Engine forums: https://forums.unrealengine.com/showthread.php?102675-Tower-Defense-Starter-Kit-Support-Thread]


The Tower Defense Starter Kit comes equipped with four types of Enemy AI units that all derive from the parent blueprint 'BP_EnemyAI_Parent'. As the name suggests, this tutorial goes over the process of adding your own new customized AI units into the mix.

1. First add a new entry to the enum 'ECreepType. I'm going to call it Exploder as I want this new AI unit to explode when destroyed, thus dealing heavy damage to all Tower Guardians/Towers caught in the explosion.

2. Now create a new child blueprint derived from the 'BP_EnemyAI_Parent' class. By inheriting from this class, our new AI unit will have all the basic capabilities that will be required of it including damage & threat response mechanisms, movement logic, etc. At this point, all you have to do is to set the skeletal mesh & animation blueprint from it's components tab based on your requirements.

3. Set values for the default 'User Defined' attributes of this unit & add new variables named 'Explosion Damage' & 'ExplosionDamageRadius' as shown in the screenshot below:


4. Now override & extend the 'End Play' event of the parent class by adding the explosion damage application logic as shown in the previous screenshot.

[Note: Steps 5 & 6 are only required if you intend to use the Group Based Wave Generation System from the Wave Manager.]

5. Head over to the 'BP_EnemySpawnPoint' blueprint & add a custom event similar to the other SpawnCreepBatch events present in it's Event Graph. Check out the next screenshot to see how it's done. Basically this takes care of the creep spawning mechanism, once the wave generator has decided to spawn this particular type of creep.


6. Now the Wave Manager needs to know that it can call this Event to spawn a batch of Exploder bots. So make the changes marked in red in the next screenshot, within your wave manager blueprint:


7. All that's left now is to add our new Exploder bot into the Wave Data Array as shown in the example below:



With that, we have covered the steps involved in creating a very basic Enemy AI template. All classes derived from the EnemyAI_Parent class will be capable of engaging in melee combat with the Tower Guardians. If you want your custom AI bot to engage in ranged combat with the Towers as well, just follow the logic implemented within the BP_EnemyAI_Ranged blueprint.

Wednesday, December 21, 2016

FPS Tower Defense Toolkit Tutorial: How to use Towers without Tower Bases

[The following information is based on the v1.9 edition of FPS Tower Defense Toolkit & hence may not remain entirely relevant in later versions. For more information about the toolkit, check out the official support thread in the Unreal Engine forums: https://forums.unrealengine.com/showthread.php?79300-FPS-Tower-Defense-Toolkit]

The FPS Tower Defense Toolkit lets players construct mazes using Tower Bases to control the paths of AI bots. The same Tower Bases also act as platforms for placement of Towers, which help prevent the AI bots from reaching the Power Core. However since most Tower Defense games allow players to directly place towers on the ground instead of a separate platform like Tower Bases, I've received a few queries about how to implement the aforementioned design with this toolkit. This tutorial goes over the modifications required for achieving the same.



BP_TowerManager:


1. Set the variable 'TowerZOffset' to 0.0. This variable determines the offset of the towers along the z axis relative to the ground location. The offset ensured that towers were spawned physically on top of the Tower Bases. Since we're not going to use Tower Bases in this particular scenario, a value of 0.0 ensures that the towers are spawned directly on top of the ground.


2. Now head over to the 'Destroy Tower' function & replace the value of 'Grid Status' input parameter for the 'Update Grid Data Array' function call from 'Tower Base' to 'Empty' [check screenshot below]. Having it set to Tower Base ensured that when a Tower is destroyed, the grid status would revert back to the Tower Base on which it was placed. In our case, we can directly set it to Empty as we're not dealing with Tower Bases.




3. Remove the function call 'Add Tower Base Entry to Selected Tower Data Array' within the 'Create Selected Tower Data Array' function & connect the nodes as shown in the screenshot below:





BP_AttackTowerActual_Parent:


1. Within the Construction Script, add the segment marked with red border in the next screenshot [check below]. This code ensures that the nav paths are rebuilt every time a tower is placed in the level. Since towers used to be placed on tower bases, we only had to do this when tower bases were spawned. And now since towers are going to be placed directly on the ground, we're calling the same functionality here as well.




2. In the Event Graph, add a new 'Event End Play' node & add the segment marked with red border in the screenshot below. This performs the same function as last step, the difference being that we're requesting the nav mesh to rebuild itself everytime a tower is destroyed.




3. Now add a 'Box collision' component to this class. This will act as the nav modifier volume that can block enemy AI paths, thus forcing them along alternate paths. Update the parameters of this component from it's details panel to match the information specified in the following screenshot.





BP_TowerBaseHolo:


1. Now go to the folder 'Holographic Towers'. You should see separate holographic tower classes for Tower Base & Towers. All holographic towers currently inherited from the 'BP_AttackTowerHolo_Parent' blueprint. 


Now the easiest way to modify the Holographic Towers based on our requirements would be to have them inherit from the 'BP_TowerBaseHolo' class. We choose to do this because this class already checks if the tower/towerbase can be placed on the focused grid cell based on the availability of paths from the enemy spawn points to the power core. And with towers being placed at the ground level, this has become a requirement for us. 


However, we still need to make a couple of minor changes within the blueprint. Go to 'Evaluate Tower Resource Requirements' & replace it's logic with the nodes shown in the screenshot below. Basically we're replacing the check for availability of tower bases with a check for availability of tower points.





[Note: You can copy paste these nodes from the same function implementation in  'BP_AttackTowerHolo_Parent' blueprint.]

2. Within the 'Create New Actor Transform' function, replace the 'TowerBaseZOffset' with 'TowerZOffset' as shown in the screenshot below:




3. Now create child blueprints from the 'BP_TowerBaseHolo' class for all the Towers. For example, I'm going to create one child blueprint & name it BP_LaserTowerHolographic. Within the blueprint, we need to set the 'Tower' mesh component to be that of the associated tower. So in this case, I'm just going to set the Laser Tower mesh to this component.


BP_GameInstance:

1. The 'Tower Data Array' variable contains user specified information about all the Towers. If you expand it's elements, you would notice that the first element is a Tower Base entry. Delete this element first.

2. Now expand the array element associated with the Laser Tower & set it's 'TowerHoloClass' parameter as the new holographic laser tower we created a while ago [check next screenshot]. Similarly change the same parameter for every other tower element within the array.



Alright, so now you should be able to use Towers without the need for Tower Bases in your projects. Just make sure to remove references to the Tower Bases & associated enums/blueprints if they're not required. And finally here's a sample screenshot with the final result: