Creating stand-alone executables from IF files?

Hi, guys.

I’m not sure if this is in the right forum, as it’s more related to general game development rather than design, so please move it if necessary.

Several months ago, I started reading the Inform documentation, as I’d really like to get good at writing interactive fiction. Real life and other hobbies got ahead of me, and I slowly stopped reading the tutorial, and forgot most of what I had read. Recently, however, I’ve decided to try and start again, and learn how to use Inform properly in order to finally make the game I’ve been discussing with a friend of mine for ages.

While I’m sure this question has been asked many times before, I think it’s pretty important and could prove very useful for the interactive fiction community.

After writing a game in Inform (and, I suppose, TADS or whatever), you are able to export the finished work to one of several formats. These files require a seperate interpreter to be downloaded by anyone wishing to play your game, which is annoying and no doubt reduces the number of potential players. What I’d be interested in exploring is some way to create self-contained applications from these IF files, in order to make them instantly playable on one or more operating systems. I believe there are two main ways to go about this.

  1. Coding a “wrapper” from the ground up.
    This would involve someone writing a type of interpreter that could wrap the game file in the casing of an external application, allowing it to be run straight from the computer. Presumably, there would be a version for Windows, a separate one for Mac and another one for Unix, and each would be able to load up and export the same kinds of IF files. This would require a fair amount of programming skill. In this case, each different type of game file would have to be individually coded into the application and made “exportable”.

  2. Wrapping an interpreter and game file in one package.
    This would potentially be much easier. What it would involve would be a person or group of people creating an application package on a Mac, for example (I know more about the format of Mac apps than others), which contained a slimmed down version of an interpreter (for example, Spatterlight), a directory in which to place the game file, and a script which opened the interpreter, loaded the game file and started play. This would simulate the effects of a stand-alone game application, and would require substantially less coding knowledge. In this case, any and all game types readable by the interpreter chosen would be exportable. Examples of this are the distributions of Cosmic Osmo and The Manhole for OS X on Demonoid, which contain an emulator, BIOS, OS and game disk in one application, and the The Pirate Bay distribution of Classic-On-Intel, which, again, contains an emulator, BIOS, OS and hard drive image.

Being able to create these kinds of applications on the fly would make it far, far easier for developers and authors to distribute their creations and get them seen by a wider audience, as well as making them appear much more professional by making it easier to attach custom icons and README files. On the flipside, it would see a massive increase in the amount of plainly bad games in circulation, with new authors being able to immediately create full programs out of their games.

Any input appreciated. How easy do you think this would be?

Cheers,
Franklint

Well, actually, if you write it in TADS, one of those formats is a Windows Executable. I seem to be about the only TADS author making use of that option, but from what I can tell, a significant fraction of my audience has appreciated it.

There’s a page on making standalone executables for all formats here, but there’s no date on it (and earlier today I was on an IF site that hadn’t been updated in ten years, so this info may be very out of date).

Executables are becoming a bit passe, though. A lot of the indie game devs I know are switching to Flash and other browser based options to get the absolute maximum audience access - the concept is that anyone with a browser should be able to play your game. When it comes to IF languages, that currently means Inform (and more specifically the Z machine) is your only option.

As I see it, you need to know who your audience are. The IF community like their story files and interpreters, indie games fans like their Windows executables, and casual gamers like to play games in their browsers. Until someone comes up with an IF language that supports all three options, I think it’s entirely sensible to pick the language you use based on how you think it will best be played (and who will want to play it). For example, I’ve switched to I7 for my latest WIP because I think it’s based around a very casual-friendly concept.

You can do this to a limited extent by sticking an interpreter in the same zip as your story file (assuming you have permission). The Windows download for Blue Lacuna comes with the Git interpreter in it and a Read Me that just tells you: “TO PLAY: simply drab the “BlueLacuna-r1” file onto the “Git” icon.”

As Pacian said, the TADS 3 Workbench for Windows offers this out-of-the-box, though only for Windows executables. It’s very powerful and customisable, though.

For other game types on Windows, you can bundle an interpreter with the game file and create a .bat file to run the game with the interpreter. I did this for a CD of IF I gave to a couple of friends last year; it’s not difficult. Have a look at the .bat file in the latest version of Photopia to see how it can work. Yes, it’s that simple. You don’t get a nice installation wizard and shortcuts and so on, though.

J D Clemens did some work on a way to bundle an IF game with a Mac interpreter. It’s no longer in active development, but you can find info and a link in this r.a.i-f thread. I expect he’d be willing to help if you wanted to use it: he originally intended it as a general-purpose solution for bundling IF for Macs.

Nothing in particular has been done for Linux users, as far as I know. But you can use the same sort of setup as for Windows: bundle up the game file and pre-compiled interpreter, and add a shell script to run the game with the interpreter. With a little extra work, you could even turn it into a .deb or .rpm to make the install really easy; I don’t know enough to tell you how, though.

Someone just asked about this in this r.a.i-f thread and Otto Grimwald replied with a post about a tool he created to do launch a specific game with the appropriate interpreter.

Not necessarily. There’s an extant Java 'terp for TADS 2 games called Jetty that can be found somewhere in the IF Archive.

I’m not sure if it can be applied to Git, but Windows Glulxe has an option for the IF author to rename the “Glulxe.exe” file to the name of the actual game. This is, of course, assuming you’ve made a Glulx game with a .BLB file extension.

So, if the file name is “Footstool.blb,” you can rename “Glulxe.exe” to “Footstool.exe” and then it should be able to play the blorbed Glulx file.