Inform

Inform is a programming language and design system for interactive fiction, created in 1993 by Graham Nelson.

Contents

Overview

The Inform system properly 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 the most difficult work of parsing the player's input and keeping track of the world model. The name Inform also refers to the Inform programming language that the compiler understands.

The Compiler

The Inform compiler generates files in Z-code (also called story files) from Inform source code. These files can then be run by any Z-code interpreter -- that is, by any program which properly emulates the Z-code virtual machine. 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 that is capable of generating files for the Glulx virtual machine, which removes many of the limitations of the Z-machine. He also created a compiler for both the Z-machine and Glulx. However, the Glulx virtual machine is not as widely ported. Inform 6.3, released February 29, 2004, includes official support for both virtual machines, based on Andrew Plotkin's work.

Although Inform 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 Tetris game, and a version of the game Snake.

The 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 rooms 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 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 could 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 container) that are recognized by the Inform library. In other languages this would normally be implemented via inheritance.

Here is a simple example of Inform source code.

[ Main;
    print "Hello World^";
];

The Library

The Inform system also contains the Inform library, which automates nearly all of the most difficult work involved in programming interactive fiction; specifically, it includes a 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.

Here is an example of Inform source code that makes use of the Inform library:

Include "Parser";
Include "VerbLib";

[ Initialise;
    print "Hello World^";
    location = livingroom;
];

Object livingroom "Living Room"
    with
        description "A comfortably furnished living room.",
        n_to kitchen,
        s_to frontdoor,
    has light;

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

Object insurancepaperwork "insurance paperwork" briefcase
    with
        name 'paperwork' 'papers' 'insurance' 'documents' 'forms',
        description "Page after page of small legalese.";

Include "Grammar";

The Inform library is not necessary to use the Inform compilier. At least one replacement library, Platypus (http://www.elvwood.org/InteractiveFiction/Platypus/), is available.

Notable Games Developed in Inform

  • Curses, by Graham Nelson, was the first major game written in Inform, and is considered a classic of the form.
  • Galatea, by Emily Short is probably the most detailed and effective implementation of an NPC in the medium.
  • Photopia, by Adam Cadre, is generally credited as being the first truly puzzleless work of interactive fiction. Its appearance was a pivotal point in the history of the medium. (External Link (http://www.wurb.com/if/game/255))
  • So Far, by Andrew Plotkin. Set a precedent for the integration of story, puzzle design, and player expectations in interaction fiction.

Further Reading

  • The bible 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 freely available online at Inform's official website (http://www.inform-fiction.org), and a printed edition has been published by the Interactive Fiction Library. (ISBN 0-9713119-0-0)
  • The Inform Beginner's Guide by Roger Firth and Sonja Kesserich attempts to provide a more gentle introduction to Inform. It is available without cost at Inform's official website (http://www.inform-fiction.org/manual/), and a printed edition is available as ISBN 0971311927.
  • TADS is another interactive fiction design system that is comparable to Inform in terms of power, flexibility, portability, and popularity. Another well-regarded system is Hugo, though it is not nearly as widely-used as either TADS or Inform.

External links

nl:Programmeertaal_Inform de:Inform

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools