Discover The Power of Unity

This is a short article to show you why building games in Unity is awesome. A lot of people already know this, but maybe some of you don't really know the power of Unity. That's why I wrote this post.

First, let's quickly see the 5 main advantages of Unity:

It's free. There is a paid version, but it's main benefit is just to get ride of the Unity logo when a game loads.

It's multi-platform. You can really easily export a game to any platform: Windows, Mac, iOS, Android, xBox, etc.

There is a huge community. Which means that you can quickly get answers to your questions if you are stuck.

It just works. There are so many well known games that have been made with Unity: Hearthstone, Monument Valley, Thomas was Alone, Crossy Road, etc.

It has a powerful interface. Instead of creating a game in an abstract way with code, you can directly manipulate the game with the editor.

Let's dive into one of the most important point: Unity's interface.

Handling collisions

Using a physics engine to handle collisions in a game can be a complex task. Here's an example: we want to handle collisions between a rectangle and a circle. Let's see how to do that in Unity.

First we create a white box and add a "collider" component to it so it can handle collisions.

Then we add a white circle with 2 components: a "collider" for collisions and a "rigidbody2D" to add some gravity.

And we press the play button at the top to see the result:

See how simple this is? With no code and less than a minute of work, we have something that works.

Creating Particle Effects

Another example: we want to create some particle effect for a game. This usually involves spending a lot of time reading the documentation of the language to understand all the parameters available, and then tweaking everything to get exactly what you want.

Well in Unity this is really different. First we create the default particle effect and change the texture to a white square:

Now all we have to do is tweak all the parameters you can see on the right of the screen to get the result that we want.

Let's start by changing the shape of the emitter to a sphere and increase emission rate of the particles:

Next we change the "size over lifetime" (to makes the particles smaller) and the "color over lifetime" (from red to blue):

And that's it, in less than a minute we have some nice particle effect!

More Particles Effects

And by just tweaking some of the parameters of the previous effect, we can easily get very different results. Here are 3 examples:

Pretty cool, huh?

Conclusion

You still need to code a lot of things in Unity when building a game, but I hope these small examples showed you how Unity can make development faster and more fun.