(Longish) The role of the parser

69 views
Skip to first unread message

Anssi Raisanen

unread,
Jun 1, 2001, 2:48:30 AM6/1/01
to
THE PARSER - ANOTHER CHARACTER IN TEXT ADVENTURES?

(my "collected" musings, sorry if this has already been discussed
recently...)


The responses that the game gives the player after the input commands
play a central role in any interactive fiction. It is mainly through
these parser responses that we deem if a game is humorous, dull,
serious, etc. But the deeper role of the parser is often paid rather
little attention to. Consider the following examples:

>TAKE LAMP
I see no lamp here.

>WEAR SHOES
OK, you're now wearing the shoes.**

I.e., who sees no lamp here? The player? Not likely. The parser is
here taken to be an all-knowing informator - or at least
better-knowing than the player - that the player relies on. The
feeling is almost as if the player/hero actually isn't in the location
at all (or is blind etc) and gives remote commands to someone else who
carries them out. Or, in the second example, he has a "servant" or
"robot" with him who fulfills his wishes.
The parser often almost becomes a companion to the player, with
its own personality in the most extreme cases. It comments on the
player's actions, silly and otherwise. Often it won't allow the
player to do some things, like killing himself, etc. Thus, it could be
said to take the role of another character in the story. Often its
role is rather ambivalent; consider these examples, from Zork I:

>EAT FOOD
Thank you very much. It really hit the spot.

>DRINK WATER
Thank you very much. I was rather thirsty (from all this talking,
probably).

In these examples, then, the player/adventurer doesn't eat the food or
drink the water (even if otherwise the player does all the things in
the game "himself"); it is the game (the parser) that does it for him
in this case. This change in the point of view was of course put there
to have a humorous effect.
Further points that illustrate the separate character of the parser
are the following:


>WAVE AT BANDITS
What, indeed?
(from Beyond Zork)

>EXAMINE COAT HANGER
The coat hanger is not important.
(from Uncle Zebulon's Will)


In the first example, the parser comments on the player's actions.
Even if the action is not silly in itself (in this example, the player
wants to catch the attention of the bandits), the game dismisses it as
such, and the command is not carried out. Here, the meaning has
clearly been to insert a humorous comment, and the underlying message
is that waving has no effect in this situation, or that it could be
dangerous. Here again, the parser again takes on the role of another
character in the adventure, a servant that refuses to fulfill a
"silly" command, and affects the course of events by refusing to do
something.
In the second example, the parser tells right away that the coat
hanger is not needed to solve the game, and no description of it is
given. This feature can be said to be there to save the player's time,
but it can be argued, why the player is not allowed even to examine
it, and why it is put there in the first place. Descriptions of even
unimportant objects could add to the enjoyability of the game. Here,
the parser is "all-knowing";, as opposed to a parser that would let
the player find out whether there is any use for the object or not. On
the other hand, it would become rather wearisome for the player to try
everything and try to find out the function of objects that eventually
prove to be unimportant. In graphic adventure games, you can't
interact with all objects (or go everywhere) either. It isn't
motivated why it is so, so maybe text adventures too could be allowed
to tell the player that some objects are unimportant right when
encountering them, without motivating it further. (In graphic
adventures, however, you are able to see the object anyway and examine
it, even if you can not interact with it. Thus, the case is a bit
different when comparing these two types of games.)

Due to this use of the parser, it, besides being an all-knowing
help and the occasional humorous wise-cracker, can become some kind of
an adversary to the player: the player learns to know what the parser
won't let him do, and he tries to overcome these obstacles to perform
the actions that he would like to perform. Besides the author's
intentional programming decisions, there of course are the parser's
limitations and game bugs that can obstruct the player from
proceeding. I have studied an extremish case of the above from a
humorous point of view in an ALAN game I just released, called
'Bugged'. In it, it is often very obvious what you should do, but the
"bugs" that have been left in the game hinder you from doing it, and
you must find other ways to proceed. Also, I experimented a bit with
the parser point of view. I would appreciate if you try it out and let
me know how you feel about the game. :-)

What would a neutral parser be like then? Let's consider the use of
swearwords, for instance. A typical response would be something like
this:

>SHIT
Watch your language!

Here the parser 'hears' what the player is saying and comments on
that. A neutral response would be like the following:

>DAMN
Frustrated, you utter a swearword, but the sound of your own voice
against the
prevailing silence feels oddly out of place.

or even:

>F***
Your cursing aloud arouses the attention of a bear that has been
sleeping nearby. It
appears from the bushes and eyes you suspiciously, with a glint of
hunger in its eyes.It
takes a couple of steps in your direction.

The two latter responses above would come closer to interactive
fiction than would the traditional, "scolding" response, in the sense
that every move you make elicits a consequence in the story, and not a
separate response out of the actual story. This approach gives you the
feeling that you really are on your own, and your doings are not
hindered, commented on or judged by the parser. You are responsible
for your actions yourself. This method may make the designing process
very wearisome for the designer, as every little action has a
consequence (or a separate textual comment), but on the other hand,
compare the amount of graphic detail in games like Riven etc. Why
couldn't there be as much to experience and explore in a text
adventure? (But maybe that is too much to ask, if we bear in mind the
saying "One picture tells more than a thousand words"!)
What about the often pointed-out aspect that the game should warn
the player about a danger beforehand, or hinder him from jumping off a
cliff into a certain death, for example? Let's compare the following
examples:


>JUMP OFF CLIFF
Ok.
**** You have died****

Straightforward enough, and gives the player freedom to do as he
pleases. But, somehow it doesn't feel very satisfactory. At least some
kind of warning should precede situations like this.


>JUMP OFF CLIFF
At the last moment, you realize the silliness of your action, and
change your mind.

No freedom for the player, the parser dictates what the adventurer
feels, even if he would still like to jump. It hinders the adventurer
from getting killed in vain, however.


>JUMP OFF CLIFF
As you are about to jump, there is a sound from behind you. You turn
to look what caused it and notice a wounded soldier pleading for
help.

Here, the player's attention is driven to something else, but this
approach is a bit clumsy in that the player is still be able to try
jumping off the ledge.

>JUMP OFF CLIFF
You realize you are sick and tired of the whole quest. You jump off
the cliff, in hope
of not having to think about it ever again. After having fallen some
way, however, you
hit a leafy branch of a tree that is growing out of a crack in the
cliff wall. A soft thump, and you find yourself caught in the
branches, half-way between the cliff top and the ground.

Here, attempting something foolish results in a situation where you
have to find your way out of even more difficult circumstances than
the one you were in. The use of the last type of responses, however,
gets an artificial flavor if used in a great extent; it is not very
realistic if you cannot kill yourself whatever the situation. Also,
you could start attempting to kill yourself in the game repeatedly
just to see what kind of extra puzzles there would be to be solved.
One way to get around this would be:

>KILL MYSELF
If you want to stop playing, please type "quit".

>JUMP OFF LEDGE
That would get you killed. If you want to stop playing, please type
"quit".

Or maybe it is so, that the player wants to know how it would feel to
get killed in different situations during the game. In a text
adventure, it would be safe to try. He would just want to feel a bit
of excitement that he cannot do ordinarily. That way, if the command
is such that the player must be assumed to know that it gets him
killed but he wants to try it anyway, maybe it should be allowed.

>JUMP OFF LEDGE
You jump off the ledge, the wind whirling around you as you drop
faster and faster.
The cliff wall beside you glides away in your eyes in an increasing
speed. You hit
the ground so quickly that you have no time to feel the crash before
you are a lifeless
heap of flesh lying on the ground.

**** Game over ****

This kind of approach has the danger that the adventurer would like to
try dying in many different situations and see how the game describes
it in the different cases. Whether this is a good thing is disputable.

These examples aim to illustrate the problems that the game designer
should be aware of when designing the parser responses. These features
effect the amount of freedom the player has while playing the game,
plus many other aspects of the game. I don't speak in favor of either
an all-knowing parser or an as-neutral-as-possible one. It is of
course the designer's choice in every separate game to do as he
pleases. The role of the parser should be kept in mind, however, if
the designer wants to create congruous games and decide, to what
extent the parser takes the role of another "character" in the game.

P.S. Of Infocom's games, the ones by Brian Moriarty (Wishbringer,
Beyond Zork, Trinity) use as a rule a rather neutral parser; the word
"I" practically never shows up. Phrases like "I don't know the
word..." are replaced by such as "You don't need the word... to
complete this story", or "This story doesn't recognise the word ...".
An opposite example is, say, the recent 'Zork:The Undiscovered
Underground', where the parser is very wise-cracking and
self-conscious (e.g. typing HELP gives
"Hey, I'm doing the best I can!" and so on.

*Here, and throughout, please assume he/she, him/her, his/her etc.

**When no source is given, the examples are made up by me, or the
cases illustrated appear in numerous games.


- Anssi

Nikita

unread,
Jun 1, 2001, 3:05:52 AM6/1/01
to
anss...@hotmail.com (Anssi Raisanen) claims to have found this in a
bottle:


> feeling is almost as if the player/hero actually isn't in the location
> at all (or is blind etc)

> ^^^^^
Nice comparison.


> >JUMP OFF CLIFF
> Ok.
> **** You have died****
>
> Straightforward enough, and gives the player freedom to do as he
> pleases. But, somehow it doesn't feel very satisfactory. At least some
> kind of warning should precede situations like this.

But why? Sure player knows what is going to happen. Sure he/she won't
just type it by mistake. It's completely ethical to allow the player
to suicude :)
Besides, who in their right mind would not SAVE before doing that?

--
P.S. please if you get a chanse put some flowrs
on Algernons grave in the bak yard.

josh g

unread,
Jun 1, 2001, 12:45:16 PM6/1/01
to
Anssi Raisanen <anss...@hotmail.com> wrote:
> THE PARSER - ANOTHER CHARACTER IN TEXT ADVENTURES?

> (my "collected" musings, sorry if this has already been discussed
> recently...)


> The responses that the game gives the player after the input commands
> play a central role in any interactive fiction. It is mainly through
> these parser responses that we deem if a game is humorous, dull,
> serious, etc. But the deeper role of the parser is often paid rather
> little attention to. Consider the following examples:


I don't have anything clever to add to this, but it would be a crime if
I didn't thank you for writing it. This was a very interesting read,
especially the examples of "who" the parser was in various Infocom games.

Thanks!

- josh g.


steven.frew

unread,
Jun 1, 2001, 10:01:00 PM6/1/01
to
> What would a neutral parser be like then? Let's consider the use of
> swearwords, for instance.

I'm attempting to code a game right now, hopefully in time for the
competition. I'm trying to make the parser "front-end" as "dry" as possible,
even though the game itself will be (hopefully) light-hearted and humorous.
I've attempting to remove all stock parser responses (from the player's POV)
in favour of generic responses (from the actor's POV), so I can easily apply
any action to any character at any location and be fairly sure that the
player will see a reasonably gramattically-correct response (if one is
applicable). This ought to allow for richer NPCs and more interactivity.

This will mean that, in response to most actions, the parser will initially
return a plain explanation of what has happened ("You take the object", or
in the case of failure, "You try to take the object". "Taken." simply won't
do, as it implies the actor is the player). The game-code that sits on top
of the parser can then add embellishment ("You try to take the object.
Unfortunately, you find that the object is protected by an invisible
force-field").


Kathleen M. Fischer

unread,
Jun 1, 2001, 2:42:35 PM6/1/01
to
>===== Original Message From anss...@hotmail.com (Anssi Raisanen) =====

>The responses that the game gives the player after the input commands
>play a central role in any interactive fiction. It is mainly through
>these parser responses that we deem if a game is humorous, dull,
>serious, etc. But the deeper role of the parser is often paid rather
>little attention to. Consider the following examples:

<snip interesting examples>

>I don't speak in favor of either
>an all-knowing parser or an as-neutral-as-possible one. It is of
>course the designer's choice in every separate game to do as he
>pleases. The role of the parser should be kept in mind, however, if
>the designer wants to create congruous games and decide, to what
>extent the parser takes the role of another "character" in the game.

In both The Cove and Masquerade, I attempted the "eliminate" the parser as
much as possible. ie:

>KISS ETHAN
You blush at the very thought.

... or something like that. It's been a while. :)

It was actually an interesting exercise to come up with "parserless" phrases
that are applicable the vast majority of the time, and some of my failures
were really quite spectacular (sorry, can't think of them off the top of my
head at the moment. Really should have written them down before I fixed
them)

Whether I succeed in either game is left as an exercise for the player. :)

Kathleen (FWIW: The Cove has a cliff in the first "room", if you care to
check
out my stab at it)

-- Masquerade (Comp2000, nominated for Best Story (XYZZY's))
-- ftp://ftp.gmd.de/if-archive/games/zcode/Mask.z5
-- The Cove - Best of Landscape, Interactive Fiction Art Show 2000
-- ftp://ftp.gmd.de/if-archive/games/zcode/Cove.z5
-- Excuse me while I dance a little jig of despair

John Elliott

unread,
Jun 1, 2001, 5:02:14 PM6/1/01
to
anss...@hotmail.com (Anssi Raisanen) wrote:
> The parser often almost becomes a companion to the player, with
>its own personality in the most extreme cases.

Quite an extreme case is the parser in Very Big Cave Adventure...

Let's have a look at you.
Healthy enough, I suppose.
Do with a bit more exercise.
Still, you'll soon get that.
Alright, you'll do.

Let's get going.

...

>S
No. It is far too wet underfoot.
You'll catch your death and then
who'll get the blame? Me, that's
who. Not you. You'll be happily
dead. I'll have to explain it to
the RSPCA. In a word, no.

...

>OPEN DOOR
It seems to be locked. In fact I
would go so far as to say it is
locked. Of course, you couldn't
tell for sure just by examining
the door. I mean, it might be
jammed or nailed up or a very
fat person might have gone to
sleep leaning on the other side.
Or he might be awake and pushing
it deliberately. So strictly
speaking I probably shouldn't be
telling you that it is locked.
But what are friends for after
all?


...

>DROP BOMB
KABLOOT!

I say, where are you?

And what's that pair of smoking
boots doing here?

Oh well. Better look for a new
adventurer.

That one was a bit weedy anyway.

--
------------- http://www.seasip.demon.co.uk/index.html --------------------
John Elliott |BLOODNOK: "But why have you got such a long face?"
|SEAGOON: "Heavy dentures, Sir!" - The Goon Show
:-------------------------------------------------------------------------)

Kevin Forchione

unread,
Jun 1, 2001, 11:49:03 PM6/1/01
to
"John Elliott" <j...@seasip.demon.co.uk> wrote in message
news:991429466.7480.1...@news.demon.co.uk...

> anss...@hotmail.com (Anssi Raisanen) wrote:
> > The parser often almost becomes a companion to the player, with
> >its own personality in the most extreme cases.
>
> Quite an extreme case is the parser in Very Big Cave Adventure...
<snip>

Hilarious examples!

--Kevin


Billy Harris

unread,
Jun 2, 2001, 8:11:24 AM6/2/01
to
In article <add2cd4d.01053...@posting.google.com>, Anssi
Raisanen <anss...@hotmail.com> wrote:

> THE PARSER - ANOTHER CHARACTER IN TEXT ADVENTURES?
>
> (my "collected" musings, sorry if this has already been discussed
> recently...)

A worth topic, and interesting commentary!

[snipping lots o' stuff on the difference, if any, between the actor
and the player]

Originally, the games were clear that the "one who answered" was
different from the one who typed. I think the original had a passage
close to:

-- I will be your eyes and ears during your stay in the cavern. Please
-- type what you wish me to do and I will try my best.

... In the early games, if you died you were ressurrected, and again
the game made clear that there were two people involved.

-- Oh dear, you seem to have gotten yourself killed. Well, I've never
-- actually done this before, but I seem to remember a magic spell..
-- In a puff of orange smoke, you appear in the...
--
-- Lounge
-- >

Since then, games have rarely paid attention to the dichotomy, leading
to the subtle effects you noted. It's kind of how shift-tab means "move
one step backward" rather than "move far to the right"

Nowadays, when a game pays attention to this split at all, it is an
important part of the game. There was a horribly buggy graphic
adventure game named the Better Dead Ratification that had you merge
with a cyborg who took the place of a narrator. For text adventures,
I'm told that Delusions, among others, pays very close attention to
this split.

There are also games which go to the other extreme of removing "parser
messages" entirely. The other poster mention Mask; I didn't pay much
attention to the overridden parse messages, but it's a good game so
play it anyway. There was also one [whose name I unfortunately forgot]
which was told in the first person past tense throughout. It had an
introspective--almost ponderous--feel to it. A default "not important"
response would be something like:

-- > EXAMINE FORK
-- I studied the fork in detail and thought about the various ways it
-- might help me in my journey. However, I decided that it really
-- was not relevant to my current problems.

>
>
> >JUMP OFF CLIFF
> Ok.
> **** You have died****
>
> Straightforward enough, and gives the player freedom to do as he
> pleases. But, somehow it doesn't feel very satisfactory. At least some
> kind of warning should precede situations like this.

Agreed. But the warning may be implied in the room description or in
the response to "examine cliff".

>
> >JUMP OFF CLIFF
> At the last moment, you realize the silliness of your action, and
> change your mind.
>
> No freedom for the player, the parser dictates what the adventurer
> feels, even if he would still like to jump. It hinders the adventurer
> from getting killed in vain, however.

This is my favorite approach, but it depends on having enough of a
notion of the PC's character to rule this action out of character.


> >JUMP OFF CLIFF
> As you are about to jump, there is a sound from behind you. You turn
> to look what caused it and notice a wounded soldier pleading for
> help.
>
> Here, the player's attention is driven to something else, but this
> approach is a bit clumsy in that the player is still be able to try
> jumping off the ledge.

It is also clumsy because it is blatant example of false causality.
That is, there is no physical reason why thinking about jumping off a
cliff should cause a soldier to materialize from thin air, and having
such a response causes jaw-dropping break from the suspension of
disbelieve (what some people call meisiess, but my spelling is too poor
to use that word).

> >JUMP OFF CLIFF
> You realize you are sick and tired of the whole quest. You jump off
> the cliff, in hope
> of not having to think about it ever again. After having fallen some
> way, however, you
> hit a leafy branch of a tree that is growing out of a crack in the
> cliff wall. A soft thump, and you find yourself caught in the
> branches, half-way between the cliff top and the ground.
>
> Here, attempting something foolish results in a situation where you
> have to find your way out of even more difficult circumstances than
> the one you were in.

Well, again, the player can potentially untangle himself and jump
again. Or try landing head-first, or any of a myriad of other actions.
But for what purpose are we trying so hard to interrupt the player's
descent to the ground? If we don't want the player to die, then option
2 "not in character" is a lot less effort than the other ideas for
suicide prevention and no less blatant. Or, option one "OK, you're
dead" or better, the graphical description I clipped, both of which
kill the player, allow for undos, are easy to implement, ...


Hmmm... I seem to have accidentally clipped your comparison of
extraneous detail in Riven as compared to text adventures. In one sense
graphical adventures have more "objects" in terms of vines, boulders,
steps, wood panels, desk lamps, trees, and so on. However, in text
adventures "look at" gives MORE information than simply indicating the
presense of an object. If we only count objects you can get a "close
up" of or interact with at least peripherally, text adventures usually
have MORE extraneous detail than graphical games.

Hmmm... I'm not sure if this addresses your point, but Riven and
similar games actually have a much smaller "branching factor" than text
games. What I mean is that the possible actions are "click on this
pixel", or occasionally "click on this pixel while holding the widget".
In 99% of the pixels, nothing happens. In about 80% of the rest, the
click changes your location.

In contrast, text adventures give the player a huge vocabulary to try
to manipulate the world, and responses of "that doesn't work" which are
tolerated in graphical games quickly become unacceptable in text games.
Hmm... I think I wondered afield, so I'll stop now.

Andrew Merenbach

unread,
Jun 2, 2001, 11:37:38 AM6/2/01
to
How about doing:

Object "Lover's Leap"
with
description "You are atop a high cliff. Down below you, wave crash
against rocks.",
before
[; Jump: print "Are you sure you wish to end it all?";
if (YesOrNo()) {deadflag = 1; "You sigh, remembering what a
failure your love-life is, and decide to end it all, throwing yourself off,
to the crashing waves below.";} "You wisely decide against it.";
],
has light;

Something like that, to give the player a choice. I certainly find
first-person, present-tense parsers best used with humor, and first-person
(and second-person) past-tense ones best with mysterious ones.

There's also the topic of THIRD-PERSON. That'd be interesting (let's say
"Joe" is the player):

>examine door
Joe examines the door, but all he finds is a well-hidden keyhole.

>break door
Joe bashes his body against the door, but to no avail.

>shoot me with gun
Joe decides to end it all, because he has failed in the simplest of quests.

***You have died***
In that game, Joe scored...

That last one was a bit foolish, but the others were... interested. So: how
about past-tense, third-person?...

>push button
Joe pushed the button, but nothing happened.

>kill waiter
Joe throttled the waiter, who pulled a gun on him (as well as the trigger).

***You have died***
In that game, Joe scored...

Notice in both examples, the death message says "scored"--present tense
doesn't mean it should say "scores," as after death the player is, well,
dead.


Those are my thoughts on the issue. For now, at least.


--
Andrew M.

Billy Harris

unread,
Jun 2, 2001, 8:26:13 PM6/2/01
to
In article <B73E5670.6BB5%amere...@mac.com>, Andrew Merenbach

<amere...@mac.com> wrote:
> There's also the topic of THIRD-PERSON. That'd be interesting (let's say
> "Joe" is the player):
>
[snip]

> >shoot me with gun
> Joe decides to end it all, because he has failed in the simplest of quests.
>
> ***You have died***
> In that game, Joe scored...

This should read
*** Joe has died ***

unless we want to reopen the can of worms about who Joe is vs who "you"
are.

Something I meant to put in my previous post: In Suspended, you are
held in a cybernetic tank and appear only as a bit character. Your
commands are executed by a team of robots, and it is quite possible for
your command to send the robot to death. This doesn't end the game nor
does it kill "you" who after all are happily resting in a vat.

A similar sequence happens in A Mind Forever Voyaging, in which you can
end the simulation if your avatar gets killed but "you" can continue to
perform actions, including starting the simulator again.

Fred M. Sloniker

unread,
Jun 3, 2001, 2:29:46 AM6/3/01
to
On Sat, 02 Jun 2001 19:26:13 -0500, Billy Harris
<wha...@mail.airmail.net> wrote:

>Something I meant to put in my previous post: In Suspended, you are
>held in a cybernetic tank and appear only as a bit character. Your
>commands are executed by a team of robots, and it is quite possible
>for your command to send the robot to death. This doesn't end the
>game nor does it kill "you" who after all are happily resting in a
>vat.

Though it's quite possible to die in the game, or indeed to kill
yourself. In fact, the first time I played Suspended, pretty much my
first action was to order one of my robots to open the big cylinder in
the central room, not realizing (a) where *I* was or (b) what the
result of this action would be. Ewww. Messy.

James Wyatt

unread,
Jun 5, 2001, 11:57:13 AM6/5/01
to
Wow! Really interesting.. I've been thinking about that lines for a while-
one idea for a game that I never got to was that the player was some sort of
occult nasty who was possessing another character, who acted as the parser.
So, for example:

> GO NORTH
I try to stop myself, but my legs charge forward and I slam painfully into
the wall.

> GET KNIFE
Slowly, painfully, my hand grips the sharp knife.

> KILL LAUREN
Nice try, but I'm able to control myself. For the time being, at least.

>ROTATE HEAD 360 DEGREES

I was going to mention Very Big Cave Adventure but was pipped to the post.
(Damn!)

I think the reason the parser acts like it is is because these games stemmed
from tabletop roleplaying (Advent certainly had influences there, with
dwarves, dragons and whatnot.) and the parser has taken the place of the
Games Master.


Reply all
Reply to author
Forward
0 new messages