Preface
I grew up playing video games; I remember my Amstrad CPC 128K as one amazing computer that brought to my home several of the games I played in the arcades and I feel lucky for being born at that time. Thanks to that, I've known titles that have passed into history and I've been a witness to the evolution of the video game industry; from the first handheld games to the iPhone 6 and iPad Air 2, passing through the first computers and video consoles to the current next-gen.
This hobby became a passion and I realized very early that I would like to learn to develop video games so I could understand how my preferred titles were built, and this is one of the things I want you to learn through this book. In fact, there are three important things that I would like you to have learned by the end of the book:
- Love for games: I think that playing any kind of game is one of the most important things in this life. Playing games in a balanced way can make your brain faster; you can learn culture, make friends, laugh, or even live a different life; that's why we should not stop playing.
- Love for development: When I was a child, I realized that I wanted to be a developer because I wanted to know how to build the things I used to play. Once I became a developer, I realized how many things you can build by yourself with just a keyboard, and I think that making your own game or your own app can be compared to writing a book or recording a film. At the end, it is the same thing; you are creating something from nothing. So that's why I think that there are three things people should do before dying: have a child, plant a tree, and develop a game.
- Autonomy: I would like you to have learned all the tools you will need to develop whatever is in your mind and to understand how to solve the problems you will find during this process.
From time to time, we hear news about a new game that is breaking the market and turning people crazy in a few weeks, achieving thousands and thousands of downloads, hundreds of thousands of profits from its in-app purchases, or millions of dollars in revenue. What makes this game so addictive? This is the question that most of us mobile game developers ask ourselves and the answer is always similar: a good idea. That's why most of us keep trying daily to think of good ideas to be the pillars of our next game, but this idea never comes to mind.
If you think about it, these addictive games are based on simple things and most of them are based on previous games, but their developers have included some features that make us want to play over and over. That's why it's important to learn which techniques were used to develop successful games from the past and the present.
But to achieve this, it's important to be equipped with the most appropriate tools in order to focus on playability rather than squeezing our brains trying to figure out how to do what we want. Hence, we have developed the games included in this book using Cocos2d because it's based on Objective-C, a language that I'm sure most of you are familiar with.