Home » Category: Game Coding

Post Mortem – Wizard Tower Defence

This post was rescued from my drafts in July 2018 and backdated to its current published date.Wizard Tower Defence is available on itch.io, free for Windows (and probably also Linux and OSX, but I daren’t say so because I haven’t tested that).This post is a retrospective for the game. At some point I should separately Continue Reading

The Wrong Null!

tl;dr: You can check whether a Unity.Object (including Component, GameObject, MonoBehaviour, etc.) is null using if (variableName), because it has an implicit bool operator that checks != null. If you’re trying to expose generic-typed properties in the inspector, you should constrain them with where T : Component or similar, or strange things may happen when Continue Reading

Unity Object Pooling

Object pooling is pretty simple, and I was put off a lot of existing guides and examples by what seemed like unnecessary complexity. Since then my own solution has probably got at least as complicated, but I’ll explain as I go; your mileage my vary.

Unity Troubleshooting II

Some more Unity 3D tips that I need to write down while I remember them. (You might be interested in the previous ones.) TL;DR: Don’t forget to use Time.deltaTime for per-second change. Content Size Fitters update late, so read their properties at end of frame.