Why I chose Unity for Game Development

Published

Check out our Article on Game Engine Licence Costs to help you choose which Game Engine to Use!

There are multiple Game Engines on the market today, and it can be tough to decide which one to start with. So why did I end up choosing Unity? Here are a few reasons why.

Do As You Like

Today I am making a 2D tactical game for mobile. Tomorrow, maybe I’ll be working on an FPS to play on my laptop. Who knows? But what I do know is that I like my tools to be versatile.

As such, Unity is great in that it supports compilation to a variety of platforms with litteraly 0 effort on the developper’s side. It also gives all the utilities one might need for 2D or 3D development, or less frequent variants (2.5D, hex-tiles-based grids…).

This means an unified interface for all your game development needs. This means less time to spend learning, and more time to make fun games!

Programming Language

When making a game, there is obviously a lot of code to be written.

It is therefore very important that the game engine you decide to use has a scripting language that fits you well.

In this case I liked C# for its typing, its convenient import system as well as its support of method overloading and its automatic garbage collection.

I believed that a type system was important both to unlock performance, which is really critical for a game, but also to have a better feeling of how your code is meant to flow. This is something that can be accutely felt when coding in a dynamic language like python where, if you are not using any typing indications, it can be hard to remember which datatype is being used in a function.

As such, Unity was a great fit language-wise, and I can’t say I have been disappointed.

Timing

At the time I started using Unity, they were releasing great new features which were still in active development but seemed very promising for the future.

The first one was the ShaderGraph. It gives an intuitive graphic interface to creating Shaders for your game, similar to what was already available on Unreal Engine. This was great because it allows a developer to create his own custom graphical effects, helped with a in-development visualisation, while not having to learn the specific language of shaders, which has its own restriction compared to other languages (for example, don’t use conditional branching in you shader code!).

Shader Graph Example
Look Ma'! No Code for my Shader!

The second one was the Entity-Component-System (or ECS for short). This is a data-centric approach which allows for amazing performance by allowing by default optimization of access to memory and resources of the player’s hardware. The Megacity demo is a great showcase of the power of this system and is quite impressive. It also enables a clear seperation of concerns when developping the game as well as increased modularity for game systems.

These developments being made on making Game Development easier as well as improving performance gave me a great opinion of the Unity team, and hope that future developments would serve me well.

Cons

Unity also has its downside, and for the best interests of my readers, I need to list them here.

First of all, the Unity has a bad track record of revealing promising new features/add-ons for developers and then failing to deliver appropriately.

The funny thing about this is that I felt this problem most accutely with the ECS system I talked about as a positive in Timing: it had been in development for a while, and while the Unity team seemed to be pushing it as a currently viable solution, there was a lot of development ongoing. This meant lot of deprecations when using the package, and a very disheartening lack of learning resources: the underlying API was changing too much for me to know if any tutorial was giving accurate information.

This was also a problem for a multiplayer system in Unity, which had apparently been promised a few years back but seems to have been all but abandonned.

Another point is an apparent lack of optimization at compile time: for example, comments are not stripped, and empty Update functions will be called in-game even when building for release, costing us performance. This means some precautions must be taken before building, especially before release, which could be avoided with a better compilation process. What’s more, Unity uses an old version of Mono and does not benefit from the newest improvements.

All in all, I have some issues with Unity, but I’m hard pressed to find anything I would consider major or deal-breaking.

Final words

There are a few more points which would warrant consideration, such as the Unity licensing fees compared to its competitors, but I will address them in another post.

So far my experience with Unity has been good, and I’m glad to say my first impression was not wrong: Unity is a quality tool, and the team is hard at work on improving it even more.

I encourage you to take a look at other game engines before choosing, but definitely check Unity out!