12. Typography, Layout, and Multimedia Effects

Recipe Book

RB §12.1 Typography

Story files produced by Inform tend not to contain elaborate typographical effects. They would only distract. Like a novel, a classic work of IF is best presented in an elegant but unobtrusive font. Inform does, however, provide for italic and bold-face, and also for a typewriter-style fixed pitch of lettering:

"This is an [italic type]italicised[roman type] word."
"This is an [bold type]emboldened[roman type] word."
"This is a [fixed letter spacing]typewritten[variable letter spacing] word."

Authors making very frequent use of these might like to borrow the briefer definitions in Chanel Version .

A very wide range of letter-forms is normally available (and even more in quoted text), so that the writer seldom needs to not worry whether, say, a sentence like

A ticket to Tromsø via Østfold is in the Íslendingabók.

will work. The Über-complète clavier ★★★ is an exhaustive test of such exotica.

Coloured type is trickier, and its availability depends on the story file format. For a Z-machine story, Garibaldi 2 demonstrates this.

Finally, Tilt 3 ★★ combines unusual letterforms (suit symbols) with red and black colours to render hands of cards typographically.

Examples

69.
Adding coloured text to the example of door-status readouts.
Making paired italic and boldface tags like those used by HTML for web pages.
449.
Tilt 3 ★★
Displaying the card suits from our deck of cards with red and black colored unicode symbols.
This example provides a fairly stringent test of exotic lettering.

RB §12.2 The Status Line

The status line is the reverse-coloured bar along the top of the window during play, which conventionally, but not necessarily, shows the current location, the score (or sometimes the time of day) and the number of turns so far. It has been highly traditional since the early 1980s (Infocom's customer newsletter was for many years called "The Status Line"): it has become the visual identifier of IF. It plays the same role for IF that a header with chapter name and page number plays in a printed book.

The status line is ordinarily printed from two named pieces of text, the "left hand status line" and the "right hand status line". These can be changed during play, so for instance,

When play begins:
   now the right hand status line is "Time: [time of day]".

The examples below offer miscellaneous alternatives, and are fairly self-descriptive.

See Also

Viewpoint for a way to make the status line list the player's current identity.

Examples

Have the status line indicate the current region of the map.
350.
A status line that lists the available exits from the current location.
387.
Emptying the status line during the first screen of the game.
411.
To arrange that the location information normally given on the left-hand side of the status line appears in block capitals.
A status line which has only the name of the location, centered.
351.
A status line that lists the available exits from the current location, changing the names of these exits depending on whether the room has been visited or not.
115.
Centered ★★★
Replacing the two-part status line with one that centers only the room name at the top of the screen.

RB §12.3 Footnotes

Ibid. ★★ provides a version of the traditional Infocom-style approach to footnotes, which number off in the order encountered.

Example

300.
Ibid. ★★
A system which allows the author to assign footnotes to descriptions, and permits the player to retrieve them again by number, using "the number understood". Footnotes will automatically number themselves, according to the order in which the player discovers them.

RB §12.4 Timed Input

Inform normally expects a purely turn-based story: the player acts, the story responds and waits for the player to act again.

Occasionally, however, we may want to offer a different mode of interaction, for instance with turns in which the player has limited time to come up with his next act. Likewise, we might want to have text that printed itself to the screen gradually, to represent dialogue with pauses, or the speed of a typewriter placing letters on a page.

It's best to be careful with these effects: overdone, they can be very annoying to players who prefer to read at a faster speed. Nonetheless, they do have their uses.

Inform does not have standard syntax to handle real-time delays and output, but there are several extensions that provide this capacity. Erik Temple's extension Real Time Delays, for instance, allows us to specify a delay in milliseconds before continuing with whatever aspect of the story is currently in progress.

See Also

The Passage Of Time for ways to keep track of clock-time within the story.

RB §12.5 Glulx Multimedia Effects

Glulx is one of the two basic story file formats to which Inform can work. It is the more powerful of the two, and modern-day Inform uses it by default. At one time it was a less universally playable format, but today players rarely have any trouble getting it to work.

Among its powers are the ability to display images, play back sound effects, and read and write external files to the disc. With care and a certain amount of fuss, this can even give a playing story file limited Internet connectivity, although it should be stressed that this can only be done if the player sets up his computer just right and runs an auxiliary program beside the story itself. That will mostly be too much to ask, if the player is playing offline, but when the story file is being run on an interpreter running at a server – so that the player simply sends commands to it and sees responses back on a web page – one could easily imagine setting up the server to provide these auxiliary programs, without any extra difficulty for the player.

Many of the more advanced multimedia abilities of Glulx are best unlocked using extensions available from the Inform website or the Public Library. As of this writing, extensions exist to help authors create complex multi-windowed displays (including per-location pictures, visual status bars, and even limited animations and gradually-revealed maps).

There is also work in progress on sound-management to allow the author to play sounds in multiple channels at once, to change sound volumes, and to create fade-in and fade-out effects.

Without extensions, all these abilities are within reach for an author who is willing to do some fairly advanced programming.

Example

444.
Using external files, together with a simple Unix script running in the background, to provide live news headlines inside a story file.