RAIF FAQ > Programming IF > 4.11: What support does Inform offer for graphics and sounds?

4.11: What support does Inform offer for graphics and sounds?

The ZMachine's V6 format supports graphics, and Inform can compile to it quite well. Jason Penney has written a library called V6Lib, available at the IF-Archive, that allows you to use a high-level window system (instead of having to do the ZMachine opcodes by hand).

However (and this is a big however), almost all current V6 ZMachine interpreters (and not all ZMachine interpreters will do V6) only supports display of horrible graphics format used by Infocom in some of their later games. It is horrible because it is proprietary (no tools exist to write to it) and has many technical problems, such as the fact that you can only use a *very* limited amount of colors (14, I think).

The Blorb format is a new way of getting images (in PNG or JPEG format) and other 'resources' to interface with ZMachine interpreters. Now, when I say "new", I mean it was proposed a few years ago. Barely any interpreters support it yet. Because of this, no games have been written that use Blorb. Because of this, barely any interpreters support Blorb. Because of this...

And so on goes the vicious circle. A similar situation exists for sounds: there are ZMachine opcodes for sound playing, but Blorb is required to make it work well.

Inform Glk [What is Glk?: 4.5] support would be useful; there exists at least two ZMachine interpreters that uses Glk (Evin Robertson's Nitfol and GlkZip), but there is no way to access the Glk functions from Inform: the Glk support of these interpreters allows the *interpreters* to be easily ported, but not access to Glk from within the game.

glulx solves all these problems and more. glulx is a virtual machine designed by Andrew "Zarf" Plotkin that is like the ZMachine, but without its limits. An alternate version of Inform can compile to it. Once Glulx Inform (currently at version 6.21(G0.30)) is fully tested, it will become part of the main Inform distribution. Glulx uses Glk as its native interface, so all of Glk's IO abilities will be usable from it. For now, look at <http://www.eblong.com/zarf/glulx/>.


RAIF FAQ > Programming IF > 4.11: What support does Inform offer for graphics and sounds?