Swords and Shields
Awesome starters artwork by Ry Spirit: https://instagram.com/ryspiritart/

Calculating EVs needed to raise a stat in Pokémon

As a result of working on upgrades for this Pokémon Effort Value Calculator, math has been a pretty big part of my life for the past few months, as I’ve been rearranging the games’ formulas for stat and damage calculation to make my own that fit my needs.

One such formula was the EVs needed one, which gives you the amount of EVs you need to invest to raise a stat by n points. Everyone knows that at Level 100, you get 1 stat point for every 4 EV points you invest; but what happens when you’re not at Level 100, or when you factor in stat modifiers like Nature, or item and ability boosts?

Don’t know what effort values are? Start with this article from Bulbapedia. Don’t play the mainline Pokémon games? Then you should start with these.

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 for Unity - Part 1

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

This article is a part of the series:
Using GitHub Desktop for Unity collaboration

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
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
Collision Detection Modes in Unity

Collision detection modes in Unity’s Rigidbody component

Update (14 August 2020): Looking for an article on the Interpolate property on Unity Rigidbodies? We’ve put one together recently, so have a look here.

It isn’t particularly difficult to set up physics-based movement for objects in Unity — simply add a Rigidbody component onto an object that has a Collider component, and you’ll have yourself an object that moves and collides realistically with other objects.

Discrete collision
This was set up in 10 minutes.

If you start having fast-moving objects however, you might start to see these objects tunnel through obstacles.

Discrete collision tunnelling
Just like quantum physics. Sort of.
Continue reading
Coding your projectile arc

Coding projectiles for your tower defense game — Part 2

This article is a part of the series:
Coding projectiles for your tower defense

In the second part of this series, we will be exploring how to give our projectiles a nice vertical arc as they travel towards the target. This article will expand upon the work in Part 1, where we coded a projectile that could home in onto the target and detect collision with the target without using Unity’s physics engine’s.

Continue reading
Homing projectiles

Coding projectiles for your tower defense game

This article is a part of the series:
Coding projectiles for your tower defense

If you’re developing a tower defense game, one of the first questions you are going to be dealing with is this: how do you make the projectiles that your towers fire hit their targets? After all, these fired projectiles take time to reach their targets – targets that are constantly moving. Sometimes, by the time a projectile gets to where it was aiming at, their targets would’ve sometimes moved out of the way.

Continue reading