iPhone Development #2

June 10, 2009

Last month I decided to bite the Apple and start work on my first iPhone app – making the transition from the relative confines of Processing and Java, into the stark reality of C++, Objective C, Cocoa, OpenGL ES and MAC OS-iness. 

Well, I’m 3 weeks in and finally getting somewhere, but not after some duly expected stress.

I’ve managed to get my ‘Zeno’ algorithm up and running, which is the basis of my recent animations using Processing/Java, namely Music Is Math, Metamorphosis, Swan Lake and The Nest That Sailed The Sky.

My first task was teaching myself C++/Objective C, and getting familiar with the Xcode IDE.

 

Downers:-

- writing in Objective C requires more lines of code for almost everything.

- OOP programming much more methodical and less intuitive.

- Basic functions I’ve taken for granted like Perlin Noise I’ve had to implement myself!  Yes I had to actually learn all the math involved to get it working.  Took me a few days to figure out, but it’s time I’d rather not have wasted at this stage.

- Xcode wont allow you to quickly save copies of projects, – to accommodate experimental branching of coding ideas.  It does have a ‘snapshots’ feature, but I don’t really like it.

- Memory management – everything needs to be allocated and released by the programmer, a real pain to learn.

- Programming in OpenGL ES is far from quick and intuitive, lots and lots of code that just sets it up, thankfully I was using pre-made templates.

- generally a VERY steep learning curve for all of the above.

 

Uppers:-

- Xcode is great for debugging, typing in code.

- Objective C generally more dynamic and powerful I think.

- Forces you to think very clearly about management of project, source files and structure of what you’re doing, good in the long run.

- Quicker!

 

So at this stage I’m feeling happier and more confident about realising my first iPhone app.  My plan is to take Metamorphosis and create a real-time/interactive version based exactly on the animation seen in the video.  There’s plenty of work to do yet obviously, there will be a lot of particle,shading effects to be built in, and probably strenuous optimisation.  But I’m looking forward to the task at hand.

About these ads

8 Responses to “iPhone Development #2”

  1. Glenn,

    Great post. You are obviously very bright to be able to tackle all the above at once and make demonstrable progress.

    I found after spending 40 hours with iPhone SDK back in the private beta days, that while I just loved the device and what could be done with it, that the actual pleasure and experience of programming for it would not be worth the end result for me.

    My impression of the iPhone SDK/XCode/Objective C is that these are programming language paradigms 20 years old, and that as a developer platform it is completely outdated. The resulting “experience” of programming for it is far less pleasurable than it could be.

    Having to do memory management, class headers, OO as it was envisioned 20 years ago seems like several steps backwards. But alas all the developers who have created the 50,000+ apps for the appstore obviously don’t find it too unpalatable.

    Can’t wait to see your app on the app store.

  2. Hi Tom, Thanks for your thoughts,
    If I’m honest I would actually agree with you. The beauty of Processing is that it was designed to be as easy and fun as possible, without compromising too much on power. It was also designed to be accessible to anyone regardless of background. Obj-C does indeed feel like it’s a step backward. I think there’s a responsibility with those concerned to employ technology/language platforms that open up and encourage anyone to engage in software development. It shouldn’t be aimed at just software development companies and the hardcore programming elite.

    In saying that, I think I’m through the worst of it, and fairly comfortable with the SDK now, but if I had thought about getting into programming without ever trying Processing and went straight to trying Obj-C/iPhone apps, I wouldn’t even have bothered – it would have been far too difficult and intimidating, re-enforcing the ‘i cant program’ belief that a lot of noobs like me are afflicted with.

  3. mj said

    Hi Glenn,
    Will drop you an email – we spoke before and we’re working on holding a games day after holding a very successful iPhone development network event.

    Jeff LaMarche, who runs that iPhoneDevelopment blog, is a really nice guy – had breakfast with him and other luminaries at WWDC.

    Sadly for myself, as a programming noob, I’ll be forever trying.

  4. lol tell me about it..

  5. [...] (blog posts 1, 2, 3 and Graphic Synthesiser Demo (3:51), 4, 5) and an iPhone App (blog post 1, 2 and iPhone App Test #1 video [...]

  6. Andre said

    Hey Glenn,

    Nice work!

    I’ve been looking like crazy for a way to generate a slightly animated version of this: http://dl.dropbox.com/u/1977230/example.png

    To use as a background for my app’s menu.

    Any chance you’d think of sharing your Perlin Noise code ? :D

    Cheers,
    Andre

  7. there’s a whole bunch of stuff you can hack from this site

    http://www.openprocessing.org/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 55 other followers

%d bloggers like this: