iPhone - Yellowtail
A week ago I got a shiny new iPhone. A few days later I got my Developer’s Certificate and the API. Two days after that, today, I’ve got the first app up and running!
It’s a port of Golan Levin’s Yellowtail with the small addition of multi-touch.
OF and Processing nerds read on
For the OF and processing nerdies out there, what’s actually interesting about this is that this is the beginning of a OF/processing style interactive graphics platform for the iPhone in which you can get by with 95% C++ and avoid writing your app in Objective C.
This two day old version supports multi-touch. I’m essentially treating each finger as if it were a different cursor. Instead of mousePressed(int x, int y) you get touchDown(int x, int y, int touch) where 'touch' tells you just which finger I’m talking about; they’re numbered in the order in which they appear (and you can have up to five at once!) For convenience there’s also a doubleTap(int x, int y, int touch) function.
Another feature is a C++ wrapper for OpenGL-ES textures and images (similar to ofImage and ofTexture). OpenGL-ES is a little nastier to write since it has to be efficient, and there’s a good 100+ lines of code just to draw a png into the screen. Also the only image format I could get to work is a PNG-24.
Also managed to figure out how to interpret “mach” kernel’s time to derive millis() which familiarly tells you how much time has passed since the app started.
There are a few other minor things like quick commands to show and hide the iPhone status bar (I’ve made it hidden by default) and to launch a URL (which quits your app and loads Safari).
The code is nasty as all get out right now, so no public download for now. I hope to have something to share pretty soon. Look out for Yellowtail on the App Store in the very near future!

4:31 pm
I’m looking forward to see how this platform you are working on will be.
Cheers, chr
2:27 am
Out of curiosity, why would I not want to use Cocoa?/OBJ-C ?
4:04 pm
OK, that is sweet, especially with the multitouch.
Yellowtail could make a interesting signature verifier since it records both shape and speed.
How about some variants? It would be interesting to see things bounce off each other. Or closed shapes stay in place. Or draw a circle (or any closed shape), and then things drawn *in* that circle stay within it. Call it YellowCell…
Anyway, looking forward to draining my battery soon.
10:25 pm
Cool stuff. But I’ll also ask: Why not Obj-C?
11:07 pm
vade & Zach,
You certainly could use Objective C instead of C++, there is no performance hit for choosing either one to my knowledge.
My personal benefit is that I am not very comfortable with writing Objective C, and C++ is more homey to me. Add on to that many of my previous apps that I’d like to port to the iPhone are in C++, there are tons of libraries available in C++ and to top if off there is a big community of interactive art hackers that I’m appealing to with this (openFrameworks).
You certainly could make this exact same thing without touching C++.
Perhaps the point is that the flexibility to choose between the languages (or mix them) lets me work the way I like!
7:48 pm
Hey, this looks very cool! Have you come further with the release of the code? Would love to give it a look.