1. C# Properties

    This subject is related to encapsulation principle, you can find more about it here.


  2. Unity Achievements System Tutorial Pt.3

    Previous Part


  3. Unity Achievements System Tutorial Pt.2

    Previous Part


  4. Unity Achievements System Tutorial

    In this series of tutorials I will demonstrate how to create a modularized system of achievements. In this part I will show you how to use Coroutines to create linear movement and wait method. For messaging  between object I’ll use EventManager. You can read more about those topics if you are not familiar with it. …


  5. Unity EventManager

    This is one of the most useful concepts I use in my games. It’s good to implement it in early stage of prototyping. It will make your code look cleaner and increase the performance of the project. I encourage you to read the posts about events and dictionary before moving to this topic, if you are not familiar with those concepts it may be confusing for you. …


  6. Unity Linear Interpolation

    Linear interpolation has many uses. I’ll try to cover the most  useful ones. This paragraph may be confusing, but everything will be explained in details later. Important thing to point out at the beginning, online tutorial tend to have two different approaches to this subject. First, like in official video, shows example of Lerp() function which is not linear. Another approach is to use percentage as time parameter. Lerp() can be used together with Vector3 and Math class. It’s common to use Math.Lerp() to change parameters like light intensity, colour or sprite transparency. While Vector3 is responsible for 3d movement. Lets start with example of changing light intensity in non linear way using Lerp()function.

    Math.Lerp()

    The Mathf.Lerp function takes 3 float parameters: one representing the value to interpolate from; another representing the value to interpolate to and a final float representing how far to interpolate. In this case, the interpolation value is 0.5 which means 50%.
    float result = Mathf.Lerp (0f, 8f, 0.5f);
    This one returns 4, (0+8)*0.5. …


  7. Unity Coroutines

    Using Coroutines is a great way of improving the performance of the game. This way we can avoid using Update() by calling the selected  method exactly when we want it, and stop it after execution. This way we don’t have to perform check operations in Update() method every frame, what’s slowing down the performance. Even the simplest check performed on multiple objects can slow have significant impact on the game frame rate, especially on mobile devices. …


  8. C# IEnumerable Interface

    IEnumerable is the implementation of the iterator pattern and is used to give the ability to iterate a class without knowing its internal structure. This Interface exposes the enumerator, which supports a simple iteration over a collection of a specified type. When a class implements IEnumerable, it can be enumerated. This means you can use a foreach block to iterate over that type. In C# all collections implements this interface. …


  9. C# Yield Return

    Yield return key-phrase that is used to return a value of the collection instead of  returning the full list. It can be explained with example of watching a video. Yield is like streaming the video, while typical implementation is like downloading it. This phrase interacts with foreach loop, it iterates through collection of items, returns an item and gets called over and over again, but each time it resumes execution where it left off. It’s easier to read, and can have better performance than typical implementation. …


  10. C# Bit Array

    This is the last post of .Net collections series. You can find my last post about queues here.