RSS

Category Archives: Technical

Technical side of iOS game development.

Why cocos2d?

Here is my list why (I like lists, as you probably noticed by now):

  1. It’s open source. This is probably the most important thing about cocos2d, Not only free, meaning that you don’t have to pay for it. But free meaning, you can do with it whatever you like. Modify, learn from the code, see how things work, even if the documentation is lacking. It’s worth the little extra complexity over Corona, believe me.
  2. It’s build on a solid foundation of an Object Oriented language. Granted, it’s a bit annoying it has to be Objective-C and not old, good C++ or even better Java. But it’s good enough for me. And it’s not so much different from C++ anyway.
  3. You can use excellent Apple XCode IDE. With very good editor, syntax highlighting & autocompletion, code refactoring, templates, real debbuger, good integration with git version control and many more. It’s really much, much more, than Text Wrangler can offer.
  4. You build your code locally, on your own machine. It’s possible to do that without internet access.
  5. It offers particles and tilemaps. I’m going to use both in my game.
  6. It’s possible to use any 3rd part library, unlike in Corona. Like GameCenter or OpenFeint for example. Which I’m also going to use in my game. Well… not both. It will be GameCenter I believe.
  7. It has been around for some time and seems to be mature. Version 1.0 rc3 is the newest one.
  8. An impressive portfolio of good and commercially successful games made using cocos2d also shows, the engine is capable. Trainyard, Feed me Oil and many more. Look here for the full list.
  9. There is a big and helpful community gathered around coco2d. Here you’ll find their forums. Very nice and helpful place indeed. Of course Corona also have forums, but I personally got help much faster on cocos2d forums.
  10. It’s open source!

So… this list pretty much sums up all I have to say on that. I’m made my decision when it comes to engine. cocos2d it is.

Partial credits for the list go to wilczarz from cosos2d forums.

 
2 Comments

Posted by on June 18, 2011 in Technical

 

Tags: , ,

It’s the engine, stupid!

Now that I have the name and basic concept what my game is going to be about… what’s next? I had to research, what is needed to make an iPhone game – from technical point of view. I worked on Windows and Linux before, but never on Mac and never for any mobile platform.

So here is a short list what I found out you need to develop applications for iPhone:

  • a Mac (it can be done without a Mac, but it’s legally forbidden by Apple to run OSX on non-Apple hardware or in VM, so I wouldn’t advise to go this route if the developed app/game is going to be sold through AppStore),
  • subscription in Apple Developer Program (it’s $99 a year and is necessary to test your app on a physical device… if you are not going to jailbreak it that is),
  • XCode – it’s an Apple IDE for developing OSX and iPhone apps and it’s free to download for members of Apple Developer Program,
  • an iPhone – it’s really necessary to test your game on a physical device; simulator is not enough.

Theoretically that’s it. But that’s enough for ordinary apps. If you are going to make games, you need one more thing.

The engine.

Of course if you have really much time you can write your own. But it takes years and it’s doubtful, you’d come up with something better, that’s already available.

There are 3d and 2d engines out there. I already made a decision, that my game would be 2d. Another thing I considered is making a game for iPhone and porting it for Android later. So I was also looking for a multiplatform solution.

Here is a shortlist of options I found interesting at the first look:

  • Unity,
  • Corona SDK,
  • cocos2d.

Unity was excluded from the list pretty fast. It big, better suited for 3D and way too expensive for an indie game developer.

Corona seemed a very interesting option for a while. It is $349 a year (or $199 only for iPhone) and promises developing applications, which will run on iOS and Android. From the same code! Now this was really interesting. I downloaded a demo and invested a day or so to go through a few tutorials to get a feel how things work. I don’t own an Android device for now, so cannot really tell how much of the “write once, run on iPhone and Android” promise is true. But I’m sceptical. Even releasing a game for iPhone 3, iPhone 4 and iPad needs some extra code, assets and work. So it’s unlikely it’s so easy. But that’s not the point.

Two things put me of Corona pretty fast. There is no IDE. You write your code in Notepad. It can’t work for larger projects. Believe me. I worked for big companies as a software developer for many years and it’s pretty much impossible to work without IDE when a project grows in complexity. And your game will be complex enough.

Second problem with Corona is the way to build your application. When you hit build button, the code written locally is sent to some Corona (or Ansca Mobile actually) servers and gets compiled and built there. You get the result back. So it is impossible to build without internet access for example. If Ansca disappears some day, you are left alone with your code and cannot build anymore. It’s way unsecure I think if you are serious about getting into game development business for many years.

So, the third option: cocos2d. I’ll write about it in my next post.

 
Leave a comment

Posted by on June 17, 2011 in Technical

 

Tags: , ,