Inform - Resources - Examples

Back to List

Inventory
Complete

At Start
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Museum.inf

Museum.inf begins (lines 1-104)

0001  ! ----------------------------------------------------------------------------
0002  !   Museum 961111                   One of the standard Inform 6 example games
0003  !
0004  !                                                            created: 20.12.95
0005  !                                             translated to Inform 6: 11.11.96
0006  !
0007  !   This "game" is a compendium of solved exercises from the Designer's
0008  !   Manual.  Room numbers are section numbers within the Third Edition.
0009  !   Many of these exercises are difficult, and so is some of the code below.
0010  ! ----------------------------------------------------------------------------
0011   
0012  Constant Story "MUSEUM OF INFORM";
0013  Constant Headline
0014      "^An Interactive Companion to the Designer's Manual (Third Edition)^";
0015   
0016  !   The game is meant to be experimented with, so we always define:
0017  Constant DEBUG;
0018   
0019  Release 2;
0020  Serial "961111";
0021   
0022  Replace DrawStatusLine;
0023  Include "Parser";
0024   
0025  ! --------------------------------------------------------------------------
0026   
0027  Object samples_bag "samples bag"
0028    with description "A capacious SACK_OBJECT (see section 20).",
0029         name "samples" "bag", article "your",
0030         when_closed "Your samples bag lies on the floor.",
0031         when_open "Your samples bag lies open on the floor.",
0032    has  container open openable;
0033   
0034  Constant SACK_OBJECT = samples_bag;
0035   
0036  Include "VerbLib";
0037   
0038  ! --------------------------------------------------------------------------
0039   
0040  Attribute crewmember;
0041   
0042  Property weight 10;
0043   
0044  Class Key with name "key";
0045   
0046  ! --------------------------------------------------------------------------
0047   
0048  Object  Foyer "Foyer"
0049   has    light
0050   with   description
0051             "The foyer of the magnificent Museum of Inform. A flight of 
0052              stairs sweeps upward to Chapters V and VI, and corridors 
0053              fan out on this level into Chapter IV. These run:^
0054              ^  north into Room 10 (the Halls of Sense and Direction),
0055              ^  south along Corridor 12 (doors) to Room 13 (switches),
0056              ^  @00 to Room 11 (the Wonderful World of Containers)
0057              ^  and @01 to Room 14 (which houses larger exhibits).^^
0058              (And a plain ladder descends into the basement; you can also 
0059               step out onto a balcony.)",
0060          e_to Room11, u_to Second_Floor, n_to Room10,
0061          s_to Corridor12, w_to Room14,
0062          d_to basement, out_to balcony;
0063   
0064  Object -> "map"
0065    with name "map" "ground" "floor",
0066         initial "A map of the ground floor is embossed in one wall.",
0067         description
0068         [;  font off;
0069             print
0070            "^+------------------------------------------+
0071             ^|                              (mirror)    |
0072             ^|   Weights      Room 10  ---  Room 10a    |
0073             ^|    Room         senses      directions   |
0074             ^|      |            |                      |
0075             ^|   Room 14 ---   Foyer   ---   Room 11    |
0076             ^|  (changing  (you are here)   containers  |
0077             ^|  character)       |                      |
0078             ^|                   |                      |
0079             ^|   Room 15 --- Corridor 12                |
0080             ^|  (MS room)  (door, curator)              |
0081             ^|   (Bible)         |                      |
0082             ^|             Switches Hall 13             |
0083             ^|                (chasm)                   |
0084             ^|                   |                      |
0085             ^|           Far Side of Room 13            |
0086             ^+------------------------------------------+^";
0087             font on;
0088         ],
0089    has  static;
0090   
0091  ! --------------------------------------------------------------------------
0092   
0093  Object basement "Museum Basement"
0094    with u_to Foyer,
0095         description
0096            "Once Room 17, this space has been abandoned by the curators,
0097             who have simply sprayed its walls with moth-repellent and
0098             abandoned it.",
0099         before
0100         [;  Smell: "Napthalene.";
0101         ];
0102   
0103  ! --------------------------------------------------------------------------
0104   


Last updated 23 June 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.