Skip to main content

Posts

Showing posts from 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 cap…

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 …

Top Down Stealth Toolkit Tutorial: How to create customized Laser Security Systems

[The following information is based on the v1.4 edition of Top Down Stealth 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?97156-Top-Down-Stealth-Toolkit]


The Laser Security Systems in Top Down Stealth Toolkit function as an auxiliary layer of AI Threat Detection by alerting all nearby patrol bots upon being intercepted by the player. The underlying logic is a simple combination of Timeline based movement & Collision Overlap checks. These actors support drag & drop functionality from the editor & can be easily customized using the variables exposed to the editor from the blueprints. This post goes over the impact of the aforementioned parameters on the working of Laser Security Systems.



1. Length: The Laser Security System uses a box collision component to determine if the player is within it's …

Tower Defense Starter Kit Tutorial: How to create new Global Abilities

[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 is equipped two default inbuilt Global Abilities: Airstrike & Tower Guardians. This tutorial goes over the steps involved in creating & adding a new custom Global Ability.

1. First we need to add a new entry to the enum 'EGlobalAbilities' to depict our new custom Ability. I'm going to add an entry named Shockwave, & this particular sample ability will reduce the health of all enemy units in the level.

2. Now we will create an actor component that contains the core functionality of this ability. Basically these ability components will be added to an actor named 'Global Ability Deployer&…

Tower Defense Starter Kit Tutorial: How to add new levels to the Level Selection Menu

The Tower Defense Starter Kit comes equipped with a level selection menu that enables players to choose from a list of levels as shown below:



The toolkit contains three playable maps & one main menu map by default, & supports usage of new custom maps as well. The following steps go over the process of adding your own custom levels into the toolkit:

1. Create a new custom level from the Content Browser.

2. Open the 'BP_GameInstance' blueprint within the Blueprints folder & select the variable 'LevelDataArray'. It should have four entries by default: one for the main menu & three for the sample maps. To add our new custom map, first add a new element to this array.

Each element of this struct array contains the following attributes: ID, ScreenName, FileName, Image, & Unlocked. The ID is used to set the level number, starting with '0' for the main menu level. It is not used for any calculations & serves only to provide a means for classificatio…

Top Down Stealth Toolkit v4.10 Basics: Skills & Gadgets

[The following information is based on the v4.10 of the Top Down Stealth Toolkit & hence may not remain entirely relevant in later versions. For information regarding the implementation of Skills & Gadgets in the latest version of the toolkit, check out this post in the official support thread in the Unreal Engine forumshttps://forums.unrealengine.com/showthread.php?97156-Top-Down-Stealth-Toolkit&p=459460&viewfull=1#post459460]

The player character in the Top Down Stealth Toolkit is equipped with skills & gadgets to deal with the AI guards. By default, the player can select one skill & one gadget from the 'BP_PlayerCharacter' blueprint before playing a level. The variables 'ActiveSkill' & 'ActiveGadget' can be used to select the active skill/gadget. The default input buttons for the same are 'Q' & 'F' respectively.


Skills: Skills are abilities that can be used unlimited number of times.

1. Whistle: The Whistle skil…

Top Down Stealth Toolkit v4.10 Basics: Vision Arcs

[The following information is based on the v4.10 of the Top Down Stealth Toolkit & hence may not remain entirely relevant in later versions. For information regarding the implementation of vision arcs in the latest version of the toolkit, check out this post in the official support thread in the Unreal Engine forums: https://forums.unrealengine.com/showthread.php?97156-Top-Down-Stealth-Toolkit&p=459450&viewfull=1#post459450]

The vision arcs in Top Down Stealth Toolkit are created using custom meshes & updated at runtime to match & resize based on the obstacles in their path. The vision arcs serve the aesthetic purposes of AI threat detection, while the functional part is executed elsewhere, thus serving as two modular parts that make up a whole. As a result, it is possible to edit the base properties of the vision arcs without worrying about AI logic. 

The vision arcs exist as parts within the AI Bot logic. The following parameters can be used to edit their propertie…

Unreal Engine Tutorial: How to use curves to control the prices of in-game items

Hi, welcome back for another tutorial. This time around, we're going to learn how to use curves to control the price of an item over time. I'm going to start with the Third Person template that is available by default in the Unreal Engine. 

First of all, we need to create a Float Curve along which we will plot the price of the item relative to time. To do so, just right click on the content browser, then select Miscellaneous >> Curve & choose the Float Curve option. Now open it up & add some points in the graph to define a curve. This can be done by right clicking anywhere on the graph & selecting 'Add key to curve'. Also in order to set accurate values, just click on the point & set 'Time' & 'Value' according to your requirements on the top left corner. I'm using the following values for this tutorial:

Time = 0; Value = 1
Time = 2; Value = 2
Time = 4; Value = 1

You may notice that it will generate a very sharp curve by default.…

Unreal Engine Tutorial: Create Circular Ring Material without Textures

Hi, welcome back for another tutorial. It's been quite a while since I put up a tutorial as I've been busy working on toolkits for the Marketplace. One of my earlier tutorials [link: Unit Selection Decals for RTS Games] had focused on how to create ring materials using textures, as well as using them to display unit selection decals for RTS games. However, a drawback associated with using textures was that it prevented the user from changing the inner & outer radius of the ring. And during prototyping stages of a product, it's far better to implement structures that can be changed easily from within the engine so that you don't have to create a new asset from an external package every time you need to test out a new idea. I've found this approach quite useful while working on my own products. Hence, this tutorial focuses on creating a ring material that can be adjusted both from within the material editor as well as dynamically at runtime.

Alright before we get …

Unreal Engine Diaries #11: Nav Mesh Configuration

[This episode of Unreal Engine Diaries focuses primarily on nav mesh configuration, nav areas & configuration of agent types.

Source: Unreal Engine 4 AI Support Twitch Broadcast with Mieszko: https://www.youtube.com/watch?v=7LaazCv4rB0]

1. The Recast NavMesh has a couple of attributes named 'CellSize' & 'CellHeight' under the 'Generation' section in it's details panel. Together they determine the resolution of the nav mesh & lowering these values can create more precise nav meshes. It could be especially useful when there are lot of holes in the nav mesh due to the surface properties of the terrain. However, lowering them also makes the nav mesh calculations more expensive.

2. If runtime nav mesh generation is enabled, it would be best to set the 'Tile Size' attribute of Recast NavMesh to the minimum viable amount.
3. The 'Min Region Area' parameter which can also be found under 'Generation' section of Recast NavMesh can be i…