Skip to main content

Posts

Showing posts from 2017

Tower Defense Starter Kit Tutorial: How to create a new level

1. First ensure that the default Game Mode & Game Instance class parameters in the Project Settings are set to 'BP_GameMode' & 'BP_GameInstance' classes respectively.

2. Now create a new map, open it, & lay down the navigable area for AI bots by placing instances of 'BP_AIPath' across the level. Add a Navmesh Bounds Volume & extend it to encapsulate all the AIPath actors.

3. Add a Lightmass Importance Volume around the core game space.

4. The 'BP_AIPath' actors that we added earlier has a secondary function apart from providing a traversal space for the AI bots. And that is to allow the deployment of Global Abilities like Airstrike. Everytime a player selects a global ability, a targeting reticule is activated to point the precise location for deployment. However if we have empty spaces in the level, this can be an issue as there will be no surfaces to block the GlobalAbilityTargeting trace channel. In order to rectify this issue, the toolk…

Top Down Stealth Toolkit Basics: Global Alert Level System

The following information is based on the v2.1 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/unreal-engine/marketplace/68942-top-down-stealth-toolkit


The v2.1 update for Top Down Stealth Toolkit introduced a Global Alert Level Controller (GALC) tasked with controlling high-level AI responses to the player's actions. While all AI agents still retain their individual alert level systems, the GALC acts as an autonomous outside listener that keeps track of stimulus perception events, with minimal coupling to existing systems within the toolkit. With every new instance of a stimulus being perceived by an AI agent, the Global Alert Meter keeps rising based on the perceived threat rating of the stimulus. As the meter crosses certain threshold values, the Global Alert Level system kicks into action…

Unreal Engine Experiments: Borderlands 2 Damage Display System

I recently started working on some side projects during free time to experiment with & learn about interesting gameplay systems from my favorite games. And Borderlands 2, being high up on the list, I decided to create a working model of its Damage Display system using blueprints. It's finally done & here is a video demonstration of the system:



The system uses widget components attached to dynamically spawned actors, to draw the text on screen space. Just as in the game, the floating damage texts move along a parabolic path, while the critical hit status text moves along a normal linear path in the upward direction. Both of them keep scaling up till a certain point along the path, & then start scaling down for the remainder of its journey, thus creating a sort of pop-out effect. Another factor that controls the scaling of the text display is the distance from the player character, thus increasing/decreasing its size [the text becomes less clear over long distances in the…

Thoughts on Game Design: XP Management Systems for Tower Defense Games

Two years ago, before I first started working on the Tower Defense Starter Kit, I had done some research on various games from the genre to understand the design process behind the underlying gameplay mechanics. Among the lot were popular games like Kingdom Rush & Defense Grid, as well as their lesser-known counterparts like Anomaly Defenders & Sentinel 4. Each of those games had some interesting unique feature that made them stand out & Sentinel 4 actually had quite a few of them going for it. Of special note among these, was the fact that towers leveled up on their own over time. This single design choice added a whole new layer of tactics when it came to tower placement, right from the early stages of a mission.

A couple of months ago, I finally got around to adding an experience based auto-leveling system to the toolkit. While I thoroughly enjoyed Origin8's (Sentinel 4 Developer) take on tower defense, one aspect that concerned me was the decision to use a last-hit …

Top Down Stealth Toolkit Tutorial: How to control the AI Perception model for AI agents

The following information is based on the v2.0 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 Top Down Stealth Toolkit uses a custom Perception system to evaluate potential threats for the AI agents. It's user defined properties can all be edited through the component details panel from the owning blueprint, thus facilitating creation of different threat perception models for different types of AI agents. This tutorial will go over the basic parameters that control the working of this system.



Visual Perception Data:

1. IsVisualPerceptionEnabled?: Determines if the agent can use Visual Perception to perceive stimuli.
2. Vision Range: Determines the direct line of sight range.
3. HalfVisionAngle: Determines the half angle for the agent's cone of …

Top Down Stealth Toolkit Tutorial: How to create a new custom Interest Stimulus

The following information is based on the v2.0 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 v2.0 update for Top Down Stealth Toolkit introduced a dedicated stimulus driven AI perception system. This tutorial will go over the process of using the aforementioned system to create a new Interest stimulus from scratch.


The base attributes for Interest stimuli are controlled through the 'InterestStimulusDataArray' in BP_AISensoryManager class. Each element of the struct array contains details about a specific type of Interest & hence provide an avenue for easily customizing it's properties. Before going into the actual process of creating a new Interest, I'll provide a brief description of the various parameters that control that co…

Top Down Stealth Toolkit Basics: AI Perception

The v2.0 update for Top Down Stealth Toolkit introduced a custom component driven AI Perception system tailored specifically for implementation in Stealth games. This system uses a combination of four different perception models to evaluate threats based on the new Stimulus model introduced in the update.

Perception Models:

1. Visual Perception: Using a combination of distance, angular, & line trace checks, the Visual Perception enables an AI agent to detect stimuli within it's direct line of sight range. It is capable for sensing Target stimuli as well as certain types of Interest stimuli like Incapacitated & Defunct allies.

2. Aural Perception: The Aural Perception enables an AI agent to perceive & track noises created in the vicinity. It factors in the Loudness of a noise while performing the distance check operation, in order to gauge the relevance of the stimulus. This ensures that louder noises can potentially be heard by an agent, even if it was created outside the…

Top Down Stealth Toolkit Basics: Stimulus Types

The v2.0 update for Top Down Stealth Toolkit introduces a new Stimulus generation system that will enable the users to easily customize & add new types of perceivable events for the AI agents. Inspired by the AI Threat Detection system used in the 2D Stealth game - Mark of the Ninja, the stimuli are primarily divided into two categories: Targets & Interests.

The Target Stimuli represent the highest level of threats that can be perceived by the enemy AI. Once an agent has acquired a target, it will focus all it's attention on the said stimulus, with complete disregard for anything else until the target actor manages to evade it's line of sight. The Player Character is an example of an entity that registers itself as a target stimulus.

The Interest Stimuli on the other hand, represent cases that require some level of preemptive investigation before an agent can make further decisions. These are more varied due to the multitude of attributes that define them (more on this t…

Tower Defense Starter Kit Tutorial: How to add custom Tower Abilities

[The following information is based on the v1.6.3 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 features two Tower Abilities (Overdrive & Repair) than can be added to the towers in order to provide the player with an additional element of control over the gameplay. This tutorial will go over the steps involved in the creation of a new Tower Ability & it's integration with the existing system.

Before delving into the matter of actual implementation, I think it would be best to understand that there are generally two types of dynamically driven abilities: sustained abilities that modify the functioning of the targeted actor over a brief span of time, & momentary abilities that cause a certa…

Unreal Engine Diaries #12

1. Blueprint function libraries cannot be accessed from an Object class.

2. If you spawn a base 'Actor' using Spawn Actor from Class function, it's transform (or the individual sub components like location, rotation, & scale) cannot be modified.

3. The 'Get Game User Settings' node can be used to get the local machine settings like screen resolution, texture quality, etc, but this function returns the settings data from the memory & not from a permanent storage location like the hard disk. This means that if the player had used 'Save Settings' prior to this function call during the same instance of the game, it would not return the saved information.

4. The 'Load Settings' & 'Save Settings' function [accessed through the Get Game User Settings node] loads/saves settings data from/to the disk. While saving new data, it does not apply these settings parameters to the game. So it's generally used in scenarios where the player has t…

Top Down Stealth Toolkit Tutorial: How to modify the size of noise pulse emitters

[The following information is based on the v1.4.1 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 noise pulse emitter's radius is indirectly dependent on two user defined factors: one being the AI bot's hearing sense radius, & the other factoring in the loudness of the noise itself. By default, the patrol bots have a hearing sense radius 'r' of 500 units. This basically means that a noise event with a loudness value of 'l' (default = 1.0) can be heard by the AI bot up to a maximum distance of 'r*l' units. For example, the footstep noise with a loudness value of 1.0 can be heard up to 500 units, while a different custom noise event with a loudness of 2.0 could be heard from a distance of 1000 units. This maximum d…

FPS Tower Defense Toolkit Basics: Holographic Tower Constructor

[The following information is based on the v2.1 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 Holographic Tower Constructor represents the part of the Holographic Tower Display system that displays Holographic models of the tower designated by the player for construction. The Holograms are created & updated at run time through the 'BPC_HolographicTowerDisplay' component (attached to the player character) using information specified in the 'Holo Constructor Data' array, located within the Tower Manager. Listed below is a brief explanation of the different parameters that drive the Tower Constructor:


- The 'TowerType' enum identifies the data associated with the tower model selected by the player for construction.

- The …

Tower Defense Starter Kit Tutorial: How to create custom Towers

The following information is based on the v1.6 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 seven types of Tower classes that all derive from the parent blueprint 'BP_Tower_Parent'. As the name suggests, this tutorial goes over the process of adding your own new customized Towers into the mix.

1. First we're going to have to create a new Tower class. To keep things simple, I'm just going to duplicate one of the existing Tower classes named 'BP_ShockwaveTower' & name it 'BP_CustomShockwaveTower'.

If you want to create a tower from scratch, you can do so by creating a child class derived from the 'BP_Tower_Parent' class. The only extra step in…