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!