Skip to main content

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 version. And that thought inspired me to align my design direction in a way, that I felt would be able to incorporate the best of both versions. It finally resulted in me creating some backups, making some logic changes, stumbling upon some issues, again making some changes and finally writing this blog post. So without further ado, I present to you the next update:

Real Time Grid Generation

Before getting into the details, I'll just show you a screenshot of what it looks like in-game. It'll make it a lot easier to understand for those who haven't played XCOM.

As you see here, I have now replaced the localized grid system (active grid with all the adjacent valid grids) with a singular grid system. Now this obviously provides less details, if I were to show the cover data. But the current design, being real time offers faster data interpretation compared to the earlier model. So you can just move the grid around instead of clicking on any particular location to get the data. I now understand why the developers Of XCOM decided to use the localized touch event based grid generation for the mobiles. In order to negate the lack of real time grid generation, they decided to present more data to the player in one go. I still have the old system ready, just in case, I want to try it out in mobile devices later. 

Anyways, getting back to the update, the command issuing works similar to what it was earlier. As in, you need to click somewhere, then issue the move command in order to move the unit. I decided to keep it because, a real time movement command sometimes feels too quick when compared to the pace of the rest of the game. When playing the PC version of XCOM, I came across situations where I wanted to assess the situation based on my command order. Having the grid anchored to any particular space then gave me the freedom to see the whole game space from multiple angles before making my decision. I've also added the option to cancel the order so that the player can check out other options before proceeding any further. My final inference is that the game feels a lot smoother now. Here's a video to showcase the new grid generation system:

Fire Action Points

In an earlier update, I had talked about my implementation of movement action points. I've just extended that to include Fire commands as well. Unlike the movement commands, issuing a fire command does not subtract a certain value from the action points pool. It just directly reduces it to zero, meaning that's going to be the last thing that particular unit will do in the said turn. I have not explicitly stated it in the video, but you can see it in action in the video above.

Unit Attribute Effects

Again as mentioned in a previous post, I had added three basic sets of unit attributes: Aim, Health & Movement Points/Dodge Chance. And back then only the health actually mattered as far as the gameplay was concerned. Now I factor in all these attributes in, when I make gameplay calculations. The 'Chance to Hit' an enemy unit is now based on probability. A unit with higher aim has an advantage in that matter. A unit with higher HP can stay longer in combat. A unit with more movement points can tread longer distances in any one turn. And finally a unit with increased dodge chance has a reduced chance of being hit when it is fired upon. All mainly theoretical stuff, hence not much to show in terms of gameplay at this point.

And with that, another update comes to an end. The next update will be about the menu that I created with Unreal Motion Graphics (UMG). Until then, you can check out my Youtube channel (link below) for more updates. Feel free to like/subscribe if you're interested in the development of my game. Thanks for your time, and have a nice day.

Stormrage256' Youtube Channel

Popular posts from this blog

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:]

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…

Unreal Engine 4 Tutorial: Smooth Zoom using Mouse Wheel for Top Down Template

Well, I had already written a tutorial for implementing Smooth Zoom functionality for Top Down Template. But it was based on keyboard inputs. Since most Top Down PC games use mouse wheel for zoom, I decided to make a tutorial for the same. The core logic here is the same as the one implemented by Ryan Jon for the custom camera in his RTS Community Project. If anyone's interested, they can get the code for the RTS Community Project here:

UE4 RTS Community Project

Anyways, he has replaced the default camera for the characters with a general camera since that's more ideal for developing an RTS game. Since a basic Top Down game with a single playable character does not need a separate custom camera, I decided to implement the same functionality for the default player camera in UE4's Top Down Template. So let's get down to it.

First of all we need to make a custom curve from the content browser. We will be using this curve to define the smooth camera movement while zooming …