Object construction with factory method

factory method in unity3d
How to structure your code to produce loads of objects? Learn the Factory Method and how to implement it in Unity3d! One of the most common things to do in making a game is instantiating objects at runtime. Be it bullets from a gun, enemies rushing forward or instances of ...
Read more

The singleton follow-up – a deeper look into singletons in unity3d

This post it’s a bit different than usual. This is not just a tutorial but rather “the talk”… or a grownup discussion depending on your degree of advancement. And yeah, for some of you it’s going to be like “Look kiddo, I’ve been doing this shit long before you even saw ...
Read more

The singleton post – making a Singleton in Unity3d with inheritance

singleton unity3d inheritance
You already know what a singleton is? See how to do it by inheriting from a SingletonBehaviour<T>, skip to “How to singleton” Sometimes when programming you are just reinventing the wheel. And by sometimes I mean all the time. Basically every problem a programmer faces is an already solved problem ...
Read more

Pooling in unity3d – a simple tutorial

We’ve been through it: instantiations at runtime can be a huge problem. It can cause a spike in the workload of any game, and then you have to find ways to fix that when it happens. Or you can use a technique called pooling, like pros do. What’s pooling in ...
Read more

C# Garbageless List – a 0-garbage optimization for my event dispatcher

garbageless list unity3d c sharp
Part 1: basics event system Part 2: event picker drawer for in-editor usage Part 3: debugging with platform dependant compilation Part 4: multiple dispatchers Part 5: optimization [you are here] This time you get to see the final form! As we’ve anticipated last week, there’s a problem with my implementation ...
Read more

Input management with Dependency Injection

dependency injection in Input for unity3d
Object oriented programming has a lot of patterns that can be very useful for making games. One of those patterns is the Dependency Injection, a pattern that helps to decouple classes that would otherwise be tightly connected. So let’s take something that’s really connected and see how dependency injection can ...
Read more
Pasquale Franzese
game developer
I’m an hard-core gamer who learned to type before learning how to hold a pen in his hands; started playing with lode runner and never stopped. Now I develop my own games. Mail me at pasquale.franzese@brightreasongames.com