Skip to main content

Posts

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…
Recent posts

FPS Tower Defense Toolkit v3.0 Dev Log #1: Visual Design Revamp

The FPS Tower Defense Toolkit was published on the Unreal Engine Marketplace more than two years ago, and throughout most of its life cycle, I had concentrated most of my efforts on the addition of new gameplay systems and refinement of existing ones. Very few updates were targeted specifically at improving the visual design, with almost all of them focused on the creating a clean and minimalist UI design.

Towards the end of last year, I rolled out a series of mini updates focused on the introduction of new weapons to the player's arsenal. After spending most of the prior updates on refinements to existing systems, this was a huge breath of fresh air to me. First of all, it meant that I had to do research on a diverse set of weapon systems from a wide variety of games. I thoroughly enjoyed this process. There were so many cool weapons and I just wanted to figure out how they all worked. Then came the act of creating working replicas of a selected few of these weapons in Unreal Engi…

Top Down Stealth Toolkit FAQ #2

Q: I want to change the size of the vision arcs. Where can I find the variables that control it? Is there a way to do it from the editor window?

A: You can customize the radius & angle of vision arcs for all types of AI through their perception components. The toolkit uses a custom AI Perception system (BPC_AIPerception) that enables the AI bots to perceive different types of stimuli. It basically allows for four different types of perception (for further details, check out Top Down Stealth Toolkit Basics: AI Perception), out of which the Visual Perception system is responsible for hosting the parameters that determine how far & wide a bot can see. And these include the 'VisionRange' & 'HalfVisionAngle', which among other things, also control the size of the Vision Arcs.

Ideally, these variables could be made public (instance editable) and thus enable customization directly through the editor. However, due to an engine bug (https://issues.unrealengine.com/iss…

Tower Defense Starter Kit v2.2 Dev Log #2: Data Driven AI Design

In the previous dev log for the v2.2 update of Tower Defense Starter Kit, I talked about the new improvements to the wave spawning system, & in particular, the introduction of weighted spawn probabilities for different AI classes. If you're interested in knowing more about the same, you can get an in-depth read at Tower Defense Starter Kit Dev Log #1: Weighted Wave Spawning System. Getting back to the topic at hand, it was while working on the idea of weighted probability distributions that I decided to try out a data-driven approach to spawning AI bots. The tower spawning system had received a similar upgrade during the early stages of the toolkit and ever since then, I've occasionally had this thought cross my mind.



The introduction of a data-driven design ended up greatly streamlining the process of adding new features related to towers, and across a wide variety of scenarios. Most notable among these was that further changes to HUD systems required a far less hands-on a…

Tower Defense Starter Kit v2.2 Dev Log #1: Weighted Wave Spawning System

The v2.0 update of Tower Defense Starter Kit introduced some major improvements to the wave spawning system. Prior to this update, the toolkit came equipped with a single Wave Spawn Controller class that handled three different types of spawning models. This design structure was replaced in favor of an inheritance based system with a parent class that handled the base logic, and two new child classes that individually specialized in user-defined (batched) and randomized (threat based) wave spawn patterns. The third model of wave spawning system, which allowed the user to control the spawn data of every individual unit in a wave, was removed since the batched spawning system could essentially achieve the same desired result while making it far easier to edit the wave data.

The reason behind introducing an inheritance based design was self-explanatory, but the true long-term goal behind the v2.0 update was to act as a pivot to alter the design direction of future updates when it comes to…

Top Down Stealth Toolkit FAQ #1

Q: I noticed that the turrets are disabled when I start a new game. But then they sometimes get activated over the course of a game. Why is it behaving this way, and how can it be enabled right at the start of a mission?

A: The turret AI in Top Down Stealth Toolkit is set to a deactivated state by default. This is an intended feature designed to showcase the use of automated security devices as a form of backup system for the AI. The default behavior is to activate them once the Global Alert Level escalates to Stage I, which is why they seem to get turned on sometimes during the mission.

However, this design is not set in stone, and it can easily be modified to have the turrets turned on at the start of a level. If you want all turrets to be activated by default, open up the 'BP_AutomatedSurveillance_Turret' blueprint and set the 'UseDelayedInitializationModel' variable to False. Basically, this variable determines if an AI agent gets enabled by default, or on a need bas…

Top Down Stealth Toolkit Basics: Patrol Movement Systems

The patrol movement systems for Guard AI in Top Down Stealth Toolkit is driven through a modular component-driven design that ensures minimal coupling between the associated feature & the parent entities that use them. This essentially means that you can easily reuse the functionality wherever required without having to worry about getting bogged down in deep inheritance cycles or having to copy paste large chunks of code between classes that are otherwise not related by a parent-child relationship.

The 'BPC_PatrolMovementControl' component attached to the Patrol Guard AI parent class supports three different types of patrol modes: Stationary, Fixed Waypoints, & Random Waypoints. These can be set for each individual patrol guard from the editor through the publicly editable variable 'PatrolMovementControl' as shown below:




Here is a brief overview of the three patrol modes:

Stationary: The Stationary mode setting is used when AI bots need to be assigned to guard a…

Top Down Stealth Toolkit 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 floor meshes. Add a Nav Mesh Bounds Volume & extend it to encapsulate all the floor meshes. This will ensure that the AI agents/bots, once added will become capable of traversing across the level.

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

4. Now drag & drop the following blueprints as actors into the level: BP_AISensoryManager, BP_AISurveillanceController, BP_GlobalAlertLevelController, BP_PatrolGuardSpawnPoint (multiple, if necessary), & BP_ExitPoint. Before moving on to the next step, here is a brief overview on what each of these actors bring to the toolkit:
The AI Sensory Manager continuously evaluates all stimuli against various agents & dynamically assigns new objectives to the AI agents based on the res…