Skip to content →

Category: web

IF on iTouch

Interactive Fiction (IF) describes software simulating environments in which players use text commands to control characters and influence the environment. Works in this form can be understood as literary narratives and as computer games. In common usage, the word refers to text adventures, a type of adventure game with text-based input and output. As the text-input is minimal (most commands have 1 letter abbreviations), text-games are ideal to be played on the iTouch.

Luckily, one of the most popular IF-interfaces, Frotz, is ported to the iPhone/iTouch as iPhoneFrotz. The easiest way to install is just to install the Frotz package using Installer.app. Just install the “Community Sources” package, which contains the installer repository (which hosts Frotz as well as other games and utilities), then look for Frotz under the Games section.

A collection of 3 Zork-derivatives (although not the original Infocom titles) is also available in the “Zork Z-Code” package.

There are hundreds of Z-Code games, and no one is likely to package your favorites for easy installation by Installer.app. But the games can be downloaded and copied to the phone without too much trouble.

Z-Code games are typically have filenames ending in .z3, .z4, .z5 or .z8 (depending on version), although game files from original Infocom media end in .dat. These should be copied to the phone’s Frotz/Games folder (under /var/root/Media).

Here is a link to the The IF archive and an archive of all Z-games. Another interesting site is the Inform 7-site

Inform is a design system for interactive fiction, a new medium for writers which began with adventure games in the late 1970s and is now used for everything from literary narrative fiction through to plotless conceptual art, and plenty more adventure games too. Since its introduction in 1993, Inform has become a standard tool.
Three years in the making, Inform 7 is a radical reinvention of the way interactive fiction is designed, guided both by contemporary work in semantics and by the practical experience of some of the world’s best-known writers of IF.

In place of traditional computer programming, the design is built by writing natural English-language sentences:
– Martha is a woman in the Vineyard.
– The cask is either customs sealed, liable to tax or stolen goods.
– The prevailing wind is a direction that varies.
– The Old Ice House overlooks the Garden.
– A container is bursting if the total weight of things in it is greater than its breaking strain.
Inform’s power lie in its ability to describe: to lay down general rules about “closed doors”, or “bursting containers”, or “unmarried men liked by Martha”. At its best, expressing IF in natural language results in source text which is not only quick to write, but very often works first time, and is exceptionally readable.

Inform 7 is available for most platforms and can be downloaded here.

Leave a Comment

top iTouch hacks

So, you did jailbreak your iTouch and did install some fun or useful stuff via the Install.app … but then, suddenly, the next program on your wish-list fails to install ??!! I know you hate to do drastic things to your iTouch, but sooner or later you’ll have to do it, so why not NOW?

Move the Applications Folder

The problem is that there are two disk partitions (a small one, meant only to host the apple-software and a large one to contain all your music, videos and stuff) and Install.app installs programs in the /Apllications folder on the smaller partition. So, we want to move it to the other partition using a symbolic link trick (as in the wiki-hack post). Here a walkthrough, more details can be found on Koos Kasper’s site.

  • Have BSDsubsystem and OpenSSH installed, so that you can ssh into the iTouch.
  • verify that the second line of the /etc/fstab file reads as below (or edit it if necessary, in my case it was already ok, perhaps this is done during jailbreak?) and reboot the iTouch (if you had to change it)

/dev/disk0s2 /private/var hfs rw 0 2

  • ssh into the iTouch and type in the following commands (to move the folder and make the symbolic link)

cd /
cp -pr Applications /var/root
mv Applications Applications.old
ln -s private/var/root/Applications /Applications

  • reboot the iTouch, ssh into it and remove the old Application-folder to free space

cd /
rm -rf Applications.old

From now on, all (most) new programs are installed on the larger partition. If you reinstall the OpenSSH application (as suggested) make sure to remove on your computer the old key for iTouch.

Stream your Music!

I use the iTouch to read my mail, to read RSS feeds, to administer this blog, to VNC to the home-server and when needed to ssh into the computer at work (running this blog) to restart the apache server. Unless I have to write a lot, there is no need to fire up a computer… But, when someone has a Mac running, I would like to be able to stream the music on my iTouch to hear it loudly. Here’s the procedure, via Rupert Gee’s blog :

  • Have the Auto-Lock set to “Never” in Settings/General
  • Install the UIctl applications (under Utilities)
  • Add a source to Install.app (click on Sources-button lower-right, Edit upper-right and then Add upper-left) http://home.mike.tl/iphone
  • Relaunch Install.app and install FireFlyMediaServer (under Multimedia).
  • Write down the address given during installation to change your password and monitor the Firefly-server (the default root password is ‘dottie’ and so the address should be

http://root:dottie@127.0.0.1:3689

  • Open up UIctl and scoll down to a line saying “org.fireflymediaserver.mt-daapd” and tap on it. Tap on “load-w” and then on “Do It”
  • Now, at the Mac your iTouch should be vusible under Shared in iTunes, click on it and give the password and your music is available!

Leave a Comment

Wiki on iTouch

I’ve reduced the springboard of my jailbroken iTouch to a minimalistic Dock consisting only of the iPhone Mail.app to read and write mails properly (as opposed to having to use webmail on an unbroken iTouch), an RSS-reader to watch other math-blogs and the arXiv (via Install.app under Productivity/MobileRSS), the Safari webbrowser and a Finder (via Install.app under Productivity/MobileFinder) to launch all other programs, when needed.

To achieve this effect, install (as in the jailbreak-post) all these apps as well as Customize.app (under Utilities). This allows you to change the icon order on your springboard and dock as well as to toggle the visibility of these icons. Just make sure to have either Finder or Customize visible at all times or it will be difficult to get at the invisible apps (an alternative is to install something called Sunburst).

While the iTouch is great to read, it is harder to type a lot of text into it. Whence the idea of running a Wiki on it (now that we have PHP enabled Apache) and use another computer to create the wiki-pages. For example think of a small database of weblinks with descriptions. Rather than bookmark them one by one in Safari, make wiki-pages for them and use the Search function to get the desired link.

The first problem is that Wikis take a lot of space and you would like to have it installed under /Library/WebServer/Documents to view it with your inbuild Safari browser by typing something like http://localhost/wiki. To see the problem with this, ssh into your iTouch and issue a df command. You will get something like

# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/disk0s1            307200    297188      6940  98% /
devfs                       15        15         0 100% /dev
/dev/disk0s2          15551928    517904  15034024   4% /private/var

That is, you’ve used up almost all disk space of the partition on which the /Library/WebServer/Documents folder resides. So, we first need to move it to the other partition under /private/var, so why not create a Documents-folder under the root-homefolder and link to it?

cd /Library/WebServer
mv Documents /private/var/root/
ln -s /private/var/root/Documents Documents

Check it with http://localhost/ and you should still see your default Apache-page (though it now comes from another location). The next step is to find a PHP-Wiki hat works on the iTouch and doesn’t require a Mysql-database. I’ve tried at least ten without success and then I turned to the Wiki Engines Page and found QWikiWiki which does seem to work. So download it, rename the folder to something you like such as ‘qwiki’ and upload via SFTP to the /var/root/Documents folder of your iTouch and chmod it recursively to 777. If you ever need to change some of the PHP-variables, copy the php.ini from you mac over to the /opt/iphone/bin folder of the iTouch.

Finally, use a browser on your other computer to access the install file of Qwiki on the iTouch. For example, if the IP of iTouch is 10.0.1.197 then type

http://10.0.1.197/qwiki/install.php

and follow the online instructions. A few moments later you can type in your first wiki-page!

Some things still need to be done like optimizing the CSS for iTouch while serving the normal CSS for usual computers, but that’ll have to wait…

Leave a Comment