@djlink I fucking hate this too. It's not just stupid design, this is blatant asshole design. They want to try any and all tricks to have you accept tracking cookies.

How (and why) I'm rewriting Unity documentation

Oliver Oliver • Updated 10 months ago

Taking a stab at redesigning something that is long overdue.

Read more...


Shorter code ≠ better code

Oliver Oliver • Updated one year ago

There's an interesting post about how clever code is bad. It outlines some bad practices, and some good ones to use in their stead, such as the snippet:

// bad
while (*d++ = *s++);

// good
strcpy(destination, source);

But I'm here to hammer that point home and show to you that shorter code can, and often does, perform a lot worse than a readable alternative.

Read more...


Designing a modular Discord bot framework

Oliver Oliver • Updated 2 months ago

Update 8 August 2023

While I am extremely proud of this solution, I ultimately decided against it and settled on separating the bots as containerised services. Nevertheless, the solution here is still valid and useful for a variety of situations, and so I'm leaving this post up in the hopes that you or someone you know will find it useful.

For the better part of the past month or so, I've been rewriting the bot(s) which power the official Brackeys Community Discord server. This post isn't so much a guide, as it is a vent. A window into my process of dealing with the ever-growing enterprise-level codebase I've signed myself up for, and the hurdles I've faced. Enjoy.

Read more...


State machines, a state of mind

Jade Jade • Published 2 years ago

Guest Post

This post was written by a guest contributor. As such, the advice presented here may or may not conflict with advice I've given in other posts, nor may it reflect my own personal opinions on the subject at hand.

Hello, You can call me Jade! I'm a programmer/game developer and I primarily work in the Unity game engine. I love state machines and I've made more than my fair share of them. In fact I'm relatively well known at this point for turning just about everything into a state machine!

In this guide I'm going to be teaching you about the basics of State Machines and how to get started with them!

Welcome to a madman's guide on the basics of State Machines.

Read more...


The pitfalls of C#

Oliver Oliver • Updated 2 years ago

If you've ever heard me talk about programming in any regard, you'll likely be aware that I simp for C#. I have never met any other language that lets me develop at the speed I'm able to. It is hands down my favourite language and I will challenge anyone who tries to change my mind.

But that doesn't mean it's perfect. C#, much like every other language, has its drawbacks. I'm going to talk about some of the features that I've stumbled across in other languages that accomplish some goal better than C#.

Read more...


MonoBehaviours DO support constructors

Oliver Oliver • Updated 2 years ago

Quite often, I come across people who are under the impression that a class which inherits MonoBehaviour cannot or should not define a constructor. If you are one of those people then buckle up. I'm going to dispel this myth once and for all.

Read more...


You're exposing state badly

Oliver Oliver • Updated 2 years ago

Every now and then - okay… pretty much every day - I encounter someone who has decided to publicly expose state with fields, and it hurts my core.

Let's talk about that.

Read more...


Unity lies to you about null

Oliver Oliver • Updated 2 years ago

What is the difference between component == null, component is null, and !component?

Read more...


C# 10 and the dangers of file-scoped namespaces

Oliver Oliver • Updated 2 years ago

Today I'll be stepping away from a Unity environment and focusing on one of the new features available in C#, and a very important note to keep in mind when using it. That is, the dangers of file-scoped namespaces.

Read more...


How I recreated Unity's coroutine system

Oliver Oliver • Updated 2 years ago

Early last year, I wrote a blog post which explained how Unity's coroutines work. In my conclusion, I expressed that I underestimated the level of wizardry they involved, so much so that it went far beyond the scope of the article. I figured it was time to perhaps elaborate on that, and show you a glimpse of Unity's game loop and how the coroutine system works in the engine (at least, my interpretation of it.)

Read more...