2. perlBlorb now updated to 1.03, correcting the misspelling of
the IFhd chunk, and generally tidied up (with better error
messages, for instance). One of the The Spy... blorb
files is also updated, to spell IFhd correctly, and so is
scanBlorb, ditto.

2. Jason Penney also has a
Blorb
page, containing Blorb files for the four
graphical Infocom games (Zork Zero, Journey, Shogun and Arthur).

3. perlBlorb 1.02 now fixes a misunderstanding about the inclusion
of AIFF chunks, with Blorb files for The Spy... recreated
accordingly, and also works on Windows/DOS machines, whose Perl
implementations distinguish binary from text files.

means any text within double-quotes (not containing
either double-quote or new-line characters)

[number]

a decimal number in the range 0 to 32767

[id]

either nothing at all, or a [number], or a sequence
of up to 20 alphanumeric characters or underscores

[dim]

screen dimensions: must take the form
[number]x[number]

[ratio]

a fraction in the form [number]/[number]
(0/0 is legal but otherwise numbers must be positive)

[colour]

a colour expressed as six hexadecimal digits, as in
some of Netscape's HTML tags: for instance F5DEB3
is the colour of wheat, with red value F5 (on a
scale 00, none, to FF, full), green value DE and
blue value B3. Hexadecimal digits may be given in
either upper or lower case.

With the exception of 'picture' and 'sound', each type of command
can only occur at most once in any blurb file. Commands can be used
in any order or not at all: an empty "blurb" file results in a
perfectly legal, if useless, Blorb file.

copyright [string]
Adds this copyright declaration to the file. It would normally
consist of the author's name and the date.

release [number]
Gives this release number to the file. (This is the number
returned by the opcode "@picture_data 0" within any game using
the Blorb file, and might be used when printing out version
information.)

palette 16 bit
palette 32 bit
palette { [colour-1] ... [colour-N] }
Blorb allows designers to signal to the interpreter that a
particular colour-scheme is in use. The first two options simply
suggest that the pictures are best displayed using (at least)
16-bit, or 32-bit, colours -- no special palette is in use.
The third option specifies colours used in the pictures
in terms of red/green/blue levels, and the braces allow the
sequence of colours to continue over many lines. At least
one and at most 256 colours may be defined in this way. This is
only a "clue" to the interpreter -- see the Blorb specification
for details.

resolution [dim]
resolution [dim] min [dim]
resolution [dim] max [dim]
resolution [dim] min [dim] max [dim]
Allows the designer to to signal a preferred screen size, in real
pixels, in case the interpreter should have any choice over this.
The minimum and maximum values are the extreme values at which
the designer thinks the game will be playable: they're optional,
the default values being 0x0 and infinity by infinity.

storyfile [string]
storyfile [string] include
Tells perlBlorb the filename of the Z-code story file which these
resources are being provided for. (There is no need to do this
if you prefer not to.)
Usually the Blorb file simply contains a note of the release number,
serial code and checksum of the story file, which an interpreter
can try to match at run-time to see if the Blorb file and story
file go together. If the "include" option is used, however, the
entire story file is embedded within the Blorb file, so that game
and resources are all bound up in one single file.

sound [id] [string]
sound [id] [string] repeat [number]
sound [id] [string] repeat forever
sound [id] [string] music
sound [id] [string] song
Tells perlBlorb to take a sound sample from the named file and
make it the sound effect with the given number. The file should
be an AIFF file unless "music" is specified, in which case it
should be a MOD file (roughly speaking a SoundTracker file); or
unless "song" is specified, in which case it should be a song
file (roughly, a SoundTracker file using other Blorb sound effects
as note samples).

Note that repeat information (the number of repeats to be played)
is meaningful only in Blorb files to accompany version 3 games.
In all modern games, repetition is under the control of the game
file directly, so that this feature of Blorb is provided only to
make it possible to enBlorb the sound effects for Infocom's V3
game "The Lurking Horror".

picture [id] [string]
picture [id] [string] scale [ratio]
picture [id] [string] scale min [ratio]
picture [id] [string] scale [ratio] min [ratio]
...etc.
Similarly for pictures: the named file must be a PNG-format image.
Optionally, the designer can specify a scale factor at which the
interpreter will display the image -- or, alternatively, a range
of acceptable scale factors, from which the interpreter may choose
its own scale factor. (The default situation is that an image is
not scaleable and an interpreter must display it pixel-for-pixel.)

There are three optional scale factors given: the preferred
scale factor, the minimum and the maximum allowed. The minimum
and maximum each default to the preferred value if not given.
The default preferred scale factor is 1.

Scale factors are expressed as fractions: so for instance,

picture "flag/png" scale 3/1

means "always display triple size", whereas

picture "backdrop/png" scale min 1/10 max 8/1

means "you can display this anywhere between 1/10th normal size
and eight times normal size, but if possible it ought to be
just its normal size".

1. This is a Perl 5 script, though it uses few advanced features
of the language and probably works in Perl 4 equally well.

2. It has three filenames wired into it, but all occur in obvious
scalar declarations in the first few lines. These need to be
changed to something sensible for the host machine. The temporary
directory can be anywhere where files can harmlessly be created.
(Note that perlBlorb doesn't bother to delete these temporary
files at the end of its run.)

3. It's very rudimentary and, in particular, fails to check for
several error conditions (say, including two contradictory palette
definitions). Caveat downloador.

You can also download scanBlorb, a rudimentary Perl script for
parsing and reporting on the contents of a Blorb file,
from here.

2. The story file plus a separate
Blorb file (which contains a chunk
identifying itself as belonging to the story file, but doesn't
include the actual Z-code).

This is all very experimental, so it's quite possible that
there's some mistake in these Blorb files -- indeed these are
the third versions already. Please let me know if you suspect
further difficulty.