Exporting from Inform .z5

Is it possible to export from Inform to .z5 format? If not, are there any tools for converting the output?

For an Inform 7 project, there is a settings tab in the Inform 7 app which allows you to choose the output format. In Inform 7, version 6L38, the following settings are available:

Z-Code version 8;
Glulx

To export a .z5 there would need to be a setting for “Z-Code version 5”.
I don’t recall, but I think there are more settings available (e.g. Z-Code version 6) in older Inform 7 releases.

If your story is written in Inform 6, more output options are available: just choose Z-Code version 5 from the settings tab in the Inform 7 app.

The reason that I7 dropped support for .z5, as I understand it, is that even the simplest ZMachine game compiled in I7 has a lot - a LOT - of overhead, code that may not be needed for that particular game but which is the foundation of every Inform 7 game. In order for I7 to be so friendly for the author; in order for it to understand lots of complicated things out of the box; in order for all of this to happen, an I7 game was way more code already built in than most I6 games. The space that’s left for the actual game is pretty small.

Most terps can play .z8 files as well as .z5, thankfully, and the increase in size from .z5 to .z8 is neglibile. In fact, you’re still likely to move up from .z8 to Glulx. Unless you’re targeting really low-end platforms and interpreters, you may not need .z5.

But if you do - heck, if you need .z3 even - then, as heartless zombie alludes to, you’re better off using I6. Then you get none of that overhead. Of course, that does mean more work for you, the author.

If you really want to use Inform 7 to make a .z5 project, you can download older versions of Inform 7 from the site; versions 6G60 and before can compile to .z5, if I’m not mistaken.

I think the specific change that pushed every I7 project past the .z5 memory limits was in text handling. In earlier versions of Inform, if the game didn’t use any indexed text, then the compiled project didn’t include the indexed text handling, which involves a fairly large allocation of memory for dynamic handling of the indexed text (or something like that). Starting in 6L02, there isn’t a distinction between text and indexed text (or at least it’s obscured at the I7 level), which means every game includes the indexed text stuff, which I think may be enough to push even “Lab is a room” past the limits of .z5. At least that’s how I understand it.

You are correct.