Monday, August 17, 2009

Choosing the Appropriate Framework

I decided to use UIKit, which is the basic framework in the iPhone SDK for managing the user interface elements. The Interface Builder is a great tool for laying out UI components. I can drag-and-drop elements, such as buttons, onto the view and re-skin them to fit the look of the game. Using OpenGL ES is an alternative option but that has a steeper learning curve. For something 2D and not graphics intensive, UIKit works very well.

The UIView has built in functionality to perform key-frame animation on the various properties. For example, we can change the alpha value to fade-in and out view elements, or even provide transformation matrices for more complex movements.

There are also a few third-party frameworks that I looked at. I was impressed with Unity 3D, especially with the GUI development environment. You can do all your game logic in scripts and would not have to touch Objective-C at all. In the end I felt that it was a bit of an overkill for a simple 2D game, but I might revisit it later for future projects. The ability to target multiple platforms (i.e. web, desktop) is very attractive.

I also looked at Torque 2D but found it a bit confusing. Unity definitely has better documentation and tutorials to get you started, and feels like a more polished product.

There is also coscos2d which is an open-source 2D framework if you want to go the free route.

1 comment: