Warning: readfile(http://alkoltashov.narod.ru/leebyron.com.txt) [function.readfile]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/leebyron.com/www/how/wp-content/themes/leebyronhow/header.php on line 20

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!

Reader Replies

  1. christian replied
    on Aug 31st, 2008 at 4:31 pm

    I’m looking forward to see how this platform you are working on will be.
    Cheers, chr

  2. vade replied
    on Sep 1st, 2008 at 2:27 am

    Out of curiosity, why would I not want to use Cocoa?/OBJ-C ?

  3. johnny0 replied
    on Sep 1st, 2008 at 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. :)

  4. Zach replied
    on Sep 1st, 2008 at 10:25 pm

    Cool stuff. But I’ll also ask: Why not Obj-C?

  5. Lee Byron replied
    on Sep 1st, 2008 at 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!

  6. Jonas replied
    on Oct 26th, 2008 at 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.

  7. Jeff W replied
    on Dec 18th, 2008 at 9:11 am

    I gotta admit, I havent worked with C++ since college so I’m lost with all of the technical stuff but that video is pretty damn cool!

  8. todoslot replied
    on Mar 17th, 2009 at 3:39 pm

    Thanks for the post, is that got me exactly where I needed to go.

  9. tienda de scalextric replied
    on Apr 11th, 2010 at 1:20 pm

    Nice post having an excellent content,which are really helpful for a reader like me.Thanks for sharing this with us.Keep it up.Keep blogging.

  10. Jogos Gratis replied
    on May 25th, 2010 at 3:29 pm

    I loved this application you showed in the video. Can you post the link where I can download it?

Leave a Reply