Line of Sight/Fog of War, an effect where the player can only observe a part of the game world, is a common technique that is usually applied to top-down games of various genres such as MOBA (DotA or LoL), RTS (Age of Empires series) or even a few RPG titles. I've been struggling to find a proper and easy to follow Line of Sight/Fog of War tutorial for UE4 for a while, but I can't find one. So today, one of the last days of 2017, I decided to make one by myself. It's a nice way to end a year, isn't it?
One of the first things that I learned when I started to work with Unity is its tag system. It is very easy to understand as it is based on a concept of categorizing game objects into groups. Each game object belongs to a single group. Unity provides a convenient mechanism for checking whether a game object belongs to a group or not. You can also find a game object, or all game objects, of a group.
But the system does have a flaw. You cannot assign two or more "tags" to a game object, and this is quite annoying. For example, your bullets already had the "Bullet" tag, but you cannot tell who owns each one of those bullets, the player or the enemy thief. In this post, I offer a solution as a replacement for Unity tag system.
With game programmers, optimization and performance are interesting things to discuss. We all love to squeeze our hardware as much as possible, to achieve more stunning graphics, more attracting gameplay, with the best performance (damn that's greedy). Object Pool is one of the common technique of optimizing game performance, and today I'll show you my object pool implementation. It's simple, easy to do and most of all, its real-life use is very close to Unity's mechanism of creating and destroying objects.
In my previous post, I discussed the State pattern. This is a pattern that helps you to delegate and wrap functionalities into state objects. While it allows you to get rid of annoying and complicated if-else statements, it also is a good way to make your code more modular and decoupled, because state classes know very little of each other.
Event and delegate are a great duo. Together they would help you eliminating the headache of scrolling through branch statements, improving your code's readability. It is so helpful that Java's core library has an implementation for
Observable. C# even takes a step further, as there is an
event keyword baked right into the language itself. In this post I'm gonna make a simple event and delegate system in C++.
Today at work, I was assigned a task of implementing a button - it seems to be a trivial task. There is an interesting point of this button, though. It reacts differently in different situations, that's why I call this button "multi-function". Continue reading Create a multi-function button in Unity using State Design Pattern
Linux, in my opinion, is a great operating system. It respects your choice as a user so that you can choose whatever application you want for any of your needs. Actually, I believe the "free" word in things that people keep talking about Linux is free of choice, not free of cost since there are many applications that you need to buy in order to use them. Continue reading How to get rid of screen tearing in Linux
In the previous part, I described why do you need and what on earth is a version control system (VCS). In case that you are not familiar with VCSes, I introduced a bunch of useful terms and common concepts that would form a general idea for you about them. This part is all about comparing two VCSes of different models, so hopefully, you did play around with a VCS as I asked - real life experience is always helpful, after all. Continue reading Choosing a version control system: git vs SVN, part 2
Have you ever been in a situation where you feel that your product reached a pretty solid and stable stage? Everything ran smoothly just fine. You were the happiest person in the world. Continue reading Choosing a version control system: git vs SVN, part 1
Hi there, Unity developers!
As you work with Unity Editor, you use the Inspector window pretty frequently. From here, you can do many things in order to have your Unity game works as intended, such as modifying graphics quality, increasing the value of gravity, or changing a texture's import settings. But I believe most of us spend most of our time with Inspector window to tweak our
GameObjects and their values. For programmers, in Unity 101 lessons, we learned that a
public attribute would show up in the Inspector window.
However, making an attribute
public is not always healthy for your code... Continue reading Unity's [SerializeField] demystified