Friday, 15 May 2015

12+1 Tips to Optimize your Unity 2D Mobile game. iOS and Android


Learning how to optimize a game for mobiles is something that is hard to teach. Whatever you will read here now will be meaningless unless you find yourself in similar situations. iOS and Android devices are unfortunately weak and this will force you be a stronger developer. While optimizing a program should not be done at the beginning of the development cycle, you will encounter easy to follow practises that will prevent you for doing the same mistakes again and again.

Optimizing a game is half experience half art. You have to learn the shortcuts and second ways of every Import option, Unity behaviour and Line of code you write. When you will find yourself in the situation were your game is too slow in that old iPhone or Android phone of yours, you will have this guide to give you some ideas of how to proceed. In my particular case, it has been ROAR! The first game I have had to optimize seriously due to Vuforia AR plugin already using a lot of the device resources. :)

  • Tip #0: Choose your development device wisely
The slower, the better. However, don't overdo it. Having a too slow device will slow you down and will make you optimize too early, when is not necessary. I guess somewhere in the middle is where the virtue is.

There has never been so much hardware to choose from! :P


Friday, 24 April 2015

How to detect Collisions in Unity. Like a BOSS.


Any game developer beginner has asked himself at some point... how do I know if my character collided with the enemy? or reached the end of the level? or a little bit more specific, what part of the body of the character was hit with the enemy bullet? The answer to all this questions is in the Unity Physics Engine. Thanks to it you will have the most ridiculously easy way to integrate physics into your game (like a line of code? :D)

As I said in my previous post about Delegates and Lerp, this is the next in the family of "Like a BOSS" tutorials. They are simple and straight to the point. I focus on the best utilities I find for each of the components and my best practises with them. In the post you will find an example about Collisions in 2D and at the end you can enjoy the full git project :)

Collisions are of the first things you probably learnt while doing the unity official tutorials. Using collisions is probably one of the simplest things in Unity. Then why am I writing a post about it? Surprisingly, many people find problems while working with them, silly errors due to how they work most of the time. I will try to show you the way of efficiently working with them, avoid this errors and give a little bit more indepth utility like detecting the exact point of the collisions.

(Almost) All kind of colliders in  Unity. Some of them I didn't even knew xD

Friday, 3 April 2015

One year Game Development blog Post-Mortem.


Game development blogs, or heavy technical blogs in general, are not the best source of visits for your web page if what you are looking is for big numbers. However, you will get high quality in your visitors. People will read your long posts even if they don't have many pictures are just a bunch of lines of code. Attracting people to read your posts is not so hard neither, but making a living out of it is practically impossible :)

Although the name of the post suggest the dead of the blog, that's not going to happen, this is just a retrospective. Exactly one year ago I started to write this blog and I wanted to share with everyone the stats behind it. Curiously it is quite hard to find such stats from other blogs, so I hope this post will help someone to compare their own stats and maybe encourage to share their own :D

On the personal note I would like to share my feelings about this "milestone" ^^. It's been greatly gratifying to write this blog and I would totally recommend it if you are considering starting your own. I have the feeling that I get more than I give into this (not money nor time, obviously... but anyway xD). For example, every time I tutorial I learn new things I didn't know. It also helps you to put in order my ideas.

My tip to keep your blog alive this long? Plan ahead and set a regular time frame for your updates. It shouldn't be a tight period of time but it should be constant. For me is every 3 weeks. If you never miss any update it will become a routine. Guaranteed! :D

27 published posts
+82 comments
+100 Social Media Interactions
+3€ Revenue xD
+50000 total visits
+130 daily visits


The long term goal is to create a collection of good posts that attract visitors without promotion.

Friday, 13 March 2015

How to use Delegates in Unity. Like a BOSS.



Delegates are a programming language feature that allows to invert the dependencies in the classes of your program. Delegates are also referred as Events or Callbacks. The idea behind them is exactly the same as a subscription magazine. Anyone can subscribe to the service and they will receive the update at the right time automatically. This is a super powerful way of designing the architecture of your game to achieve the next level in code quality.

If you enjoyed my previous article about how to use Lerp, this is the second of many simple tutorials to learn how to use the full potential of Unity following what I found out are the best practises. Follow this easy examples you will have projects that are not a nightmare to maintain after a couple of weeks of development. :)

If you started to program in Unity as your first serious programming job, it may be even possible that you don't know what delegates, callbacks or observers are. Don't be scared, we will talk about everything in detail. Anyway I recommend you to take a look at the official tutorials here and here if you haven't done it already and come back here to answer the rest of your questions. :D

One call at the right time is better that 60 calls a second until they pick up.

Friday, 20 February 2015

What trackable type should I use in Vuforia project?

ROAR! The Augmented Reality family board game.

There are many different types of targets and markers you can use in your Vuforia project. Image targets or frame markers are a couple of the best examples of the possibilities of the Vuforia plugin for Unity. If you are developing an ambitious or commercial project you want to know what is your best shot in terms of performance, cost and reliability.

Making Augmented Reality apps is getting easier and easier. The future of the free version Vuforia 4.0 is not as clear as it should be and people is concerned about the price of it. Anyhow is a bright future for AR in general! Meta glasses and Microsoft Hololens prove that there will be hardware that will live up to the expectations of AR potential consumers and that in a matter of few years this gadgets will be in everyone life just like the smart phones today.


I this post I will go though the different types of markers I have used in my real work experience and I will explain which one works better in any situation. Deciding what is the best option is up to you :)


Friday, 30 January 2015

Please, kill the Virus. Update 3


Your mission? Be the heart.

Hello one more time! :)

Last time I said we were leaving the prototyping stage for "Please, Kills the Virus"... I lied...xD

We have some new members in the team so we can afford some extra work :)

I love the freedom of a project in early stage, all the possibilities to explore. Most of the time is more rewarding that developing a full product. That's is why we created two more prototypes in addition to the 4 previous. I have to say that the last one is really promising. :)

The first prototype we developed was with the idea of creating cells that catches the viruses. Basically you draw circles with your finger around the viruses and kill them, just like in the famous Ninja fruit.

Ninja Virus Evolution. Nice to play in the phone :)

Friday, 9 January 2015

Unity 4.6 - 14 tips to choose your UI System. New Unity uGUI vs NGUI.



Unity 4.6 new graphical user interface system (uGUI) has been with us already for a while now and I have been personally using it since the beta. Time has came to make a fair review about it and its bigger competitor, NGUI. Tasharen NGUI has many years of advantage over uGUI, way before even native 2D in Unity.


I will spoil the whole post saying the obvious already... NGUI is better than uGUI in pretty much everything that you could develop at the moment. Myself I held high expectations and I felt disappointed about it. Then why am I writing this? I would like you to make a wise decision for the future projects :)

uGUI vs NGUI. Everything is always explained with animals... :)