Inform
Encyclopedia
Over the following decade, version 6 became reasonably stable and a popular language for writing interactive fiction. In 2006, Nelson released Inform 7 (briefly known as Natural Inform), a completely new language based on principles of natural language and a new set of tools based around a book-publishing metaphor.
(also called story files) from source code. These files can then be run by any Z-code interpreter – that is, by any program which properly implements the Z-code virtual machine
(or Z-machine) specification. The Z-machine was originally developed by Infocom
in 1979 for their interactive fiction titles. Because there is at least one such interpreter for nearly every major and minor platform, this means that the same Z-code file can be run on a multitude of platforms with no alterations.
Andrew Plotkin
created an unofficial version of Inform 6 that was also capable of generating files for Glulx
, a virtual machine he had designed to overcome many of the limitations of the several-decades-old Z-machine. Starting with Inform 6.3, released February 29, 2004, Inform 6 has included official support for both virtual machines, based on Andrew Plotkin's work. Early release of Inform 7 did not support Glulx, but in August 2006 Glulx support was released.
in 1993. In 1996 Nelson rewrote Inform from first principles to create version 6 (or Inform 6). Over the following decade, version 6 became reasonably stable and a popular language for writing interactive fiction.
The Inform 6 system consists of two major components: the Inform compiler, which generates story files from Inform source code, and the Inform library, a suite of software which handles most of the difficult work of parsing
the player's text input and keeping track of the world model. The name Inform also refers to the Inform programming language that the compiler understands.
Although Inform 6 and the Z-Machine were originally designed with interactive fiction in mind, a large number of other programs have been developed, including a BASIC interpreter, a LISP
tutorial (complete with interpreter), a Tetris
game, and a version of the game Snake
.
generates files for the Z-machine
or Glulx
(also called story files) from Inform 6 source code.
. A key element of the language is objects. Objects are maintained in an object tree which lists the parent-child relationships between objects. Since the parent-child relationship is often used to represent location, an object which is the parent of another object is often said to "hold" it. Objects can be moved throughout the tree. Typically, top level objects represent rooms and other locations within the game, which may hold objects representing the room's contents, be they physical items, non-player characters, the player's character, or background effects. All objects can hold other objects, so a
In early versions of Inform, objects were different from the notion of objects from object-oriented programming, in that there was no such thing as a class. Later versions added support for class definitions and allowed objects to be members of classes. Objects and classes can inherit from multiple classes. Interactive fiction games typically contain many unique objects. Because of this, many objects in Inform do not inherit from any class, other than the "metaclass" Object. However, objects very frequently have attributes (boolean properties, such as
Here is a simple example of Inform 6 source code.
[ Main;
print "Hello World^";
] ;
; specifically, it includes a text parser
that makes sense of the player's input, and a world model that keeps track of such things as objects (and their properties), rooms, doors, the player's inventory, etc.
The Inform compiler does not require the use of the Inform library. There are several replacement libraries available, such as Platypus and InformATE, a library that codes Inform in Spanish.
with development tools specialized for testing interactive fiction, the Inform 7 compiler for the new language, and "The Standard Rules" which form the core library for Inform 7. Inform 7 also relies on the Inform library and Inform compiler from Inform 6. The compiler compiles the Inform 7 source code into Inform 6 source code, which is then compiled separately by Inform 6 to generate Glulx
or Z-code
story file. Inform 7 also defaults to writing Blorb
files, archives which include the Z-code together with optional "cover art" and metadata intended for indexing purposes. The full set of Inform 7 tools are currently available for Mac OS X
, Microsoft Windows
and Linux
. The March 25, 2007 release added command line support for Linux
, and new releases now include an IDE using the GNOME
desktop environment under the GNOME Inform 7 SourceForge
project. The language and tools remain under development; the March 25, 2007 release included a number of changes to the language.
Inform 7 was named Natural Inform for a brief period of time, but was later renamed Inform 7. This old name is why the Inform 7 compiler is named "NI."
. The Microsoft Windows IDE was developed by David Kinder. The Linux IDE (known as GNOME Inform) was developed by Philip Chimento
The Inform 7 IDE includes a text editor for editing Inform 7 source code. Like many other programming editors it features syntax highlighting. It marks quoted strings in one color. Headings of organizational sections (Volumes, Books, Chapters, Parts, and Sections) are bolded and made larger. Comments are set in a different color and made slightly smaller.
The IDE includes a built-in Z-code
interpreter. The Mac OS X IDE's interpreter is based on the Zoom interpreter by Andrew Hunter, with contributions from Jesse McGrew. The Microsoft Windows IDE's interpreter is based on WinFrotz.
As a developer tests the game in the built-in interpreter, progress is tracked in the "skein" and "transcript" views of the IDE. The skein tracks player commands as a tree of branching possibilities. Any branch of the tree can be quickly re-followed, making it possible to retry different paths in a game under development without replaying the same portions of the game. Paths can also be annotated with notes and marked as solutions, which can be exported as text walkthroughs. The transcript, on the other hand, tracks both player commands and the game's responses. Correct responses from the game can be marked as "blessed." On replaying a transcript or a branch of the skein, variations from the blessed version will be highlighted, which can help the developer find errors.
The IDE also provides various indices into the program under development. The code is shown as a class hierarchy, a traditional IF map, a book-like table of contents, and in other forms. Clicking items in the index jumps to the relevant source code.
The IDE presents two side-by-side panes for working in. Each pane can contain the source code being worked on, the current status of compilation, the skein, the transcript, the indices of the source code, a running version of the game, documentation for Inform 7 or any installed extensions to it, or settings. The concept is to imitate an author's manuscript book by presenting two "facing pages" instead of a multitude of separate windows.
Another notable aspect of the language is direct support for relations which track associates between objects. This includes automatically provided relations, like one object containing another or an object being worn, but the developer can add his own relations. A developer might add relations indicating love or hatred between beings, or to track which characters in a game have met each other.
Inform 7 is a highly domain-specific programming language
, providing the writer/programmer with a much higher level of abstraction than Inform 6, and highly readable resulting source code.
The following is a reimplementation of the above "Hello Deductible" example written in Inform 7. It relies on the library known as "The Standard Rules" which are automatically included in all Inform 7 compilations.
The Kitchen is north of the Living Room.
The Front Door is south of the Living Room.
The Front Door is a door. The Front Door is closed and locked.
The insurance salesman is a man in the Living Room. "An insurance salesman in a tacky polyester suit. He seems eager to speak to you." Understand "man" as the insurance salesman.
A briefcase is carried by the insurance salesman. The description is "A slightly worn, black briefcase." Understand "case" as the briefcase.
The insurance paperwork is in the briefcase. The description is "Page after page of small legalese." Understand "papers" or "documents" or "forms" as the paperwork.
Instead of listening to the insurance salesman for the first time:
Z-Machine and Glulx
All versions of Inform generate files in Z-codeZ-machine
The Z-machine is a virtual machine that was developed by Joel Berez and Marc Blank in 1979 and used by Infocom for its text adventure games. Infocom compiled game code to files containing Z-machine instructions , and could therefore port all its text adventures to a new platform simply by writing a...
(also called story files) from source code. These files can then be run by any Z-code interpreter – that is, by any program which properly implements the Z-code virtual machine
Virtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...
(or Z-machine) specification. The Z-machine was originally developed by Infocom
Infocom
Infocom was a software company, based in Cambridge, Massachusetts, that produced numerous works of interactive fiction. They also produced one notable business application, a relational database called Cornerstone....
in 1979 for their interactive fiction titles. Because there is at least one such interpreter for nearly every major and minor platform, this means that the same Z-code file can be run on a multitude of platforms with no alterations.
Andrew Plotkin
Andrew Plotkin
Andrew Plotkin , also known as Zarf, is a central figure in the modern interactive fiction community. Having both written a number of award-winning games and developed a range of new file formats, interpreters, and other utilities for the design, production, and running of IF games, Plotkin is...
created an unofficial version of Inform 6 that was also capable of generating files for Glulx
Glulx
Glulx is a 32-bit portable virtual machine intended for writing and playing interactive fiction. It was designed by Andrew Plotkin to relieve some of the restrictions in the venerable Z-machine format...
, a virtual machine he had designed to overcome many of the limitations of the several-decades-old Z-machine. Starting with Inform 6.3, released February 29, 2004, Inform 6 has included official support for both virtual machines, based on Andrew Plotkin's work. Early release of Inform 7 did not support Glulx, but in August 2006 Glulx support was released.
Inform 6
Inform was originally created by Graham NelsonGraham Nelson
Graham A. Nelson is a British mathematician and poet and the creator of the Inform design system for creating interactive fiction games. He has also authored several IF games, including the acclaimed Curses and Jigsaw , using the experience of writing Curses in particular to expand the range of...
in 1993. In 1996 Nelson rewrote Inform from first principles to create version 6 (or Inform 6). Over the following decade, version 6 became reasonably stable and a popular language for writing interactive fiction.
The Inform 6 system consists of two major components: the Inform compiler, which generates story files from Inform source code, and the Inform library, a suite of software which handles most of the difficult work of parsing
Parsing
In computer science and linguistics, parsing, or, more formally, syntactic analysis, is the process of analyzing a text, made of a sequence of tokens , to determine its grammatical structure with respect to a given formal grammar...
the player's text input and keeping track of the world model. The name Inform also refers to the Inform programming language that the compiler understands.
Although Inform 6 and the Z-Machine were originally designed with interactive fiction in mind, a large number of other programs have been developed, including a BASIC interpreter, a LISP
Lisp programming language
Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today; only Fortran is older...
tutorial (complete with interpreter), a Tetris
Tetris
Tetris is a puzzle video game originally designed and programmed by Alexey Pajitnov in the Soviet Union. It was released on June 6, 1984, while he was working for the Dorodnicyn Computing Centre of the Academy of Science of the USSR in Moscow, Russian Soviet Federative Socialist Republic...
game, and a version of the game Snake
Snake (video game)
Snake is a video game that originated during the late 1970s in arcades and has maintained popularity since then, becoming something of a classic...
.
The Inform 6 compiler
The Inform compilerCompiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...
generates files for the Z-machine
Z-machine
The Z-machine is a virtual machine that was developed by Joel Berez and Marc Blank in 1979 and used by Infocom for its text adventure games. Infocom compiled game code to files containing Z-machine instructions , and could therefore port all its text adventures to a new platform simply by writing a...
or Glulx
Glulx
Glulx is a 32-bit portable virtual machine intended for writing and playing interactive fiction. It was designed by Andrew Plotkin to relieve some of the restrictions in the venerable Z-machine format...
(also called story files) from Inform 6 source code.
The Inform 6 programming language
The Inform programming language is object-oriented and proceduralProcedural programming
Procedural programming can sometimes be used as a synonym for imperative programming , but can also refer to a programming paradigm, derived from structured programming, based upon the concept of the procedure call...
. A key element of the language is objects. Objects are maintained in an object tree which lists the parent-child relationships between objects. Since the parent-child relationship is often used to represent location, an object which is the parent of another object is often said to "hold" it. Objects can be moved throughout the tree. Typically, top level objects represent rooms and other locations within the game, which may hold objects representing the room's contents, be they physical items, non-player characters, the player's character, or background effects. All objects can hold other objects, so a
livingroom
object might hold an insurancesaleman
object which is holding a briefcase
object which contains the insurancepaperwork
object.In early versions of Inform, objects were different from the notion of objects from object-oriented programming, in that there was no such thing as a class. Later versions added support for class definitions and allowed objects to be members of classes. Objects and classes can inherit from multiple classes. Interactive fiction games typically contain many unique objects. Because of this, many objects in Inform do not inherit from any class, other than the "metaclass" Object. However, objects very frequently have attributes (boolean properties, such as
scenery
or edible
) that are recognized by the Inform library. In other languages this would normally be implemented via inheritance.Here is a simple example of Inform 6 source code.
print "Hello World^";
Inform 6 library
The Inform system also contains the Inform library, which automates nearly all of the most difficult work involved in programming interactive fictionInteractive fiction
Interactive fiction, often abbreviated IF, describes software simulating environments in which players use text commands to control characters and influence the environment. Works in this form can be understood as literary narratives and as video games. In common usage, the term refers to text...
; specifically, it includes a text parser
Parsing
In computer science and linguistics, parsing, or, more formally, syntactic analysis, is the process of analyzing a text, made of a sequence of tokens , to determine its grammatical structure with respect to a given formal grammar...
that makes sense of the player's input, and a world model that keeps track of such things as objects (and their properties), rooms, doors, the player's inventory, etc.
The Inform compiler does not require the use of the Inform library. There are several replacement libraries available, such as Platypus and InformATE, a library that codes Inform in Spanish.
Example game
Here is an example of Inform source code that makes use of the Inform library. The following description refers to Inform 6. Inform 7 is almost entirely different. The code sample below is usable in Inform 7, but not without special demarcation indicating that it is embedded legacy code.
Constant Story "Hello Deductible";
Constant Headline "^An Interactive Example^";
Include "Parser";
Include "VerbLib";
[ Initialise;
location = Living_Room;
"Hello World";
] ;
Object Kitchen "Kitchen";
Object Front_Door "Front Door";
Object Living_Room "Living Room"
with
description "A comfortably furnished living room.",
n_to Kitchen,
s_to Front_Door,
has light;
Object -> Salesman "insurance salesman"
with
name 'insurance' 'salesman' 'man',
description "An insurance salesman in a tacky polyester
suit. He seems eager to speak to you.",
before[ ;
Listen:
move Insurance_Paperwork to player;
"The salesman bores you with a discussion
of life insurance policies. From his
briefcase he pulls some paperwork which he
hands to you.";
] ,
has animate;
Object -> -> Briefcase "briefcase"
with
name 'briefcase' 'case',
description "A slightly worn, black briefcase.",
has container;
Object -> -> -> Insurance_Paperwork "insurance paperwork"
with
name 'paperwork' 'papers' 'insurance' 'documents' 'forms',
description "Page after page of small legalese.";
Include "Grammar";
Notable games developed in Inform 6 or earlier versions
- CursesCurses (computer game)Curses is an interactive fiction computer game created by Graham Nelson in 1993. It was originally developed on an Acorn Archimedes using Acorn C/C++, before Nelson moved to his Inform programming language, which was simultaneously released. It was the first non-test game developed in the language....
, by Graham NelsonGraham NelsonGraham A. Nelson is a British mathematician and poet and the creator of the Inform design system for creating interactive fiction games. He has also authored several IF games, including the acclaimed Curses and Jigsaw , using the experience of writing Curses in particular to expand the range of...
(1993), the first game ever written in the Inform programming language. Considered one of the first "modern" games to meet the high standards set by Infocom's best titles. - So FarSo Far (interactive fiction)So Far is an interactive fiction game written in 1996 by Andrew Plotkin. It's known for its challenging puzzles and surreal imagery. So Far won the 1996 XYZZY Awards for Best IF Game, Best Writing, Best Puzzles, and Best Individual Puzzle....
, by Andrew PlotkinAndrew PlotkinAndrew Plotkin , also known as Zarf, is a central figure in the modern interactive fiction community. Having both written a number of award-winning games and developed a range of new file formats, interpreters, and other utilities for the design, production, and running of IF games, Plotkin is...
(1996), the first XYZZY Award for Best GameXYZZY Award for Best GameThis is a list of XYZZY Awards results, grouped by award rather than year. The XYZZY Awards are the annual awards given by the publication "XYZZYnews" to works of interactive fiction, serving a similar role to the Academy Awards for film...
winner in 1996. - Zork: The Undiscovered UndergroundZork: The Undiscovered UndergroundZork: The Undiscovered Underground is an interactive fiction computer game written by former Infocom Implementors Marc Blank and Michael Berlyn and implemented by G. Kevin Wilson using the Inform language. The game was released by Activision on August 28, 1997 for free to coincide with the release...
(1997), written by Marc BlankMarc BlankMarc Blank is an American game developer and software engineer. He is best known as part of the team that created one of the first hit text adventure computer games, Zork....
& Michael BerlynMichael BerlynMichael Berlyn is an American computer game designer and writer. He is best known as an Implementor at Infocom, part of the text adventure game design team....
, programmed by Gerry Kevin Wilson. Given away free by ActivisionActivisionActivision is an American publisher, majority owned by French conglomerate Vivendi SA. Its current CEO is Robert Kotick. It was founded on October 1, 1979 and was the world's first independent developer and distributor of video games for gaming consoles...
to promote the release of Zork Grand InquisitorZork Grand InquisitorZork: Grand Inquisitor is a graphical adventure game, developed by Activision and released in 1997 for the IBM compatible PC and Macintosh . It builds upon the Zork and Enchanter series of interactive fiction computer games originally released by Infocom. The cast includes Erick Avari, Dirk...
. - AnchorheadAnchorhead (game)Anchorhead is a Lovecraftian horror interactive fiction game, originally written and published by Michael S. Gentry in 1998. The game is heavily inspired by the works and writing style of H.P. Lovecraft, particularly the Cthulhu mythos...
, by Michael S. Gentry (1998) is a highly rated horror story inspired by H. P. LovecraftH. P. LovecraftHoward Phillips Lovecraft --often credited as H.P. Lovecraft — was an American author of horror, fantasy and science fiction, especially the subgenre known as weird fiction....
's Cthulhu MythosCthulhu MythosThe Cthulhu Mythos is a shared fictional universe, based on the work of American horror writer H. P. Lovecraft.The term was first coined by August Derleth, a contemporary correspondent of Lovecraft, who used the name of the creature Cthulhu - a central figure in Lovecraft literature and the focus...
. - PhotopiaPhotopiaPhotopia is a piece of literature by Adam Cadre rendered in the form of interactive fiction, and written in Inform. It is regarded as a pioneer in narrative-driven, rather than puzzle- or challenge-driven, interactive fiction...
, by Adam CadreAdam CadreAdam Cadre is a U.S. writer. He gained prominence in the world of interactive fiction with works like I-0 , Photopia and Varicella , for which he has won several XYZZY Awards and been the subject of academic study . Photopia additionally won the 1998 Interactive Fiction Competition...
(1998), the first almost entirely puzzle-free game. Won the annual Interactive Fiction CompetitionInteractive Fiction CompetitionThe Interactive Fiction Competition is one of the best known of several annual competitions for works of interactive fiction. It has been held since 1995. It is intended for fairly short games, as judges are only allowed to spend two hours playing a game before deciding how many points to award it...
in 1998. - VaricellaVaricella (computer game)Varicella is a 1999 work of interactive fiction by Adam Cadre, distributed in z-code format as freeware. It is set in an alternate history which features roughly modern technology mixed with Renaissance-style principalities and court politics...
by Adam Cadre (1999). It won four XYZZY Awards in 1999 including the XYZZY Award for Best Game, and had a scholarly essay written about it. - GalateaGalatea (computer game)Galatea is a work of interactive fiction by Emily Short featuring a modern rendition of the Greek myth of Galatea, the sculpture of a woman which gained life. It took "Best of Show" in the 2000 IF Art Show and won a XYZZY Award for Best Non-Player Character...
, by Emily ShortEmily ShortEmily Short is the pseudonym of an interactive fiction writer, perhaps best known for her debut game Galatea and her use of psychologically complex NPCs, or non-player game characters...
(2000). Galatea is focused entirely on interaction with the animated statue of the same name. Galatea has one of the most complex interaction systems for a non-player characterNon-player characterA non-player character , sometimes known as a non-person character or non-playable character, in a game is any fictional character not controlled by a player. In electronic games, this usually means a character controlled by the computer through artificial intelligence...
in an interactive fiction game. Adam Cadre called Galatea "the best NPC ever". - Slouching Towards BedlamSlouching Towards BedlamSlouching Towards Bedlam is an interactive fiction game that won the first place in the 2003 Interactive Fiction Competition. It is a collaboration between Daniel Ravipinto and Star Foster. Slouching Towards Bedlam was finalist for eight 2003 XYZZY Awards, winning four: Best Game, Setting, Story,...
, by Star C. Foster and Daniel Ravipinto (2003). Set in a steampunkSteampunkSteampunk is a sub-genre of science fiction, fantasy, alternate history, and speculative fiction that came into prominence during the 1980s and early 1990s. Steampunk involves a setting where steam power is still widely used—usually Victorian era Britain or "Wild West"-era United...
setting, the game integrates meta-game functionality (saving, restoring, restarting) into the game world itself. The game won two XYZZY Awards and received the highest average score of any game in the Interactive Fiction CompetitionInteractive Fiction CompetitionThe Interactive Fiction Competition is one of the best known of several annual competitions for works of interactive fiction. It has been held since 1995. It is intended for fairly short games, as judges are only allowed to spend two hours playing a game before deciding how many points to award it...
as of 2006.
Inform 7
On April 30, 2006, Graham Nelson announced the beta release of Inform 7 to the rec.arts.int-fiction newsgroup. Inform 7 consists of three primary parts: The Inform 7 IDEIntegrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...
with development tools specialized for testing interactive fiction, the Inform 7 compiler for the new language, and "The Standard Rules" which form the core library for Inform 7. Inform 7 also relies on the Inform library and Inform compiler from Inform 6. The compiler compiles the Inform 7 source code into Inform 6 source code, which is then compiled separately by Inform 6 to generate Glulx
Glulx
Glulx is a 32-bit portable virtual machine intended for writing and playing interactive fiction. It was designed by Andrew Plotkin to relieve some of the restrictions in the venerable Z-machine format...
or Z-code
Z-machine
The Z-machine is a virtual machine that was developed by Joel Berez and Marc Blank in 1979 and used by Infocom for its text adventure games. Infocom compiled game code to files containing Z-machine instructions , and could therefore port all its text adventures to a new platform simply by writing a...
story file. Inform 7 also defaults to writing Blorb
Blorb
Blorb is a package format for interactive fiction games. Many such games incorporate resources such as sound effects, music, or pictures. Blorb's purpose is to bind these together into one file...
files, archives which include the Z-code together with optional "cover art" and metadata intended for indexing purposes. The full set of Inform 7 tools are currently available for Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
, Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
and Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
. The March 25, 2007 release added command line support for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
, and new releases now include an IDE using the GNOME
GNOME
GNOME is a desktop environment and graphical user interface that runs on top of a computer operating system. It is composed entirely of free and open source software...
desktop environment under the GNOME Inform 7 SourceForge
SourceForge.net
SourceForge is a web-based source code repository. It acts as a centralized location for software developers to control and manage open source software development. The website runs a version of SourceForge Enterprise Edition, forked from the last open-source version available...
project. The language and tools remain under development; the March 25, 2007 release included a number of changes to the language.
Inform 7 was named Natural Inform for a brief period of time, but was later renamed Inform 7. This old name is why the Inform 7 compiler is named "NI."
Inform 7 IDE
Inform 7 comes with an integrated development environment (IDE) for Mac OS X, Microsoft Windows and Linux. The Mac OS X IDE was developed by Andrew HunterAndrew Hunter
Andrew Hunter may refer to:*Andrew Hunter , Moderator of the General Assembly of the Church of Scotland*Andrew Hunter , British politician and a member of the Orange Order...
. The Microsoft Windows IDE was developed by David Kinder. The Linux IDE (known as GNOME Inform) was developed by Philip Chimento
The Inform 7 IDE includes a text editor for editing Inform 7 source code. Like many other programming editors it features syntax highlighting. It marks quoted strings in one color. Headings of organizational sections (Volumes, Books, Chapters, Parts, and Sections) are bolded and made larger. Comments are set in a different color and made slightly smaller.
The IDE includes a built-in Z-code
Z-machine
The Z-machine is a virtual machine that was developed by Joel Berez and Marc Blank in 1979 and used by Infocom for its text adventure games. Infocom compiled game code to files containing Z-machine instructions , and could therefore port all its text adventures to a new platform simply by writing a...
interpreter. The Mac OS X IDE's interpreter is based on the Zoom interpreter by Andrew Hunter, with contributions from Jesse McGrew. The Microsoft Windows IDE's interpreter is based on WinFrotz.
As a developer tests the game in the built-in interpreter, progress is tracked in the "skein" and "transcript" views of the IDE. The skein tracks player commands as a tree of branching possibilities. Any branch of the tree can be quickly re-followed, making it possible to retry different paths in a game under development without replaying the same portions of the game. Paths can also be annotated with notes and marked as solutions, which can be exported as text walkthroughs. The transcript, on the other hand, tracks both player commands and the game's responses. Correct responses from the game can be marked as "blessed." On replaying a transcript or a branch of the skein, variations from the blessed version will be highlighted, which can help the developer find errors.
The IDE also provides various indices into the program under development. The code is shown as a class hierarchy, a traditional IF map, a book-like table of contents, and in other forms. Clicking items in the index jumps to the relevant source code.
The IDE presents two side-by-side panes for working in. Each pane can contain the source code being worked on, the current status of compilation, the skein, the transcript, the indices of the source code, a running version of the game, documentation for Inform 7 or any installed extensions to it, or settings. The concept is to imitate an author's manuscript book by presenting two "facing pages" instead of a multitude of separate windows.
Inform 7 programming language
Notable features include strong bias towards declarative rule-based style of programming and ability to infer types and properties of objects from the way they are used. For example, the statement "John wears a hat." creates a "person" called "John" (since only people are capable of wearing things), creates a "thing" with the "wearable" property (since only objects marked "wearable" are capable of being worn), and sets John as wearing the hat.Another notable aspect of the language is direct support for relations which track associates between objects. This includes automatically provided relations, like one object containing another or an object being worn, but the developer can add his own relations. A developer might add relations indicating love or hatred between beings, or to track which characters in a game have met each other.
Inform 7 is a highly domain-specific programming language
Domain-specific programming language
In software development and domain engineering, a domain-specific language is a programming language or specification language dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique...
, providing the writer/programmer with a much higher level of abstraction than Inform 6, and highly readable resulting source code.
Example game
Statements in Inform 7 take the form of complete sentences. Blank lines and indentation are in some places structurally significant. The basic form of an Inform 7 program is as follows:The following is a reimplementation of the above "Hello Deductible" example written in Inform 7. It relies on the library known as "The Standard Rules" which are automatically included in all Inform 7 compilations.
The Kitchen is north of the Living Room.
The Front Door is south of the Living Room.
The Front Door is a door. The Front Door is closed and locked.
The insurance salesman is a man in the Living Room. "An insurance salesman in a tacky polyester suit. He seems eager to speak to you." Understand "man" as the insurance salesman.
A briefcase is carried by the insurance salesman. The description is "A slightly worn, black briefcase." Understand "case" as the briefcase.
The insurance paperwork is in the briefcase. The description is "Page after page of small legalese." Understand "papers" or "documents" or "forms" as the paperwork.
Instead of listening to the insurance salesman for the first time:
- say "The salesman bores you with a discussion of life insurance policies. From his briefcase he pulls some paperwork which he hands to you.";
- move the insurance paperwork to the player.
Notable games written in Inform 7
Mystery House Possessed (2005), by Emily ShortEmily Short
Emily Short is the pseudonym of an interactive fiction writer, perhaps best known for her debut game Galatea and her use of psychologically complex NPCs, or non-player game characters...
, was the first Inform 7 game released to be public. It was released as part of the "Mystery House Taken Over" project.
On March 1, 2006, Short announced the release of three further games:
Bronze (an example of a traditional puzzle-intensive game) and Damnatio Memoriae (a follow-up to her award-winning Inform 6 game Savoir-Faire
Savoir-Faire
Savoir-Faire is a piece of interactive fiction written by Emily Short, about a magician in 18th-century France searching his aristocratic adoptive father's house...
) were joined by Graham Nelson's The Reliques of Tolti-Aph (2006). When the Inform 7 public beta was announced on April 30, 2006, six "worked examples" of medium to large scale works were made available along with their source code, including the three games previously released on March 1.
Emily Short's Floatpoint
Floatpoint
Floatpoint is a 2006 work of interactive fiction written by Emily Short about a diplomat sent to an endangered colony to discuss evacuation options and terms of cohabitation...
was the first Inform 7 game to take first place in the Interactive Fiction Competition
Interactive Fiction Competition
The Interactive Fiction Competition is one of the best known of several annual competitions for works of interactive fiction. It has been held since 1995. It is intended for fairly short games, as judges are only allowed to spend two hours playing a game before deciding how many points to award it...
.
It also won 2006 XYZZY awards for Best Setting and Best NPCs. Rendition, by nespresso (2007), is a political art experiment
Experimental literature
Experimental literature refers to written works - often novels or magazines - that place great emphasis on innovations regarding technique and style.-Early history:...
in the form of a text adventure game. Its approach to tragedy
Tragedy
Tragedy is a form of art based on human suffering that offers its audience pleasure. While most cultures have developed forms that provoke this paradoxical response, tragedy refers to a specific tradition of drama that has played a unique and important role historically in the self-definition of...
has been discussed academically by both the Association of Computing Machinery and Cambridge University.
See also
- History of Inform releasesHistory of Inform releasesThe history of releases of the Inform programming language for interactive fiction dates back to 1993. The Inform 6 compiler and Library have always been separately maintained and released....
- Interactive fiction: development systems lists software similar to Inform
Further reading
Inform 6- The official manual of Inform is Graham NelsonGraham NelsonGraham A. Nelson is a British mathematician and poet and the creator of the Inform design system for creating interactive fiction games. He has also authored several IF games, including the acclaimed Curses and Jigsaw , using the experience of writing Curses in particular to expand the range of...
's Inform Designer's Manual: it is a tutorial, a manual, and a technical document rolled into one. It is available online for free at Inform's official website, and two printed editions are available: a softcover (ISBN 0-9713119-0-0) and a hardcover (ISBN 0-9713119-3-5). - The Inform Beginner's Guide by Roger Firth and Sonja Kesserich (ISBN 0-9713119-2-7) attempts to provide a more gentle introduction to Inform. It is available for free at Inform's official website.
Inform 7
- The SPAG Interview - An interview with designers Graham NelsonGraham NelsonGraham A. Nelson is a British mathematician and poet and the creator of the Inform design system for creating interactive fiction games. He has also authored several IF games, including the acclaimed Curses and Jigsaw , using the experience of writing Curses in particular to expand the range of...
and Emily ShortEmily ShortEmily Short is the pseudonym of an interactive fiction writer, perhaps best known for her debut game Galatea and her use of psychologically complex NPCs, or non-player game characters...
about the development of Inform 7. This interview was made shortly before its release and published on the same day as the initial release. - "Natural Language, Semantic Analysis and Interactive Fiction" - A paper on the design of Inform 7 by designer Graham NelsonGraham NelsonGraham A. Nelson is a British mathematician and poet and the creator of the Inform design system for creating interactive fiction games. He has also authored several IF games, including the acclaimed Curses and Jigsaw , using the experience of writing Curses in particular to expand the range of...
.
External links
- Cloak of Darkness: Inform presents the same, short game implemented in both Inform 6 and Inform 7, as well as other languages for comparison.
- Inform 6 - Official web site
- Inform 6 FAQ at Roger Firth's IF Pages provides details on programming in Inform 6.
- Inform 7 - Official web site.
- The Interactive Fiction Archive provides many Inform tools, examples, and library files.