Friday, August 5, 2011

Drowning In Hot Cocoa

Have you ever read a super-duper-long Wikipedia page?

Well, imagine that five times over in full pages of text. Yes indeed, that's how much I've read about Cocoa(the framework Mac/iOS is built on) in the past two days.

Objective-C is an incredibly difficult programming language for me to work with. While I acknowledge it's just a different approach to many of the same concepts I'm used to in other languages, it does feel quite bloated. Thankfully, you're actually able to use C and C++ seamlessly with Objective-C, so that's been a life-saver for me. Cocoa itself though, I've found to be a pleasantly well thought-out library and it's been great working with it so far.

On another less chocolaty note, Flash runs *ahem*, not so well on the iPhone. A blank frame of Flashpunk drawing one orange square topped off at 30 frames per second. I understand that Flashpunk hasn't exactly been optimized for efficiency, but I don't see any great way of getting around this-- Flash is just slow on iOS. It might work well enough for UI apps and slow-paced games, but not for something fast-paced like Pocket Protector.

So with that, I now know I'll have to stick to native development. The possibility of Pocket Protector getting an iOS port has lessened, but is not completely gone. It was initially intended as a mobile game, so I might still carry out that intention. That said, it probably wouldn't be for a while. Don't get your hopes up, but if I were to do that I'd also add more content and refine the game quite a bit.

For native development I've relegated my attention to two main libraries:
- Polycode
- Cocos2D

Polycode is a cross-platform development library. The creator, Ivan Safrin, is actively working on(and for what I know, almost done with) an iOS port. Polycode is a pleasure to work with, and if you're into cross-platform libraries you'll love it.

Cocos2D is Cocoa-centric, so I believe it only works on Mac and iOS. It's another excellent library, but doesn't have quite as much PC support as I'd like.(which Polycode does have.) So far it's been a nice, simplistic library. I wouldn't say it's anything to write home about, per se, but it's much better than writing pure OpenGL ES code.

Once Polycode for iOS is in a usable state, I'm quite confident that I'll be using that to develop my games. The prospect of developing on Mac/Windows/Linux/iOS all with the same code base is very valuable to me. In the meantime, I don't see myself doing cross-development.(making the game/app for multiple systems as the same time with different tools/languages)

I don't have much to show for my progress on iOS yet, since it's just some images moving and stretching around the screen. Once I get something cool going, I'll post up some screenshots or a video.

No comments:

Post a Comment