Skip to main content


Showing posts from 2015

Unreal Engine DevLog #22: Reaction Shots & Prototype Cover System

I've been meaning to write down this dev log for quite some time. It's the last update on the X-COM:EU clone prototype that I was working on a while back. I would love to return to working on it sometime later, but for now, I'm concentrating on making tool kits for the Unreal Engine Marketplace.

The last update on the project was about an LoS based visibility system, which is covered here:

Since then, I had implemented Reaction Shots for the player controlled units, as well as a prototype cover system that displays the cover value of each corner of every tile.

Reaction Shots Preview Video:

Prototype Cover System Preview Video:

So that's going to be the last update on the project for quite some time. It's been a great learning experience for me as a starter experience in Unreal Engine 4. Also special thanks to Knut Overbye for creating one of the best products in the Unreal Engine M…

Unreal Engine Diaries #10

To display the AI Perception range in the editor, go to Editor Preferences >> General >> Gameplay Debugger & tick the 'Perception' parameter. Also in post processing, set AA to 'FXAA' or none to display the debug lines better.
In the widget blueprint, select multiple widgets from the Hierarchy panel & then Right click >> 'Wrap with' to wrap the selected widgets within another widget like Canvas Panel, Border, etc.
Add 'Rotating Movement' component to actors to have them rotate automatically. The rotation rate for each axis can be set from the component. This could be used to create interactive objects like weapon pick ups in a shooter or effects like rotating coins in a side scrolling game.
Wrapping widgets with 'Invalidation Boxes' can be used to increase performance as they get executed only at the time of creation & not every frame unlike other widgets. This could be especially useful when there are lots of static U…

VR Tips Compilation #2

As mentioned in the previous post, I've been collecting tips about working with VR from the Unreal Engine Livestreams & GDC Talks. This is the second of the two VR Tips Compilation posts, while the first one can be found here:
Using force grabs to get objects from the environment is a good alternative to actually having the player grab the object, due to the awkwardness & differences between how it works in real life, compared to the lack of physical feedback in games. Also adding to this factor is the design of the control device used to accept inputs.
Remove all motion blur effects as using them in your game can give rise to Simulation Sickness.
Since run & gun is generally not an option in VR games, teleportation is one of the interesting viable alternatives. But even here, it is better to slowly fade the screen to back & then fade everything back in at the new location, instead of instantan…

VR Tips Compilation #1

I've been collecting tips & advice about working with VR, from the various Unreal Engine Livestreams & GDC Talks. Even though I myself have never even used a VR device, it seemed like a good idea to get to know more about it from the people who are already working on it. This post is the first of two VR tips compilations based on the data that I've collected so far. 

The first and most important thing that I've heard in almost all the talks is to never take the camera control away from the player. This would mean that traditional methods like moving the camera to shift the player's focus on to important game events, would probably be a bad idea. So would changing the camera angle to reflect the action from different perspectives.
Many games use Depth of Field & changing Field of View to zoom in on important/relevant targets while blurring out the edges. It seems that this is not going to be of much use when working in VR. Players might create this effect natu…

Unreal Engine Diaries #9

'Shift + F1' can be used to gain mouse control & jump between the different game instance windows during multiplayer testing in the editor.
While working on VR, try to match the size of in game objects to their real life counterparts, as not doing so could make them stand out and reduce the immersion.
In the Material Editor details panel, turn on 'Fully Rough' [prevents reflection rendering pipelines from executing] & turn off 'Light Map Directionality' [both under the the 'Mobile' category] to make materials that are less expensive to render.  This is a pretty good option when dealing with far away objects in the level that do not require a lot of detail. Setting the Shading Model to 'Unlit' can also increase performance in instances where the additional detail is not required.
In PIE mode, press 'Ctrl + Shift + .' to bring up the GPU Profile. It would be a good idea to start looking for elements that cost more than a millisecond.

Unreal Engine Diaries #8

When adding new input parameters to a function that's already being called multiple times throughout the project, it's always better to immediately check every instance of the function call to make sure that the new input parameter is connected as required.
Drag & drop a variable from the variables list onto a get/set node of another variable to automatically replace the second variable with the first.
When attaching moving physics actors to the player character without physics handles, disable it's gravity & set the linear/angular velocities of all of it's components to zero in order to have it simulate physics & collision on the move.
Under default conditions, when a character changes it's direction of movement, it instantaneously turns to face the new direction. To change this behavior and enable smooth rotation based on direction changes, first go to the AI character blueprint >> Character Movement Component >> Enable "Orient Rotation …

Unreal Engine Diaries #7

While working on the Top Down Stealth Toolkit, I noticed that sometimes the character animations that worked in the PIE mode did not work in the Standalone mode. One of the solutions that worked for me was to connect the 'Event Blueprint Update Animations' in all the child anim BPs to their parent update animation events.To find the angle between two rotator variables, it is better not to use normal subtraction to get the difference as this could give odd results in certain scenarios owing to the fact that the rotator values for actor rotation and world rotation follow the (0,180) & (-180,0) range. For example, when you add two positive values, it could produce a negative output and vice versa. In order to work around this situation, the 'Delta (Rotator)' node can be used to get the absolute angular difference between the two rotators.When working on Top Down games, the 'Orient rotation to movement' parameter in the character movement component of the playe…

Unreal Engine Diaries #6

In the editor, you can select actors from the 'World Outliner' panel, right click and select 'Move To' >> 'Create New Folder' to group your actors into a folders. The 'Project World to Screen' function can be used to check if any point in world space lies within the screen space of a player's camera view. Just pass on the said world location and the player controller reference as input parameters and you can get the corresponding screen position data as the output. Break this struct into it's x and y values, then use the 'Get Viewport Size' node to get the actual screen bounds and check it the aforementioned screen position values lie within 0 and the screen bounds values that we just received using the viewport size. If both x and y values lie within this range, then the point is within the visible screen space, else it's outside the camera view.When adding a vector to an actor's world space location to get the vector resu…

Unreal Engine Diaries #5: GPU Profiling & Rendering Optimizations

The 'profilegpu' console command can be used to profile the GPU for a single frame.The 'r.xxxxx ?' command can be used to get the tool tip for the particular rendering command that is being passed on as parameter.Shaders can get really expensive when using World Position Offset and Tessellation. And speaking of World Position Offset, it can be used to manipulate the vertices of a mesh from it's material.If there are lots of skeletal meshes in a game, the 'SkinnedMeshComp Tick' can get expensive. Reducing the number of bones of the skeletons or the complexity of the anim blueprints can help improve the performance in these scenarios. Also if you do not need the animation to update when you can't see the skeletal mesh consider setting the 'Mesh Component Update Flag' in the details panel of skeletal mesh component to 'Only Tick Pose when Rendered'.The 'Smoothed Frame Rate' option in the Project Settings [under General Settings cate…

Unreal Engine Diaries #4

MaterialEditor: In the material editor, we can add the 'Noise' node to display noisy patterns on the surface of a mesh. However it's very expensive and hence best used for prototyping or in rare scenarios where using an actual texture isn't justified.

Material Editor: The 'Particle Position' node can be used to get the location of a particle in space.

AI: The 'Bind Event to ReceiveMoveCompleted' in the AI controller can be used to automatically receive the status of a bot once it has completed it's movement order. It's got different states like success, aborted, blocked, invalid, etc and these can be used to have the AI respond to different situations with different behaviors. But if we have multiple events waiting for it's reply from different places, like say from different tasks in a Behavior Tree, all these bound events will start executing. And that might not be a desirable outcome. So in order to work around such a scenario, it would be …

Unreal Engine Diaries #3

If we're displaying the game over screen as a widget that's added on to the viewport while the game is running, make sure that the game is paused using the 'Set Game Paused' command. Not doing this would mean that the actors in the level are continuously being updated in the background. Now sometimes it's fine to have the enemy actors move around the screen in the background, but even in those scenarios, it'd be a good practice to make sure that any constantly updating game element that's part of the player character/controller are turned off. An easy example to think of would be an actor in the level that is responding to the mouse cursor. So it might move around the screen, even while we're trying to click that restart button.When creating a widget from within a task in a Behavior Tree, it's a good idea to make sure that it's not being called continuously. It's generally better to create widgets outside the task flow, within normal bluepri…

Unreal Engine Diaries #2

Useful Material Editor Hotkeys [Press these keys & click anywhere on the mat editor]: B = Bump Offset; E = Power; I = If condition; O = OneMinus; P = Panner; S = Scalar Parameter; U = Texture Coordinates; V = Vector ParameterIf you change any of the member names of a Struct in the Content Browser, the connections from the aforementioned members in all blueprints will get cut. As a result, you'll have to go around each of these blueprints and manually connect them again. So it helps to actually note down where you need to reconnect before making changes to a Struct.

Also note that in v4.8 of Unreal Engine, these renamed members will have their input pins invisible the next time you check out those structs in your blueprints. In order to make make them visible again, click on the struct >> go to the details panel >> tick the checkbox next to the changed element to see it again. You'll however have to do this for every instance of the said struct.An Unlit material …

Unreal Engine Diaries #1

When you're calling the function 'Get Random Point in Navigable Radius' [see link below], make sure that you store the vector return value inside a variable if you intend to use it in multiple scenarios later down the line. Otherwise, it ends up creating different randomized vectors each time it's used even though you're taking the same return value. It's kind of obvious as those are different function calls, but sometimes in the heat of the battle, it's easy to overlook small things like these.Blackboards can be cleared from within blueprints using the 'Clear Value' function [see link below]. This is especially useful in scenarios where you're dealing with vector blackboards. Setting it to zero in this case is not ideal as it actually represents a location in the game space.  Basic workflow for creating splines: Create a spline component in your blueprint >> Set it's world points by passing in the vector data [see link below] >> …

Unreal Engine DevLog #21: Prototype UMG Menu Update 4.2 [Free Source Code]

Hey, I'm back with another quick update for my Prototype UMG Menu system. This update replaces the placeholder 'Load Game Button' with a working 'Continue Button', that loads the last played level from it's starting point. A new map has been added to demonstrate this feature and you can switch between the maps in-game using '1' and '2' keys. 

The button will be disabled when you first load the project. But once you load any of the levels, you'll notice that the 'Continue Button' will be enabled when you return to your Main Menu for the next time. But for this feature to work in your own custom projects, you will need to add the level names data to a new array in the Game Instance blueprint, and make some changes to the save game settings as shown later on in the post. So let's get down to the details about the changes.
Update 4.2
- Continue Button to load the last played level from the Main Menu - Current Version: 1.4.2 - Optimized fo…

Unreal Engine DevLog #20: Prototype UMG Menu Updates 4 & 4.1 [Free Source Code]

Welcome to yet another update on my Prototype UMG Menu system for Unreal Engine 4. As always, it's free to use for both non-commercial and commercial purposes. No attributes required. You can find the source code at:
The official thread in the Unreal Engine forums:

Anyways, if you're using it for the first time, you can go ahead and grab the source right away. But please do let me know if you encounter any bugs in v4.7.6 or higher. The rest of this post details the changes made in the latest updates. So it's more useful for people who have been using an earlier version of this menu system in their projects already. So now that's out of the way, we'll first get to the changes made as part of the Update 4. 
Update 4
1) Persistent graphics settings across multiple instances: First of all, as promised, this update brings persistent gr…

Unreal Engine DevLog #19: Line of Sight based Visibility

Hi, it's been quite a while since the last dev log on Project Horizon (yes, got changed to a less generic name). I had been working on my FPS Tower Defense Toolkit and some other experimental stuff for a few months. The toolkit has been submitted to Epic Games for Marketplace review and we're done with all the agreements. There has been some delay as I had to convert my project to v4.8 midway and there had been an engine bug that I had to find a workaround for. With the new code submitted, I'm awaiting their response regarding further details.

Meanwhile there had also been some major updates to Knut's Advanced Turn Based Tile Toolkit, which makes it much more optimized and well structured than before. So rather than integrate all those changes into my project, it was much easier to transfer my code into his updated toolkit. And that took a while to implement and finally it was time to add some exciting new features to the project. First in line, was Line of Sight based …

The Precursors

I've been going through my Dropbox files to delete old unnecessary files and came across some of my first projects. They were all created using Unreal Development Kit and Blender and most were abandoned at some point. Just thought I'd put up some of the final screenshots here:

Helm's Deep and the Fortress of Hornburg

Temple Ruins

Castle on the Mountain

Unreal Engine DevLog #18: Prototype UMG Menu Update 3 [Free Source Code]

It's been quite a while since my previous post. I had been busy working on my FPS Tower Defense Toolkit for the Unreal Engine marketplace. It was submitted for initial review couple of weeks back, but then v4.8 came out and a certain engine bug in v4.8 prevents it from running one of the core functionalities in the toolkit. So I would have to wait until a fix arrives for it in one of the future updates. Anyways if you guys want to check it out, here's a video link to the preview:

EDIT: The FPS Tower Defense Toolkit is now available in the Unreal Engine Marketplace for $29.99: Meanwhile, I had made some improvements to my Prototype UMG Menu while working on a freelance job. Just updated the first set of those changes to the Github source. Here are the major changes in Update 3: General Optimizations for Pause Menu and Video Settings workflowBug Fix for loading screen freeze Bug Fix for Video Options scrollbars po…

Unreal Engine DevLog #17: Prototype UMG Menu Update 2 [Free Source Code]

The Prototype UMG Menu system is getting another update. Unlike the previous one, this is kind of a minor update focused on patching up some bugs and code optimizations. Keeping with the tradition established by Update 1, screenshots are provided to show the changes made to the code. This should help smooth out the transition to this update. Before we go to the matter at hand, here are the links to the previous posts and the thread in the Unreal Engine forums:

Unreal Engine DevLog #15: Basic Menu Interface using Unreal Motion Graphics

Unreal Engine DevLog #16: Prototype UMG Menu Update 1 [Free Source Code]

And here's a video demonstration of the menu system:

Changes in Update 2:

1) Fixed a bug that disabled removing pause menu through keyboard input.
2) Code and design optimizations for Scrollbar buttons in the video settings.
3) Supported resolutions now taken from the …

Unreal Engine DevLog #16: Prototype UMG Menu Update 1 [Free Source Code]

About a month back, I released the source code for my prototype UMG menu in GitHub. The menu was basically intended to be a prototype that I could use on all my projects from the get go. So once I got the menu system set up and running, I had not worked on it apart for a couple of minor bug fixes. Since I got some free time this week, I decided to improve the menu system and fix some issues with it that has been bugging for the past few weeks. The idea of this post is to provide some sort of documentation related to the changes that had been included in this first major update for the menu.

For those of you who haven't seen the previous update, here's a video demonstrating the menu system in action:

And here are the links to the previous blog post and the thread in Unreal Engine forums:

Unreal Engine DevLog #15: Basic Menu Interface using Unreal Motion Graphics

Unreal Engine DevLog #15: Prototype UMG Menu [Free Source Code]

Hi, welcome back for another update. I've been working on a prototype menu system for my game using Unreal Motion Graphics (UMG). My aim was to create a basic menu interface with the following features:

1) Main Menu
2) Options Menu
3) Video Options Menu
4) Loading Screen
5) Game Screen
6) In-Game Menu

As I said, this is a prototype menu system. My main intention was to get an idea of how to put together a menu system using UMG. And to that end, I found this tutorial series very helpful for understanding UMG and it's features:

Youtube: Horus Heretic's UMG tutorials

Once I had a basic menu system, Zoombapup's Menu Flow tutorials helped a lot in creating a standardized workflow:

Youtube: Zoombapup's Menu Flow Tutorials

So moving on to the updates, I'll briefly explain the main features that I've implemented:

Main Menu

Well the main menu includes the following working functionalities at the moment:

1) New Game Button 
2) An options menu
3) Exit to Desktop button

I'm u…

Unreal Engine 4 Dev Update #14: Real Time Grid Generation & Unit Attribute Effects

Hi, I'm back with another update. The project went through a major design change with this iteration. As I had mentioned many times before, the design of my game was heavily inspired by XCOM: Enemy Unknown since the beginning. Maybe it was because of the fact that I was playing it in my iPad right around the time I started messing with Unreal Engine 4. The fact that it was one of the few mobile games that I really liked might have contributed to it as well. Anyways, anyone who has been following my blog would have already noticed that my design and gameplay decisions were mainly based on the iOS version. Recently, I tried out the PC version of XCOM. I really like it, some parts better than the iOS version, while some not so much. Playing the iOS version first probably  was the culprit, but I saw certain design elements that just felt right in that version. Like how there was a command prompt before issuing movement commands, instead of the real time movement command in the PC vers…