| Examples in Thematic Order | ![]() |
Preface
| Example About the examplesAn explanation of the examples in this documentation, and the asterisks attached to them. Click the heading of the example, or the example number, to reveal the text. |
|
| Example Midsummer DayA few sentences laying out a garden together with some things which might be found in it. |
|
Disenchantment Bay
| Example Disenchantment Bay 1A running example in this chapter, Disenchantment Bay, involves chartering a boat. This is the first step: creating the cabin. |
|
| Example Disenchantment Bay 2Disenchantment Bay: creating some of the objects in the cabin's description. |
|
| Example Disenchantment Bay 3Disenchantment Bay: adding a view of the glacier. |
|
| Example Disenchantment Bay 4Disenchantment Bay: fleshing out the descriptions of things on the boat. |
|
| Example Disenchantment Bay 5Disenchantment Bay: adding the door and the deck to our charter boat. |
|
| Example Disenchantment Bay 6Disenchantment Bay: locking up the charter boat's fishing rods. |
|
| Example Disenchantment Bay 7Disenchantment Bay: making the radar and instruments switch on and off. |
|
| ![]() Example Disenchantment Bay 8Disenchantment Bay: a pushable chest of ice for the boat. |
|
| Example Disenchantment Bay 9Disenchantment Bay: enter the charter boat's Captain. |
|
| Example Disenchantment Bay 10Disenchantment Bay: things for the player and the characters to wear and carry. |
|
| Example Disenchantment Bay 11Disenchantment Bay: making a holdall of the backpack. |
|
| ![]() ![]() ![]() Example Disenchantment Bay 12A final trip to Disenchantment Bay: the scenario turned into a somewhat fuller scene, with various features that have not yet been explained. |
|
Information Only
| ![]() ![]() Example Backus-Naur form for rulesThe full grammar Inform uses to parse rule definitions, in a standard computer-science notation. |
|
| ![]() ![]() Example Formal syntax of sentencesA more formal description of the sentence grammar used by Inform for both assertions and conditions. |
|
| ![]() ![]() Example Mathematical view of relationsSome notes on relations from a mathematical point of view, provided only to clarify some technicalities for those who are interested. |
|
| ![]() ![]() Example Graph-theory view of relationsSome notes on relations from the point of view of graph theory. |
|
| Example About Inform's regular expression supportSome footnotes on Inform's regular expressions, and how they compare to those of other programming languages. |
|
Varying What Is Written
| Example M. Melmoth's DuelThree basic ways to inject random or not-so-random variations into text. |
|
| Example AhemWriting a phrase, with several variant forms, whose function is to follow a rule several times. |
|
| Example Fifty Ways to Leave Your LarvaUsing text substitution to make characters reply differently under the same circumstances. |
|
| ![]() ![]() Example Fifty Times Fifty WaysWriting your own rules for how to carry out substitutions. |
|
| Example CurareA phrase that chooses and names the least-recently selected item from the collection given, allowing the text to cycle semi-randomly through a group of objects. |
|
| ![]() ![]() Example Straw Into GoldCreating a Rumpelstiltskin character who is always referred to as "dwarf", "guy", "dude", or "man" -- depending on which the player last used -- until the first time the player refers to him as "Rumpelstiltskin". |
|
| Example OdinsMaking [is-are] and [it-they] say tokens that will choose appropriately based on the last object mentioned. |
|
| ![]() ![]() Example BallparkA new "to say" definition which allows the author to say "[a number in round numbers]" and get verbal descriptions like "a couple of" or "a few" as a result. |
|
| Example NumberlessA simple exercise in printing the names of random numbers, comparing the use of "otherwise if...", a switch statement, or a table-based alternative. |
|
| Example ProlegomenaReplacing precise numbers with "some" or other quantifiers when too many objects are clustered together for the player to count at a glance. |
|
| Example BlinkMaking a "by atmosphere" token, allowing us to design our own text variations such as "[one of]normal[or]gloomy[or]scary[by atmosphere]". |
|
| Example BlackoutFiltering the names of rooms printed while in darkness. |
|
| Example Rocket ManUsing case changes on any text produced by a "to say..." phrase. |
|
Varying What Is Read
| ![]() Example LauraSome general advice about creating objects with unusual or awkward names, and a discussion of the use of printed names. |
|
| ![]() Example VouvrayAdding synonyms to an entire kind of thing. |
|
| Example First Name BasisAllowing the player to use different synonyms to refer to something. |
|
| Example Quiz ShowIn this example by Mike Tarbert, the player can occasionally be quizzed on random data from a table; the potential answers will only be understood if a question has just been asked. |
|
| ![]() Example North by NorthwestCreating additional compass directions between those that already exist (for instance, NNW) -- and dealing with an awkwardness that arises when the player tries to type "north-northwest". The example demonstrates a way around the nine-character limit on parsed words. |
|
Using the Player's Input
| ![]() ![]() Example Terracottissima MaximaFlowerpots with textual names that might change during play. |
|
| ![]() Example Mr. Burns' RepastLetting the player guess types for an unidentifiable fish. |
|
| ![]() ![]() Example XotStoring an invalid command to be repeated as text later in the game. |
|
| Example Igpay AtinlayA pig Latin filter for the player's commands. |
|
Map
| Example Port Royal 1A partial implementation of Port Royal, Jamaica, set before the earthquake of 1692 demolished large portions of the city. |
|
| Example Port Royal 2Another part of Port Royal, with less typical map connections. |
|
| Example Port Royal 3Division of Port Royal into regions. |
|
| ![]() Example A&EUsing regions to block access to an entire area when the player does not carry a pass, regardless of which entrance he uses. |
|
| Example Bee ChambersA maze with directions between rooms randomized at the start of play. |
|
| Example Zork IIA "Carousel Room", as in Zork II, where moving in any direction from the room leads (at random) to one of the eight rooms nearby. |
|
| ![]() Example Prisoner's DilemmaA button that causes a previously non-existent exit to come into being. |
|
| Example All Roads Lead to MarsLayout where the player is allowed to wander any direction he likes, and the map will arrange itself in order so that he finds the correct "next" location. |
|
Position Within Rooms
| Example When?A door whose description says "...leads east" in one place and "...leads west" in the other. |
|
| ![]() ![]() Example Whence?A kind of door that always automatically describes the direction it opens and what lies on the far side (if that other room has been visited). |
|
Continuous Spaces and The Outdoors
| Example Higher CallingAll doors in the game automatically attempt to open if the player approaches them when they are closed. |
|
| ![]() Example ElsieA door that closes automatically one turn after the player opens it. |
|
| ![]() Example Neighborhood WatchA locked door that can be locked or unlocked without a key from one side, but not from the other. |
|
| ![]() ![]() Example Garibaldi 1Providing a security readout device by which the player can check on the status of all doors in the game. |
|
| Example Something NarstyA staircase always open and never openable. |
|
| Example HayseedA refinement of our staircase kind which can be climbed. |
|
| ![]() Example One Short PlankA plank bridge which breaks if the player is carrying something when he goes across it. Pushing anything over the bridge is forbidden outright. |
|
| ![]() ![]() Example Starry VoidCreating a booth that can be seen from the outside, opened and closed, and entered as a separate room. |
|
Doors, Staircases, and Bridges
| Example Further Reasons Why All Poets Are LiarsThe young William Wordsworth, pushing a box about in his room, must struggle to achieve a Romantic point of view. |
|
| ![]() Example CarnivaleAn alternative to backdrops when we want something to be visible from a distance but only touchable from one room. |
|
| ![]() Example EddystoneCreating new commands involving the standard compass directions. |
|
| Example WaterworldA backdrop which the player can examine, but cannot interact with in any other way. |
|
| ![]() ![]() Example A View of Green HillsA LOOK [direction] command which allows the player to see descriptions of the nearby landscape. |
|
| ![]() Example Tiny GardenA lawn made up of several rooms, with part of the description written automatically. |
|
| ![]() Example Rock GardenA simple open landscape where the player can see between rooms and will automatically move to touch things in distant rooms. |
|
| ![]() ![]() Example Stately GardensAn open landscape where the player can see landmarks in nearby areas, with somewhat more complex room descriptions than the previous example, and in which we also account for size differences between things seen at a distance. |
|
| ![]() Example Hotel StechelbergSignposts such as those provided on hiking paths in the Swiss Alps, which show the correct direction and hiking time to all other locations. |
|
Windows
| ![]() Example EscapeWindow that can be climbed through or looked through. |
|
| Example VitrineAn electrochromic window that becomes transparent or opaque depending on whether it is currently turned on. |
|
| ![]() Example Port Royal 4A cell window through which the player can see people who were in Port Royal in the current year of game-time. |
|
| ![]() Example Dinner is ServedA window between two locations. When the window is open, the player can reach through into the other location; when it isn't, access is barred. |
|
| ![]() ![]() Example A Haughty SpiritWindows overlooking lower spaces which will prevent the player from climbing through if the lower space is too far below. |
|
Lighting