character. On this line, the first ``!`` is part of the sequence (or
string) of characters to be displayed:
character. On this line, the first ``!`` is part of the sequence (or
string) of characters to be displayed:
space (except when the spaces are part of a character string). So, these
two rules tell us that we *could* have typed the source file like this:
space (except when the spaces are part of a character string). So, these
two rules tell us that we *could* have typed the source file like this:
* Every game needs the three lines which ``Include`` the standard library
files -- that is, they merge those files' contents into your source file:
* Every game needs the three lines which ``Include`` the standard library
files -- that is, they merge those files' contents into your source file:
this example none of them has four walls. So let's use Inform to define
those rooms. Here's a first attempt:
this example none of them has four walls. So let's use Inform to define
those rooms. Here's a first attempt:
routes, we also need to explicitly add them to the room definitions in a
form that the game itself can make sense of. Like this:
routes, we also need to explicitly add them to the room definitions in a
form that the game itself can make sense of. Like this:
with the sketch map until you're comfortable that you understand how to
create simple rooms and define the connections between them.
with the sketch map until you're comfortable that you understand how to
create simple rooms and define the connections between them.
Furthermore, we label it as ``open``; this prevents the interpreter from
asking us to open it before putting in the bird.
Furthermore, we label it as ``open``; this prevents the interpreter from
asking us to open it before putting in the bird.
Object nest "bird's nest"
with description "The nest is carefully woven of twigs and moss.",
Object nest "bird's nest"
with description "The nest is carefully woven of twigs and moss.",
them. Let's say that the bird is found in the forest, while the nest is in
the clearing. This is how we set this up:
them. Let's say that the bird is found in the forest, while the nest is in
the clearing. This is how we set this up:
Object bird "baby bird" forest
with description "Too young to fly, the nestling tweets helplessly.",
Object bird "baby bird" forest
with description "Too young to fly, the nestling tweets helplessly.",
they're found. This means adding the bird just after the forest, and the
nest just after the clearing. Here's the middle piece of the source file:
they're found. This means adding the bird just after the forest, and the
nest just after the clearing. Here's the middle piece of the source file:
The description of the clearing mentions a tall sycamore tree, up which the
player character supposedly "climbs". We'd better define it:
The description of the clearing mentions a tall sycamore tree, up which the
player character supposedly "climbs". We'd better define it:
from being picked up by the player character. One final object: the branch
at the top of the tree. Again, not many surprises in this definition:
from being picked up by the player character. One final object: the branch
at the top of the tree. Again, not many surprises in this definition:
Object branch "wide firm bough" top_of_tree
with description "It's flat enough to support a small object.",
Object branch "wide firm bough" top_of_tree
with description "It's flat enough to support a small object.",
put the bird into the nest first. One easy way to enforce this is by
adding a line near the top of the file:
put the bird into the nest first. One easy way to enforce this is by
adding a line near the top of the file:
place it on the branch; when that happens, the game should be over. This
is one way of making it happen:
place it on the branch; when that happens, the game should be over. This
is one way of making it happen:
Object branch "wide firm bough" top_of_tree
with description "It's flat enough to support a small object.",
Object branch "wide firm bough" top_of_tree
with description "It's flat enough to support a small object.",