World Library  
Flag as Inappropriate
Email this Article


Original author(s) Graham Nelson
Developer(s) Graham Nelson
Stable release 7 6L02 / May 7, 2014 (2014-05-07)[1]
Operating system Microsoft Windows, Mac OS X, Linux, others
Type Interactive fiction development and play

Inform is a programming language and design system for interactive fiction originally created in 1993 by Graham Nelson. Inform can generate programs designed for the Z-code or Glulx virtual machines. Versions 1 through 5 were released between 1993 and 1996. Around 1996, Nelson rewrote Inform from first principles to create version 6 (or Inform 6).[2] 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.


  • Z-Machine and Glulx 1
  • Inform 6 2
    • The Inform 6 compiler 2.1
    • The Inform 6 programming language 2.2
    • Inform 6 library 2.3
    • Example game 2.4
    • Notable games developed in Inform 6 or earlier versions 2.5
  • Inform 7 3
    • Inform 7 IDE 3.1
    • Inform 7 programming language 3.2
    • Example game 3.3
    • Notable games written in Inform 7 3.4
  • See also 4
  • Further reading 5
  • References 6
  • External links 7

Z-Machine and Glulx

All versions of Inform generate files in Z-code (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.

Inform 6

Inform 1-6
Paradigm object-oriented, procedural
Designed by Graham Nelson
Developer Graham Nelson
First appeared 1993
Stable release 6.32 / 2010
Preview release 6.33 / May 10, 2014 (2014-05-10) [3]
OS Microsoft Windows, Mac OS X, Linux, others
License Freeware and Artistic License 2.0
Influenced by
natural language
Inform 7

Inform was originally created by Graham Nelson 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, many 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.

The Inform 6 compiler

The Inform compiler generates files for the Z-machine or Glulx (also called story files) from Inform 6 source code.

The Inform 6 programming language

The Inform programming language is object-oriented and procedural. 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.

 [ Main;
     print "Hello World^";

Inform 6 library

The Inform system also contains the Inform library, which automates nearly all the most difficult work involved in programming interactive fiction; 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[4] and InformATE, a library that codes Inform in Spanish.

Example game

Here is an example of Inform 6 source code that makes use of the Inform library. The Inform 6 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"
         description "A comfortably furnished living room.",
         n_to Kitchen,
         s_to Front_Door,
     has light;

 Object -> Salesman "insurance salesman"
         name 'insurance' 'salesman' 'man',
         description "An insurance salesman in a tacky polyester
               suit.  He seems eager to speak to you.",
         before [;
                 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"
         name 'briefcase' 'case',
         description "A slightly worn, black briefcase.",
     has container;

 Object -> -> -> Insurance_Paperwork "insurance paperwork"
         name 'paperwork' 'papers' 'insurance' 'documents' 'forms',
         description "Page after page of small legalese.";

 Include "Grammar";

Notable games developed in Inform 6 or earlier versions

Inform 7

Inform 7
Paradigm declarative, procedural
Designed by Graham Nelson
Developer Graham Nelson
First appeared 2006
Stable release 6L38 / August 30, 2014 (2014-08-30) [9]
OS Microsoft Windows, Mac OS X, Linux, others
License Proprietary but freely redistributable or Artistic License 2.0
Influenced by
Inform 6

On April 30, 2006, Graham Nelson announced the beta release of Inform 7 to the newsgroup.[10] Inform 7 consists of three primary parts: The Inform 7

  • 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.
  • Inform at DMOZ
  • The Interactive Fiction Archive provides many Inform tools, examples, and library files.
  • Playfic is a web-based interface for creating and sharing new games using Inform 7.
  • Guncho is a multiplayer interactive fiction system based on Inform 7 with a combination of MUD-like and web-based interfaces.

External links

  1. ^ "Inform 7 Changelog". Retrieved 2014-05-28. 
  2. ^ a b "The SPAG Interview: Graham Nelson and Emily Short on Inform 7". SPAG #44. The Society for the Promotion of Adventure Games. 2006-04-30. Retrieved 2007-01-04. 
  3. ^ "Release v6.33". Retrieved 26 February 2015. 
  4. ^ Turner, Anson (2002-03-14). "Inform Platypus release 4". Retrieved 2007-01-04. 
  5. ^ Alan De Smet (2006-03-14). "Curses (Interactive Fiction Reviews)". Retrieved 2006-11-01. 
  6. ^ Of the 1219 games rated at "Interactive Fiction Ratings", Anchorhead was the highest rated game as of January 4, 2007. ("IF Rating Stats". Retrieved 2007-01-04. )
  7. ^ Montfort, Nick; Stuart Moulthrop (August 2003). "Face It, Tiger, You Just Hit the Jackpot: Reading and Playing Cadre's Varicella" (PDF). Archived from the original (PDF) on 2009-11-06. Retrieved 2009-11-06.  Published as Montfort, Nick; Moulthrop, Stuart (August 2003). "Face It, Tiger, You Just Hit the Jackpot: Reading and Playing Cadre's Varicella". Fine Art Online ( 
  8. ^ "Photopia is a short story, Varicella is a world". L’avventura è l’avventura. January 2002. Retrieved 2007-01-04. 
  9. ^ "Download". Inform 7. Retrieved 23 February 2015. 
  10. ^ a b Graham Nelson (2006-04-30). "Inform 7: Public Beta".  
  11. ^ "GNOME Inform 7 SourceForge project page". February 2008. 
  12. ^ Emily Short (2007-02-18). "Inform 7: Possible future developments".  
  13. ^ Graham Nelson (2007-03-30). "Re: "Inform 7" is the wrong name".  
  14. ^ "Mystery House Taken Over". Retrieved 2007-01-04. 
  15. ^ Emily Short (at the request of Graham Nelson) (2006-03-01). "Three games in Inform 7".  
  16. ^ Short, Emily (2006). "Bronze". Retrieved 2007-01-04. 
  17. ^ Short, Emily (2006). "Damnatio Memoriae". Retrieved 2007-01-04. 
  18. ^ Nelson, Graham (2005). "The Reliques of Tolti-Aph". Retrieved 2007-01-04. 
  19. ^ Short, Emily (2006). "Bronze". Retrieved 2007-01-04. 
  20. ^ Short, Emily (2006). "Damnatio Memoriae". Retrieved 2007-01-04. 
  21. ^ Nelson, Graham (2005). "The Reliques of Tolti-Aph". Retrieved 2007-01-04. 
  22. ^ "12th Annual Interactive Fiction Competition". 2006. Retrieved 2007-05-12. 
  23. ^ "XYZZY Awards: Winning Games of 2006". Retrieved 2007-05-12. 
  24. ^ "ACM Hypertext 2007 conference slides (PDF)" (PDF). 
  25. ^ "Cambridge University lecture slides". 
  26. ^ "Download the Inform Designer's Manual". 2006-04-01. Retrieved 2007-01-04. 
  27. ^ "About the Inform Designer's Manual". 2006-04-01. Retrieved 2007-01-04. 
  28. ^ "Download the Inform Beginner's Guide". 2006-04-01. Retrieved 2007-01-04.  Firth, Roger; Sonja Kesserich (August 2004). "The Inform Beginner's Guide: Third Edition" (PDF). Retrieved 2007-01-04. 
  29. ^ Graham Nelson (2006-04-10). "Natural Language, Semantic Analysis, and Interactive Fiction" (PDF). Retrieved 2007-01-04. 


  • The SPAG Interview - An interview with designers Graham Nelson and Emily Short about the development of Inform 7. This interview was made shortly before its release and published on the same day as the initial release.[2]
  • "Natural Language, Semantic Analysis and Interactive Fiction" - A paper on the design of Inform 7 by designer Graham Nelson.[29]
Inform 7
  • The official manual of Inform is Graham Nelson'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,[26] and two printed editions are available: a softcover (ISBN 0-9713119-0-0) and a hardcover (ISBN 0-9713119-3-5).[27]
  • 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.[28]
Inform 6

Further reading

See also

Emily Short's Floatpoint was the first Inform 7 game to take first place in the Interactive Fiction Competition.[22] It also won 2006 XYZZY Awards for Best Setting and Best NPCs.[23] Rendition, by nespresso (2007), is a political art experiment in the form of a text adventure game. Its approach to tragedy has been discussed academically by both the Association for Computing Machinery[24] and Cambridge University.[25]

On March 1, 2006, Short announced the release of three further games:[15] Bronze[16] (an example of a traditional puzzle-intensive game) and Damnatio Memoriae[17] (a follow-up to her award-winning Inform 6 game Savoir-Faire) were joined by Graham Nelson's The Reliques of Tolti-Aph[18] (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.[19][20][21]

Mystery House Possessed (2005), by Emily Short,[14] was the first Inform 7 game released to be public. It was released as part of the "Mystery House Taken Over" project.

Notable games written in Inform 7

"Hello Deductible" by "I.F. Author"

The story headline is "An Interactive Example".

The Living Room is a room. "A comfortably furnished living room."
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. The description is "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: 
        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.

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.

"Hello World" by "I.F. Author"

The world is a room.

When play begins, say "Hello, world."

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:

Example game

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.

Another notable aspect of the language is direct support for relations which track associations between objects. This includes automatically provided relations, like one object containing another or an object being worn, but the developer can add his/her 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.

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.

Inform 7 programming language

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.[10]

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.

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 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.

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.

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 Hunter. 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 on Mac OS X showing the Index Map and the transcript
The Inform 7 IDE on Mac OS X showing source code and the skein

Inform 7 IDE

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."[13]

the March 25, 2007 release included a number of changes to the language. [12] The language and tools remain under development;[11]

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from World eBook Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.