RAM in Black
Image by Tim Sullivan, from https://stocksnap.io/photo/computer-ram-IN0CFPMXAQ

RAM, explained in English

RAM stands for Random-Access Memory, but that is something that you can find out just by doing a quick Google search. If you read the results of said Google search to understand what it is, you’ll start running into jargon that can be difficult to understand for a layperson. Here are some examples:

…a form of computer memory that can be read and changed in any order, typically used to store working data and machine code

Wikipedia: https://en.wikipedia.org/wiki/Random-access_memory

…temporary storage that goes away when the power turns off

Avast: https://www.avast.com/c-what-is-ram-memory

…is used to load and run applications, such as your spreadsheet program, respond to commands, such as any edits you made in the spreadsheet, or toggle between multiple programs, such as when you left the spreadsheet to check email

Crucial.com: https://www.crucial.com/articles/about-memory/support-what-does-computer-memory-do

These are not bad examples, per se, but if you don’t work with computers a lot, these explanations will seem very abstract. What does working data mean, for example; or why is RAM temporary storage (why not just make it permanent)?

Continue reading
Getting Unity Remote for Android to work

Getting Unity Remote for Android to work on Windows

If you’re developing a game for Android on Unity, Unity Remote is an irreplaceable tool that allows you to quickly test your game on your Android device using Unity’s built-in Play-in-Editor feature. Unfortunately, it can also be pretty difficult to get Unity Remote to work, since it requires some very specific configurations on both your Android device and your computer.

Available solutions online are often incomplete, inaccurate, or outdated (Unity Remote was released more than 4 years ago, and the Android development scene is very different from how it was then), so you often have to piece solutions from multiple sources to get one that works. After grappling for hours to get Unity Remote working on multiple computers (and a lot of frustration), I’ve decided to write a set of articles to save you the same frustration. Hopefully, this will save you from 9000 Google searches and a damaged keyboard.

Continue reading
GitHub Desktop
Image from https://desktop.github.com/

GitHub Desktop for Unity — Part 1: Setting up your source control repository

If you’re working on a Unity project with the free Unity license, you’re only allowed to have a maximum of 3 people (and a storage limit of 1GB) on Unity Collaborate Plastic SCM. While you can work around the headcount limitation by adding and removing members when needed, it can be quite a hassle. Hence, for those without a budget for a paid Unity plan, a cheap and easy way to go around both the personnel and storage limit is to use GitHub Desktop for collaboration.

Continue reading

Content begins after the advertisement:


Ex-Terminator

Creating Reorderable Lists in the Unity Inspector

Update: Like this article? Then check out this other article on creating a dropdown filter for the Unity Inspector.

Over the last 5 months or so, me and my team have been involved in the development of a hybrid tower defense and RTS game called Ex-Terminator (click on the link to try it out, it’s free!) as part of a school project. During the course of developing the game, we quickly realised that, in order to allow us to have the flexibility to experiment with our level design, we had to experiment with a class in Unity called the ReorderableList.

If you’ve read some of the other articles here, you’d have noticed that we normally link Unity classes to its page on the Unity Scripting Reference. We didn’t do so here because there is no official documentation for it at the time this article was written. The ReorderableList class is filed under the namespace of UnityEditorInternal, which also doesn’t have official documentation. We’ve decided to write an article about it, however, because of how useful it is, and because of how little information there is currently about it online.

Continue reading
Debugging with Beverage

Fixing an Apache cron log rotation error

If you manage a Unix-like server, every now and then, you might get an email from the server notifying you of important errors that occur in your server. Here’s one that I got earlier today from an Ubuntu 18.04 server of mine:

Cron <root@terresquall> test -x /usr/sbin/anacron || ( cd / && run-parts –report /etc/cron.daily )

/etc/cron.daily/logrotate:
error: error running shared postrotate script for ‘/var/log/apache2/*.log ‘
run-parts: /etc/cron.daily/logrotate exited with return code 1

Mail sent at 06:39

It’s never fun to receive server admin emails like this, because it means that your server has issues, but the message tends to be really ambiguous, so it’s really hard to figure out what the issue is. Obviously, I didn’t know what the issues were, so I had to do some research.

Continue reading
Unity Editor Scene view

Checking the type of GameObject you are colliding with in Unity

In any given game, you are probably going to find dozens, if not hundreds of different objects colliding or intersecting with one another. Hence, one of the first things you learn in Unity is how to identify the type of object you have touched. These are the most common ways to do so among beginners:

void OnTriggerEnter(Collider other) {
     // If a GameObject has an "Enemy" tag, remove him. 
    if(other.tag == "Enemy") {
        Destroy(other.gameObject);
    }
}
void OnCollisionEnter(Collision collisionData) {
    // If a GameObject has an "Enemy" tag, remove him.
    if(collisionData.collider.tag == "Enemy") {
        Destroy(other.gameObject);
    }
} 

Essentially, the idea is checking whether the object we are colliding with or touching has been labelled with an Enemy tag, before we perform any action on the object.

Where tags are assigned.
Image source: Unity Manual: Tags

While it is simple and easy-to-understand, there are better ways of identifying objects we are colliding with.

Continue reading

Content begins after the advertisement:


2D vector math hero - polar movement

Vector math for polar movement in 2D games (Unity)

Polar movement, i.e. moving objects at an angle, is something that people starting out in games programming often have trouble with. Coordinate systems are easy to understand, and so is moving things left and right or up and down; but what if you want to move at angles that are not parallel to an axis, like 30° upwards, or towards a target? How do you get a vector that represents that direction of movement?

Continue reading
Emission lighting in Unity

Getting your emission maps to work in Unity

Emission maps (also known as emissive maps) are textures that can be applied to materials to make certain parts of an object emit light (like the cube in the image above). In Unity, lights from emission maps don’t start affecting the scene as soon as you place them on the material. There are a lot of settings you have to get right in your scene and material settings to get the emission maps working right.

Continue reading