IF and the iPhone

So, Apple have (finally) released the iPhone SDK today. developer.apple.com is apparently too busy celebrating this momentous occasion to actually bother to respond to any http requests so I haven’t had a chance to look at the SDK yet.

Even so, I plan to port CocoaGlk as soon as I get my hands on it, at least assuming the requirements for distributing free software aren’t too onerous. $99 for a key doesn’t sound too bad to me, anyway.

I’m not entirely sure what to expect; I haven’t played around with jailbreaking my iPhone, so I’ll be going in blind. What I think is likely, however, is that half of CocoaGlk will port just fine: that is, the GlkClient framework that interfaces with the interpreters. What is less certain is how well the UI half will port: that is, GlkView. If NSTextView is ported, and the typesetter behaves the same way, then it’s going to be really easy to get the UI working in some manner, and probably not that hard to support all the features of blorb.

Getting games onto the phone is also a bit of a challenge. I think that taking some of Zoom’s existing inventory management and connecting to IFDB might be a good idea.

I’ll post a beta when I get things working: I imagine a glulx or frotz-based interpreter is likely to be released first. I’ve been thinking about doing something with LLVM to JIT games; something that would be a curiosity on the fast machines that CocoaGlk runs on at the moment, but which could be vital to running games on the much slower iPhone.

3 Responses to “IF and the iPhone”

  1. Craig Smith Says:

    Hi Andrew,

    I’ve been meaning to contact you for quite a while, but stumbling upon this post finally gave me the impetus to do it.

    I am the author of iFrotz (see website link), a port of frotz for jailbroken iPhones. Judging from the statement above (”I imagine a glulx or frotz-based interpreter is likely to be released first”), I gather that you haven’t heard of iFrotz. iFrotz has been available since last fall, and was one of the first 3rd party programs available for ‘hacked’ iPhones.

    I’m thrilled that you are interested in porting your IF work to the iPhone. I actually initially began to port Zoom to the iPhone first, but backed down and made an iPhone UI for frotz instead for 2 reasons:

    1) The iPhone wasn’t available in the UK at the time, and I figured that, should you turn out to be an iPhone fan, it would be rude to go and port your work when you weren’t even able to buy the device yet
    2) The hacker tools for developing for jailbroken iPhones were pretty primitive at the time, and it was necessary to work around lots of issues, so starting with a large Objective C source base and attempting to figure out all the compilation issues in it was daunting, not to mention the UI API differences.

    And so iFrotz was born… Alas, since frotz was a pretty hackish, poorly designed source base to begin with., and this was my first real exposure to Objective C, while I can say that while I am happy that I was the first to allow people to play ZMachine-based IF on the iPhone, I’m not particularly proud of the program and would love to see Zoom/CocoaGlk ported.

    So I look forward to seeing the best IF interpreter/UI for the Mac become the best IF for the iPhone, and would be happy to volunteer to help you if I can. Even if I hadn’t seen this post, I probably would’ve contacted you before too long about this anyway now that the official SDK it out.

    (By the way, the iPhone doesn’t actually have an NSTextView class, but has a class called UITextView which is at least superficially similar, although it uses an HTML layout engine underneath the hood (and I don’t think NSTextView does, although I’m not positive).

    Best regards,
    Craig Smith

  2. Ricky Buchanan Says:

    I just noticed that the Mac Binaries Zoom page still points to 1.1.1 as being the most current version available, and I’m not sure if it’s just me / The Oz pipeline / the full moon but the Sparkle update from 1.1.1 to .2 failed multiple times - it’s working fine now I downloaded it by hand. I’m working on a review for ATMac and I wanted to link to the Mac Binaries page rather than a specific version but I need the latest one due to some of the bugfixes (speech in particular). If I don’t hear from you I’ll probably just leave links to both, but it seemed polite to ask first :).

  3. Pavel Soukenik Says:

    Hi Andrew and Craig,

    I want to appreciate the work you are both putting into making IF available on the iPhone. I believe it is important also for spreading of the IF in general. iPhone is stylish and popular but it also has what it takes to actually support the playing of IF: the display has a high enough resolution, the typing corrections as tweaked by Craig in iFrotz are great, and best of all, it is MacOS-based so it will (hopefully) not be difficult to port Zoom onto.

    I cannot wait to slide my finger across the coverflow of IF titles and enjoy both zcode and glulx titles while on the go!

    I wish you good luck,

    Pavel

Leave a Reply