With so many mobile devices laying around (iPad 1, iPad 3 iPhone 3gs, iPhone 4, iPhone 5, Android Mini Pc, Google Nexus 7) and everybody using more and more these kind of devices, I decided to learn a little bit more about them and try to develop something.
Note: This is an outdated post from the old blog! Information may need to be updated.
1st: Should I go native?Learning Obj-C is learning a language that only works on iOS. A crazy language let me say. I’m sure it makes sense to a lot of people but for me… not really. Learning Java, since it’s used in more stuff, would be better but my main aim would be iOS because there is more money spent and the language still didn’t made me curious about it. Besides that, I don’t really like to work with JVM.
Let’s go framework / cross-compiler then…
2nd: Which framework / cross-compiler?
There are so many frameworks laying around and most of them multi-platform.
Since I already have some background on AS3, someone recommended me Haxe which seemed pretty interesting to me. A multi-plataform framework, interesting language… I tried it out and it worked fine but on my research, I didn’t heard many people saying “hey, I built a haxe app and I made money!”, I heard more “Haxe is awesome for prototyping”. I’m looking for a production tool. Haxe won’t fit my needs for now. Adding to that, there weren’t many people talking about it and as so, it would be hard to learn when you don’t know where to ask for help.
With this in mind, decided to continue my search and got into Corona Labs website. I already knew about it and even tried it in the past, long long time ago. People are making money with it, so a viable production option, it even has apps on the top, a good and big community, but Lua? I really don’t want to learn Lua.
A little frustrated at this point. I’ve searched and tried frameworks (some are not listed here, sorry) and I haven’t found something that really made me smile. Until…
I’ve found my framework!
Cocos2d is a framework already being used for a long time for Obj-C and now they’re trying to get it to work with more languages and here comes cocos2d-x.
What does this framework do better?
For starters, you can use C++! All my life I’ve heard “if you can develop good C++ you’re a good developer”, C++ is the basis of a lot of languages and in my point of view it will be hard to die. The framework is multi-platform. Cocos2d is a reliable team. So… why not? Let’s fire up Xcode!
Learning the framework and learning C++ at the same time, it’s really not an easy task. C++ isn’t that easy and cocos2d-x still is a new framework with not much forum activity or people interested in it. After spending some time in C++ channels on freenode irc (thank you guys), which by the way is a great server for developers, I got a grasp on C++ and started to notice that cocos2d-x uses a lot of the cocos2d library functions (with some minor modifications) and for the cocos2d there is a lot of forum activity and stackoverflow.
Time to do a simple project
Arkanoid seemed to me the way to go. I always loved the game and it’s pretty basic.
It didn’t took me much time to do it but if I knew the framework it would even take less. There are some tricky things on the framework, like the cartesian coordinate system is upside the down (the right way) comparing to most of the languages and in some functions instead of using cartesian coordinates you have to use values from 0 to 1, or some extends didn’t work like CCNode because of the opacity function I was trying to apply but as I said, if I knew the framework, it wouldn’t take me so much to solve these “problems”.
It’s working and if I need to do something mobile, I know where to go.
Now it’s time to get back to the web!