glowing shader article splash

Writing a Unity Shader script for a glowing material — A deeper look

Subtle background animations always help to set the mood of the game. It might only be something simple as a slowly pulsing glow, but it adds to the ambience of the digital city that Terminus is set in.

This article takes a deeper look into some parts of my animated shader tutorial on Youtube, where I went through the creation of a shader used in one of my team’s recent projects.

  1. SubShader tags
    1. Queue
    2. RenderType
  2. Vertex and fragment
  3. Time
  4. Emission formula
Continue reading
What to do when gitignore doesn't work

How to fix .gitignore not working on your repository

If you’re using a Git-based source control, you might be familiar with the use of a .gitignore file to list files which Git is supposed to ignore when tracking files and making commits. This can be particularly useful when using Git (if you’re using GitHub Desktop, you’re also using Git) as a source control tool for projects that generate temporary or user-specific files at every run, such as Unity, as these files cannot be shared across different users of the project.

User-generated files in Unity
User-generated files in Unity that don’t need to be tracked by Git.

Sometimes, when setting up the repository, because of a .gitignore that is not properly set up, files that you intend to be ignored can actually get committed into the repository. If that happens, retroactively applying the .gitignore list will not help.

Continue reading
Creating a Farming RPG in Unity - Part 11: Saving Farmland Data

Creating a Farming RPG (like Harvest Moon) in Unity — Part 11: Saving Farmland Data

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 11 of our guide here, where we go through how to save our farmland’s data. You can also find Part 10 of our guide here, where we went through how to set up scene transitions.

A link to a package containing the project files up to Part 10 of this tutorial series can also be found at the end of this article, exclusive to Patreon supporters only.

Continue reading
For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.

Bitnami phpMyAdmin: For security reasons, this URL is only accessible using localhost

If you’re running a Bitnami LAMP stack for your web server, you will be glad to find that it comes with phpMyAdmin — an indispensible tool for managing your server’s SQL server. If you try to access said SQL server (the default URL is at yourdomain.com/phpmyadmin), however, you will find an error message that goes like this:

Continue reading
Creating a Farming RPG in Unity - Part 10

Creating a Farming RPG (like Harvest Moon) in Unity — Part 10: Scene Transitions

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 10 of our guide here, where we go through how to set up scene transitions. You can also find Part 9 of our guide here, where we went through how to improve on our current Inventory system.

A link to a package containing the project files up to Part 10 of this tutorial series can also be found at the end of this article, exclusive to Patreon supporters only.

Continue reading
Creating a Farming RPG (like Harvest Moon) in Unity — Part 9: Improving on the Inventory System

Creating a Farming RPG (like Harvest Moon) in Unity — Part 9: Improving on the Inventory System

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 9 of our guide here, where we go through how to improve on our current Inventory system. You can also find Part 8 of our guide here, where we went through how to make crops that can be harvested multiple times.

A link to a package containing the project files up to Part 9 of this tutorial series can also be found at the end of this article, exclusive to Patreon supporters only.

Continue reading
A primer on Base 64 strings — Part 1

A primer on Base 64 strings — Part 1: Introduction

If you have been around the web for awhile, you will notice that sometimes, you will find a series of gibberish alphabets appearing, most often in your browser address bar as part of a website’s URL:

The blue highlighted portions in the GIF above are the aforementioned gibberish alphabets.

These are Base 64 characters, and a large portion of the web uses these characters for a multitude of purposes.

Continue reading
Finding which is the shorter 2D angle

Calculating the shorter angle of rotation in 2D

Here’s a really simple math problem in 2D games development that has a surprisingly complex solution. If I were to give you angles a and b, how would you calculate 1) the direction — that is, clockwise being positive; and anti-clockwise being negative — and 2) magnitude of the shorter angle of rotation from a to b?

Main angle question
We want the angle in green.

When you visualise it, both values seem so obvious; which was why I was so surprised I couldn’t figure it out. On the surface, it seems really simple — if you just take b – a, doesn’t it give you the solution?

Continue reading