Troubleshooting PHP gettext

Debugging PHP gettext

Over the last couple of weeks, I’ve been tinkering with PHP’s gettext to set up internationalisation for one of my web apps (i.e. getting it ready for translation into different languages). Even though there were many step-by-step guides and Stack Overflow topics on the web, all detailing a similar set of instructions, following them did not work things out for me.

After some frustration and a lot of time tinkering, it turns out that these guides were missing some pieces of information. If you are tearing your hair out troubleshooting PHP gettext, this article might be just what you’re looking for.

Continue reading
Unity Rigidbody Interpolation Hero

Unity Rigidbody’s Interpolate property

If you looked at the properties available for configuration on a Unity Rigidbody and poured through the documentation for it, you’ll likely find that most of its properties are pretty easily to understand, with the exception of Interpolate and Collision Detection. We’ve explored what the Collision Detection properties do in another article on this blog, and we’re going to explore the Interpolate property in this article.

Unity Rigidbody's Interpolate
The Interpolate property has 3 possible values.
Continue reading
Apoca Force WAIFUs

Showing Unity’s NavMesh in-game

As part of a school assignment in the past year, my team and I created Apoca Force, a tower defense game where WAIFUs (World Apocalypse Intercepting Frontline Units) are deployed onto a battlefield to combat an undead horde. In this game, WAIFUs serve as the eponymous towers of the genre, but with a twist — by spending some resource, they can be moved after they are deployed.

To denote the areas that WAIFUs can walk on, we created an interface that highlighted walkable areas on the map when players decide to move their WAIFUs. This is what we ended up with:

Enjoyed this article? Then check out this other article about how we drew stat graphs for our WAIFUs on our UI interface.

Continue reading
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

Content begins after the advertisement:


Organising your Unity Inspector fields with a dropdown filter
Screenshot from video game Dust to Dust. More information in the article.

Organising your Unity Inspector fields with a dropdown filter

Over the past 4 months, my team and I have been working on a rogue-like hack-and-slash game for our school’s final year project called Dust to Dust. We have very high ambitions for the game, and we had never worked on projects as large of a scale as this. Of course, by doing that, the challenges we encountered got bigger as well. We had to keep track of many parameters in developing a role-playing video game, and quickly realised that the time taken to find Inspector properties in the project was getting longer and longer. Furthermore, the project was on a 15-week timeline, so every minute was valuable.

Hence, we needed an effective solution that would ease navigation in the project, and — like before — it became clear that we had to once again extend the Unity Editor to suit our needs.

Continue reading
reCAPTCHA Meerkats
Image by Mike Birdy, from https://stocksnap.io/photo/animals-mammals-VJ91Z8LULN

Verifying Google reCAPTCHA v2 checkbox on PHP

17 July 2020: Updated the class provided in this article to make it easier to use.

For those of you using Google reCAPTCHA to weed out spam on your websites, here’s a code snippet for verifying the reCAPTCHA v2 tickbox response on the server-side using PHP.

Continue reading
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

Content begins after the advertisement:


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