Craig Smith Interview: How Frotz Brings Interactive Fiction to iPhone and iPod touch


Frotz: text adventure goodness on your iPod touch or iPhone
Frotz: text adventure goodness on your iPod touch or iPhone

When people talk about classic gaming, they usually rattle on about really simple, playable games that are challenging but that a five-year-old could conceivably master. Such people were clearly traumatised by text adventures (now referred to using the rather loftier term ‘interactive fiction’) and have therefore removed them from memory.

These games were primarily text-based, with you solving puzzles via verb-noun parsers. As time went on, adventures gradually became increasingly complex and elaborate, with Infocom arguably leading the genre to its height.

Sadly and perhaps predictably, text adventures eventually got a thorough kicking. In the words of Richard Harris: “Graphics came along and the computer-using portion of the human race forgot all about 500,000 years of language evolution and went straight back to the electronic equivalent of banging rocks together—the point ’n’ click game,” which, he argues, signalled the arrival of the post-literate society.

But via the magic of the internet, interactive fiction clings on, and apps for playing the Z-machine format are commonplace. Frotz is one of the best, and it now exists as a free iPod app. I interviewed its developer, Craig Smith, to find out what he thinks of interactive fiction and why he brought Frotz to Apple handhelds.

Cult of Mac: What is Frotz and why did you decide to create it?
Craig Smith: Back in the early 80s, when a 320×200 pixel screen with 16 colors was considered state of the art, Infocom had a popular line of text-based interactive fiction games. Players controlled the character by entering simple imperative commands such as ‘light the lantern’ or ‘kill the troll with the sword’. Most of the games were well-written and fun, and in my opinion blew away the Scott Adams adventures and other early competitors.

Not wanting to have to manually port each game they produced to all the different computer platforms of the time, Infocom had the idea of designing a virtual machine and writing their games to run inside it. This is essentially the same idea as Java, but 15 years ahead of its time. The ‘Z-machine’ was ported just once for each platform, and all games ran inside the VM with no extra work. It was a great success for them and Infocom produced and sold over 30 games using the system.

Unfortunately, as computer hardware improved, games with graphics and sound took over the market, and text adventures slowly died out.

Time passed, and eventually several independent groups of hackers reverse engineered the virtual machine Infocom used, and wrote programs that could play Infocom’s games on newer computer platforms. Then, in 1993, a brilliant Oxford professor named Graham Nelson wrote a new language and compiler called Inform that could target the Z-machine. Curses, his first game using the system, was quite quirky, quite British, and fun. Eventually, Inform had developed a large following of interactive fiction devotees producing new games just for the fun of it. An Interactive Fiction Competition is now in its 15th year, and gets dozens of entries each year, written in Inform/Z-machine or any of several other IF design systems.

So, to finally answer your question, Frotz is an app that lets you play such interaction fiction games on the iPhone and iPod Touch. Frotz can play most games written in the Z-machine format, including games produced by the Inform compiler and most original Infocom titles.

Where did Frotz originate?
The name comes from a magic spell in the Enchanter series of games by Infocom; ‘frotz’ was a spell that would cause whatever you cast it on to give off light. Many of the Infocom founders were MIT graduates, and apparently ‘frotz’ was a slang word at MIT that meant to play with or manipulate something, and they incorporated a lot of such slang and inside jokes into their games.

Frotz for iPhone is based on an open source project, written originally by Stefan Jokisch that has been ported to many computers and mobile devices over the years. Whenever I get a new device pretty much the first thing I do is try to find an IF interpreter for it, and since there wasn’t one for the first-generation iPhone, I ported Frotz and made an iPhone UI for it, using tools from the ‘jailbreak’ community. I really wrote it for myself, but I was happy enough with the results, and so I thought I should share it with other people. When the App Store came online, I polished up the app a bit more and submitted it.

Unlike most other IF interpreters, Frotz for iPhone comes with a large collection of games, most of them selected from among the winners of the IF Competition over the years. If you already own the original Infocom game files, you can also get them into Frotz using an FTP program.

What for you is the appeal of interactive fiction?
My first exposure to IF was in 8th grade when someone had a copy of Zork I for the Commodore 64 in my junior high computer lab. I was hooked instantly and wound up playing and beating every Infocom game they made for the C64, and then playing Trinity, Bureaucracy, and A Mind Forever Voyaging (which were all too big to run on a C64) on a friend’s Commodore 128 and Amiga systems. With maybe a couple of exceptions, all of Infocom’s games had well-written, immersive prose, challenging puzzles, and most importantly, a good sense of humour.

Happily, the newer works being produced by amateur IF aficionados every year continue in that tradition, and I would say many of them even surpass the quality of Infocom’s games. I guess there’s just a certain natural filtering process whereby the kinds of people who are attracted to IF and motivated to produce games for free for the sheer fun of it also tend to be literate and witty. Note that I didn’t actually write any of the IF games which come with Frotz and make no particular claims to these traits, but I very much appreciate the efforts of those who did, without which Frotz wouldn’t be very useful!

How did you ensure the UI of Frotz would enable people to easily play the games?
I don’t think the iPhone’s virtual keyboard presents much of a problem, since most of the commands you have to enter in IF tend to be short and support lots of abbreviations, and the iPhone’s autocorrection helps out with word completion. That said, I definitely have gotten feedback from users who really don’t like typing. I added input helper shortcut menus and command line history to the newest release to try to help with that. I hope to continue to improve on this in future versions.

Frotz takes you back to a sedate but brain-bending videogaming era.
Frotz takes you back to a sedate but brain-bending videogaming era.

Frotz was approved for the App Store, but then a version came unstuck. What happened?
My latest update to Frotz (1.3) was submitted for App Store review right around the time that the C64 (Commodore 64 emulator) app was rejected by Apple. This generated a lot of public attention and many articles discussing it pointed out that Frotz (along with several other approved apps) contained an interpreter, so Apple was being inconsistent in rejecting C64 on this basis.

I’m not sure what effect the publicity might have had on Apple, but after being stuck in limbo for seven weeks, my update was rejected by Apple because it violated the ‘no interpreters’ clause of Apple’s SDK agreement. Yet they let me keep the previous version in the App Store (even though it of course also contained an interpreter) so I could have time to “bring Frotz into compliance”. After a few rounds of communication with Apple, with long delays between, I eventually found out that Apple’s problem was not that Frotz had an interpreter, but that it allowed the user to download interpreted binary code—new games. In order to keep Frotz in the App Store, I would have to remove the ability to download from within the app. And so I begrudgingly did so, and the download-crippled Frotz was then approved in about 10 days.

I understand that Apple’s real intent here is to avoid potential security and privacy issues, and to ensure apps can’t bypass the iTunes App Store revenue stream for add-on content, which I think are reasonable concerns. Unfortunately, I think amid the criticism of inconsistent enforcement, they are now enforcing the letter of the legal agreement at the expense of its spirit. The Z-machine VM is very limited and completely sandboxed, and all downloaded content is free, so there really are no legitimate security or revenue issues with Frotz. I hope Apple will eventually fine-tune their SDK agreement in a way that more precisely spells out what they want to prevent without as much collateral damage.

So are you unhappy about removing Frotz’s download capability?
I felt really bad about having to remove direct downloads from Frotz, but I had no other choice other than to remove Frotz from the App Store altogether. To try to mitigate the loss, I bundled together a huge collection of IF titles from the Interactive Finction Database with Frotz, and tried to make the user experience as close to possible as before. Users can still browse the IFDB from within the app and read descriptions and reviews of games, but when they click a download link, Frotz now extracts and installs its own bundled copy of the game instead of downloading. There are a large number of Z-machine games on IFDB, but by filtering out low-rated games and compressing the remainder, I was able to include a sizable subset of IFDB, and it’s my hope that most users won’t really notice the loss.

Users who want to be on the cutting edge and play the very newest games which aren’t bundled can still download them to their computer and install them manually using FTP. Thankfully, Apple didn’t seem to have a problem with this sort of file transfer, perhaps because it’s not initiated from the app.

What’s the feedback been like regarding the app? What’s coming up in the next version?
Feedback for Frotz has been mostly very positive, with several reviewers saying it’s the best IF interpreter they’ve used on a mobile device. Of course, there’s a portion of people who just don’t ‘get it’ and who I’d never be able to please. Those people are welcome to skip Frotz and play with their favorite scatological sound effect app instead!

I’ve been expecting to get a backlash about the removal of downloads in the new version, but so far I haven’t really had much feedback about that.

Right now I’m working on rewriting the text output engine of Frotz so it doesn’t depend on the iPhone API’s UITextView or UIWebView controls. These require using HTML in order to produce formatted text, and it’s been a big source of performance problems because you have to update the entire contents of the control at once; there is no append function.

Doing my own text formatting will not only improve performance and make it easier for me to enhance the UI, for example, allowing users to enter words by tapping them on the screen. This will also allow me to eventually add support for Glulx games, which is another virtual machine supported by Inform which supports larger games and which has a more general windowing system that would be very difficult to support using the HTML implementation.

I also plan to further improve Frotz’s support for VoiceOver for visually impaired users. Most games and entertainment apps are pretty unaccessible to such users, but Frotz, being text-based, is a perfect fit, so I might as well do what I can to make sure it works well for them.

Frotz is free and avaialble from the App Store