I installed Xcode, Apple's free development suite and chose Cocos 2D as the graphics library after reading some good reviews. Cocos is great. It's easy to use, robust and comes with great 2D support. It even allows you to use a physics engine in your game but I wanted to keep things simple and chose not to include this. After all, a flying Jetpac is not rocket science...
I've done some game programming before on the PC using Visual C++ and DirectX and I was very impressed with the simplicity and beauty of the Xcode editor and compiler. It comes with a useful iPod simulator (so you can quickly test the game while you are coding) but creating games is much more rewarding when you can play them on a real iPod.
Unfortunately this is not possible unless you sign up for Apple's IOS Developer Program which costs EUR 80 per year. Needless to say, I signed up. Another benefit of the IOS Developer Program is that it allows you to submit your apps to the iTunes store (after Apple has checked it).
It was fun learning the Cocos 2D library and the dialect of C that Apple calls Objective C. I now have the beginnings of an actual game. It's a simple platform game called 'Jetpac Piggy' because I like Jetpacs (and piggies). Some of the highlights are:
- Parallax scrolling (background layers move at different speeds depending on how far away they're supposed to be - giving the impression of depth).
- 5 levels (so far).
- Realistic Jetpac thrust, created with a particle designer.
- Simple controls. If you tilt the iPod left, space-piggy will fly left, and tilting it to the right will err... make it fly to the left some more. Wait! I can fix this!
- There are 2 buttons. One is for thrust, the other is for using one of the space shields. Useful when you get too close to a space mine.
- iPod graphics are fast. 60 frames per second with 2 full-screen, scrolling backgrounds and various sprites and particles is not a problem at all.
More to follow...
No comments:
Post a Comment