Giving a try to Unity engine

Unity logoI never got the chance to play with Unity but I am seeing more and more games developed entirely with it. I thought that Unity requires developers to pay a license but it seems that the free personal version gives enough stuff to do the job. I found it when I have looked to the game Dungeon of Zaar. I was very surprised to see that the game was developed with this type of license. The game looks neat and is available on several platforms.

So I have decided to give it a try and see how fast/easy it is to develop with Unity. This could give me some idea for future development.

So after creating a personal license, I am downloading the IDE and launching the setup. Everything is working well. Launching the program, registering the license inside it. Ok! We are good now.

First impression: it looks like a 3D Editor program like blender or 3DS. It is very strange for a developer which use to have a code editor.

Let’s see the tutorial on the website: lot of things to read, video to watch. I am a little confused. Let’s start with the videos series “Using the unity interface”. Videos are good but after 40 minutes of watching, I am still confused on how i will be able to develop a game inside this UI.

Ok, I will give a try to a real tutorial with real code (I hope): The Rollball tutorial. They said it is for a beginner, it is perfect for me !

  • First video (7 min): I have a sphere and a floor.
  • Second video (15 min):  Now I have a physical engine and I am able to translate my sphere on the floor with collision ready. Impressive. By the way, I have seen my first lines of code in C#: a script attached to the sphere which read keyboards and adds a translation force to the sphere. Exposing a field to the editor is just as simple as made it public: you can see the field in the inspector and you can input a value for a parameter or drop an object to have a reference. It is hard to have something simpler.
  • Third video (5 min): I can now move the camera and the camera follow my sphere.
  • Video number 4 (4 min): So, I have created some blocking walls. I am really impressed by the collision system. As soon as you drop a 3D object in the game, everything collides with it.
  • So video number 5 (9 min): I just created some rotating cubes which be collected in a future step. The purpose of this video is to give you a shot on our to make a template for future objects sharing the same property. In this case the rotating behavior and the material.
  • Video number 6 (16 min). I have modified the player controller script to check collision with pickups object and deactivate it. I have used a tagging mechanism on the pickup template to analyze the source. The tutorial is going deeper into how physical engine handle collisions. Interesting. The engine seems really optimized with a caching system for collision boxes. I have not fully understood the impact of RigidBody component. We will see later.
  • Video number 7 (11 min). This one teaches me how to keep a score and display it on the screen. It is very basic and we don’t go into details on how handle UI properly imo but this is doing the job for a first tutorial.
  • Last video (4 min). This one teaches how to build the game and it is fantastic how easy it is to build for a platform. I have tried Android and MacOS build. many options are available and after specifying the android sdk and fix the bundle identifier, I got my APK. Impressive!

Unity interface in action

So in conclusion? what do I think about this first tutorial with unity? I know now why it is so popular. It is so easy to have something working even if i am not a 10 years developer. The physic engine and the fact that it is working on most platforms make me things that I should go deeper into it.

This does not mean that I will stop developing my game with LibGDX and Scala because it is fun to build the whole system of a game. But I will continue some tutorials with unity to see where it goes.