Text adventure

From NetHackWiki
Jump to navigation Jump to search

A text adventure (or "interactive fiction") is a type of game commonly found on computer servers before someone had the idea to draw a map in ASCII characters, thus creating the roguelike games including NetHack.

As the NetHack Guidebook explains it:

When NetHack's ancestor rogue first appeared, its screen orientation was almost unique among computer fantasy games. Since then, screen orientation has become the norm rather than the exception; NetHack continues this fine tradition. Unlike text adventure games that accept commands in pseudo-English sentences and explain the results in words, NetHack commands are all one or two keystrokes and the results are displayed graphically on the screen.

Interactive Fiction wiki is devoted to text adventures/interactive fiction. As NetHack has changed since the days of Rogue, text adventures have changed since the olden days.

Examples

Colossal Cave Adventure

Colossal Cave Adventure, first released in 1976, was an early (probably the first) text adventure game; indeed, the name text adventure comes from this game.

An online version of Colossal Cave Adventure is available at https://rickadams.org/adventure/ .

Michael C. Toy and Glenn Wichman, two of the authors of Rogue, enjoyed playing Colossal Cave Adventure.[1]

NetHack reimagined as a text adventure

For a relatable example, see the strip of 8 March 2005 in Dudley's dungeon.

Dunnet

The text editor GNU Emacs contains a text adventure called dunnet, written by Ron Schnell. This section features a sample session of dunnet to see what a text adventure is like.

Spoiler warning: The following demonstration contains plot spoilers for the text adventure "dunnet". If you do not want "dunnet" spoiled, do not read below this point.

Okay, since you feel okay with having the beginning of "dunnet" spoiled, let us go to a Unix machine with "emacs" installed and run the usual command to start "dunnet":

$ emacs -batch -l dunnet

Now the game starts:

Dead end
You are at a dead end of a dirt road.  The road goes to the east.
In the distance you can see that it will eventually fork off.  The
trees here are very tall royal palms, and they are spaced equidistant
from each other.
There is a shovel here.
>

Okay. It is a text adventure, so instead of having an ASCII map, you must read through the description of an area. The name of this place is "Dead end", while "There is a shovel here." is the usual way to indicate the presence of some item, and substitutes for the ( symbol in NetHack.

Commands in text adventures are similar to English; they usually consist of "verb" or "verb noun", though some can be more complex than that. Let us try something:

>shake tree

The result of this is:

You begin to shake a tree, and notice a coconut begin to fall from the air.
As you try to get your hand up to block it, you feel the impact as it lands
on your head.
You are dead.
You have scored 0 out of a possible 90 points.
$

Oops. Maybe you were surprised that the game even understands the command "shake tree", but it is easy to die in old-school text adventures. (In more modern text adventures, instant deaths are less common.) Now the game has quit, and we have returned to the Unix shell prompt (here shown as $).

Note, if you type "eat shovel" that also works!

Manipulating the inventory

The inventory in a text adventure is analogous to the inventory in NetHack; you can pick up, carry, drop, and use items. Let us start the game again and interact with the shovel:

$ emacs -batch -l dunnet

We read about the dead end and the shovel again, then we try a command:

>pick up shovel
I don't understand that.
>

That did not work. (In a more modern text adventure, "pick up shovel" would almost certainly work.) Though the help command has some hints, the Dunnet help does not explain much about the inventory. However, part of playing a text adventure is guessing some commands. Also, the inventory commands in Dunnet are similar to those in other text adventures.

We try a different command:

>take shovel
Taken.

If we look at this dead end again:

>look
Dead end
You are at a dead end of a dirt road.  The road goes to the east.
In the distance you can see that it will eventually fork off.  The
trees here are very tall royal palms, and they are spaced equidistant
from each other.

Note that "There is a shovel here." is gone, because we took the shovel. However, if we look in the inventory:

>inventory
You currently have:
A lamp
A shovel

We have the shovel, and apparently we started the game with a lamp.

Now let us try moving around. The word "east" from the description gives a hint:

>east
E/W Dirt road
You are on the continuation of a dirt road.  There are more trees on
both sides of you.  The road continues to the east and west.
There is a large boulder here.
>east
Fork
You are at a fork of two passages, one to the northeast, and one to the
southeast.  The ground here seems very soft. You can also go back west.

"The ground here seems very soft." is a hint; players often need to examine the text for these hints. In this case, maybe this would be a good spot to apply the shovel.

>shovel
I don't understand that.
>apply shovel
I don't understand that.
>dig
I think you found something.

The first two commands did not work, but the third seems interesting. What did we find?

>look
Fork
You are at a fork of two passages, one to the northeast, and one to the
southeast.  The ground here seems very soft. You can also go back west.
There is a CPU card here.
>take cpu
Taken.

Entering the building

At the spot where we took the CPU card, we had the option to go northeast or southeast. We go northeast (most text adventures accept the shortcut ne, equivalent to u in NetHack):

>ne
NE/SW road
You are on a northeast/southwest road.
>ne
Building front
You are at the end of the road.  There is a building in front of you
to the northeast, and the road leads back to the southwest.
>ne
You don't have a key that can open this door.

The need to find a key is a common theme in text adventure games. (Contrast NetHack, where you can just kick most of the doors down, but then the locked doors are only random.)

Maybe the key is on the other path?

>sw
NE/SW road
>sw
Fork
>se
SE/NW road
You are on a southeast/northwest road.
There is some food here.
>take food
Taken.
>se
Bear hangout
You are standing at the end of a road.  A passage leads back to the
northwest.
There is a ferocious bear here!
>fight bear
I don't understand that.
>attack bear
I don't understand that.

Luckily the game does not seem to understand our combat commands. This might have saved us, because fighting strong monsters is often an easy way to die.

>feed bear
Done.
The bear takes the food and runs away with it. He left something behind.

We had to use the food for something. This game does not seem so hard...

>look
Bear hangout
You are standing at the end of a road.  A passage leads back to the
northwest.
There is a shiny brass key here.

Yes, that is exactly what we need! (Unless, of course, it is the wrong key for our door...)

>take key
Taken.
>nw
SE/NW road
>nw
Fork
>ne
NE/SW road
>ne
Building front
>look
Building front
You are at the end of the road.  There is a building in front of you
to the northeast, and the road leads back to the southwest.

Let us check if this key works...

>ne
Old Building hallway
You are in the hallway of an old building.  There are rooms to the east
and west, and doors leading out to the north and south.

Enabling the computer

We are now in a building with rooms to the east and west. Let us try one of them:

>west
Computer room
You are in a computer room.  It seems like most of the equipment has
been removed.  There is a VAX 11/780 in front of you, however, with
one of the cabinets wide open.  A sign on the front of the machine
says: This VAX is named 'pokey'.  To type on the console, use the
'type' command.  The exit is to the east.
The panel lights are steady and motionless.
>type
You type on the keyboard, but your characters do not even echo.

Wait, our inventory contains a CPU card:

>inventory
You currently have:
A lamp
A shovel
A computer board
A brass key

Maybe we need to use this board in this computer?

>read board
The CPU board has a VAX chip on it.  It seems to have
2 Megabytes of RAM onboard.

Yes, the computer is a VAX, and this board is for a VAX, so maybe they match.

>install board
I don't understand that.
>put board in vax
As you put the CPU board in the computer, it immediately springs to life.
The lights start flashing, and the fans seem to startup.

The command "put X in Y" is common in text adventures, and seemed to work here.

>type
 

UNIX System V, Release 2.2 (pokey)

login:

We have the computer working, but we are not sure yet how to login. Computer use is peculiar to Dunnet and less common in other text adventures. (Back when Dunnet appeared, most Emacs users had significant Unix knowledge.) The results of using this computer might be surprising, and the game becomes more difficult after that...

(after some failed logins)
login incorrect
>shake tree
I don't see that here.
>quit

You have scored 0 out of a possible 90 points.

And we have not yet scored any points! Hopefully, though, this demonstration gave you some of idea of what a text adventure is like.

See also

References