Jerz: Writing for the Internet (EL 236)


27 Oct 2006

Introduction to Interactive Fiction

Interactive fiction is a kind of text-based computer games. The genre has been around since the mid 1970s, dating from an era in which computers typically displayed their output on long streams of folded paper rather than on a video screen.

In the late 60s, when the internet was created, computer interfaces were designed to do only one thing -- accept typed command from the operator, and display a textual response.

Command Line Interface

The command line interface (CLI) was a huge advance over stacks of punch cards. Although it seems antiquated and strange to most people today, anyone who used computers would have been trained to understand the CLI, and would in fact have considered it a natural and effective way of communicating with the computer. There weren't home PCs at this time, so the only people who would have come into regular contact with computers would be researchers, academics, and other professionals who had work to do that they couldn't do any other way.

We have already spent some time looking at how the special characteristics of the World Wide Web have changed the way people write. Let's experiment with the command line interface, and then consider how the special characteristics of this medium led to specific kinds of electronic writing. Our goal is to look closely at a medium that will be very unfamiliar to most of you, so that we can focus on the relationship between writing (and reading) and the medium in which the text exists.


On a Windows machine, go to Start -> run... (This won't actually work at all in the SHU computer labs, as the command-line interface is very powerful, so public users aren't permitted to access it. On your own PC, you might find it under Start -> Accessories -> Command line, or something similar.)

In the window that opens, type "cmd". A mostly black window will open up.

Mine has 2 lines of introduction (describing the operating system and giving the software copyright) and then it gives the cryptic line

p:\>
That is the "command prompt," which tells you that the computer is just sitting there, waiting for your input. Let's try talking to the computer. Type "hello."

The result isn't exactly encouraging or impressive, is it?

People like menus and icons because they fill the screen and give you ideas about what you can do. The command-line interface, on the other hand, is optimized for experts who don't need all that clutter.

Now type "help," and you'll see a plain text menu that completely fills the screen. The menu simply gives you a list of words that you can type, with a brief description of each.

I'm going to assume that you are working in a SHU computer lab. Type the capital letter I, followed by a colon

I:
the command prompt should now read
I:\>

The computer recognized this command as meaning "Look at the networked space on the I drive." If we type

q:\>
we get an error message, because there is no "q" drive.

Now type

dir

Do you recognize what the computer displays? That's a textual representation of the contents of your I drive. You can change the way the computer displays the information.

dir /w
will print out the information in columns, rather than one long list.
dir | more
will show one page of information at a time (though if you don't have many files on this drive, you won't see much difference in the output.

You may sometimes hear me refer to a "directory" on your computer, while you and your peers probably always think of it as a "folder". That's because there was a way to nest groups of files inside one another long before there was a graphical display that created a "folder" icon for you to click on. If you drag and drop the icon of a file from one folder to another, the file doesn't actually change location on your hard drive. All that changes is the string of names the computer uses in order to locate that file. To me, and to others like me who first learned to use a computer before there were pretty graphics, the picture of a folder is just a convenient way to represent a listing of indexes to file names. But "folder" is just a metaphor, as is "desktop," "file," "window," and "menu." These metaphors are so powerful that they dominate the way we think about computers. I'm going to try to get you to see those words as metaphors, by showing you how to do some very familiar jobs with unfamiliar tools.

Type the command

mkdir cli
, and the computer should simply respond with the "I:>" prompt. That means "Nothing unexpected happened," which means your attempt to create a directory was successful.

Now type

cd cli
, which is the way we tell the computer "Change the current directory to cli."

The bottom line of your window should read "i:\cli>"

Now we will use the command line interface to launch a program -- in this case, an old-fashioned text editor.

edit myfile
You should see the black screen change to a mostly blue screen, with a set of menu options along the top. You can click on these menus items with the mouse, but the window is actually optimized for people who use keyboards. If you tap the "Alt" key, you'll see the top menu change. You can use the arrow keys to move the highlight box left and right, and you use ENTER to select an option. (This was state-of-the art window navigation in the mid 80s.)

Push "ESC" in order to de-active the upper menu. Now you can type in the main blue area. Just type anything, and then select File / Save, and then File / Exit. The blue screen should disappear, and you should see the black window where you started. Note that the black CLI screen has not changed at all -- no icon has appeared representing the new file you created.

To look at the contents of the folder you are in, type "dir" (for "directory"). You should see something like this:


10/27/2006 10:14 AM
.

10/27/2006 10:14 AM
..

10/27/2006 10:14 AM 40 myfile

1 File(s) 40 bytes

2 Dir(s) 38,854,656 bytes free

The first line that ends in the single period represents the current folder. The second line with the two periods represents the folder closer to the root. The third line shows the new file you just created "myfile".

We can edit that file again by typing "edit myfile", just as you can click on an icon to load it in the default program.

To delete a file, instead of dragging it to a recycling bin, you type "delete [filename]". But let's first try to delete a non-existent filename. This is something you can never do with an icon-based program, but it's the kind of thing that happens all the type in CLI.

del fake file

The computer prints out an error message.

del my file

This is still wrong, since the file is actually called "myfile" (with no space). The computer is not smart enough to be able to guess that you really meant "myfile."

del myfile

The computer does not print out anything in response, because nothing unexpected happened. Type "dir" again to confirm that the file is gone.

Before we finish with the CLI, type "edit newfile.txt", type a few lines, and then choose File / Exit. (It will prompt you to save the changes; choose yes.)

Now go back to your Windows desktop, click on My Computer -> I drive -> cli folder, and you should see an icon for "newfile.txt". Click on it, and you will see it open in the familiar text editor.

Now that you have gotten a feel for how the CLI works, let's consider a few creative things that people have done with CLI.

ELIZA (a 1966 program for simulating a conversation with a therapist)

Hunt the Wumpus is a text-only hide-and-seek game from 1972.

In the mid 70s, Colossal Cave Adventure created a sensation. The online version I've linked to suffers from "telephone game" syndrome -- that is, so many people have worked on it that it's hard to get a good sense of what the game was really like, but the annotations on the left side of the frame should help you through some of the tough spots.

A group of people at MIT who played "Adventure" when it first came out made their own version, Zork, which is more full of humor and complex puzzles, and which was eventually polished and released as a commercial product in the early 80s. Yes, people enjoyed these games so much that they were willing to pay for them.

Jump ahead 20 years, long after the CD ROM drive has dethroned the text-adventure game from its place on the top-10 software lists, and long after free authoring toolkits have made it possible for the average idie programmer to create products that it used to take a company full of software engineers to produce, and we see Emily Short's Galatea. Since Galatea simulates a conversation, it resembles ELIZA, but unlike ELIZA, Galatea has a personality and an agenda of her own. The frame on the left contains tips and instructions.

Trackbacks
MT QuickPost | Check Latest Trackbacks
http://blogs.setonhill.edu/mt/mt-tb.cgi/6587

Comments

Throughout the decades the CLI has undergone major facelifts in the strange everturning world of computers.
After playing the simple but yet complexed videogames(rpg) I noticed that the games are designed much like the ones I remember in arcades. A simple configuration and an eay task that ended up driving you insane attempting to get through to the end.

Posted by: Jeremy Barrick at October 27, 2006 07:57 PM

Your links on the ELIZA page are broken. Just thought you'd like to know.

Posted by: Karissa at October 30, 2006 09:28 AM

Thanks, Karissa. According to the time-stamp, I last updated that page in 2001. Wow! It sure needed some attention.

Posted by: Dennis G. Jerz at October 30, 2006 10:08 AM
Post a comment









Remember personal info?






August
Su Mo Tu We Th Fr Sa
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
September
Su Mo Tu We Th Fr Sa
          01 2
3 04 5 06 7 08 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
October
Su Mo Tu We Th Fr Sa
1 02 3 04 5 06 7
8 09 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
November
Su Mo Tu We Th Fr Sa
      01 2 03 4
5 06 7 08 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
December
Su Mo Tu We Th Fr Sa
          01 2
3 04 5 06 7 08 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31