DOC PREVIEW
Stanford CS 106A - Handout #59

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Eric Roberts Handout #59CS 106A March 1, 2010Adventure SlidesAdventure!Eric RobertsCS 106AMarch 1, 2010When Myst appeared in 1993 (back when computers were too slowto animate more than a small part of the screen), the most commonquestion I got from CS 106A students was: Can I write Myst?MystThe Origins of the Internet• The Internet that has become so much a part of today’s worldgot its start as the ARPANET in the late 1960s.• The contract to build the ARPANET was awarded to BoltBeranek and Newman Inc. (BBN), a small, Cambridge-basedresearch and development firm founded by MIT engineers.A prototype implementation of the ARPANET connectingfour nodes (one at Stanford) came on line in December 1969.• The initial design for the ARPANET allowed for a maximumof 127 connected computers. Larger networks were possibleonly after the TCP/IP protocols were adopted in the 1980s.Early Designs for the ARPANETAs Larry Roberts envisionedit in his notebooks:As deployed in 1969:The ARPANET in 1971 The ARPANET in 1971– 2 –Life among the WizardsA small circle of friends at BBN had gottenhooked on Dungeons and Dragons, an elaboratefantasy role-playing game in which one playerinvents a setting and populates it with monstersand puzzles, and the other players then make theirway through that setting. The game exists only inthe minds of the players.Dave Walden got his introduction to the game onenight when Eric Roberts, a student from a class hewas teaching at Harvard, took him to a D&Dsession. Walden immediately rounded up a groupof friends from the ARPANET team for continuedsessions. Roberts created the Mirkwood Tales. . . .One of the regulars was Will Crowther . . .The history of the Internet has been told in several books. Onetells the following interesting story:The BBN ARPANET TeamWillieCrowtherDaveWaldenWelcome to ADVENTURE!! Would you like instructions?YESSomewhere nearby is Colossal Cave, where others have found fortunes intreasure and gold, though it is rumored that some who enter are neverseen again. Magic is said to work in the cave. I will be your eyesand hands. Direct me with natural English commands; I don't under-stand all of the English language, but I do a pretty good job.(Should you get stuck, type "HELP" or "?" for some general hints.)Good Luck!- - - -You are standing at the end of a road before a small brick building.Around you is a forest. A small stream flows out of the building anddown a gully to the south. The road runs up a small hill to the west.GO INSIDEYou are inside a building, a well house for a large spring.There are some keys on the ground here. . . .AdventureWillie Crowther’s Adventure GameYou are in the Hall of the Mountain King, with passages off in mostdirections, some of which appear to be newly constructed.A huge green fierce snake bars the way!RELEASE BIRDThe little bird attacks the green snake, and in an astounding flurrydrives the snake away.. . . some time later . . .You are in a secret canyon which exits to the north and east.A huge green fierce dragon bars the way!The dragon is sprawled out on a persian rug!!RELEASE BIRDThe little bird attacks the green dragon, and in an astounding flurrygets burnt to a cinder. The ashes blow away.AdventureWillie Crowther’s Adventure GameA Brief History of Adventure• Eric Roberts begins the Mirkwood Tales in early 1975.• Will Crowther creates Adventure later that year.• Will moves to Xerox/PARC in 1976.• Stanford graduate student Don Woods releases an expandedversion of Adventure in early 1977.• Dave Lebling and others from MIT release the first version ofZork in 1977. That game later becomes the foundation of thecomputer game company Infocom.• Adventure is ported to a wide variety of platforms by 1980.• Eric Roberts creates an expanded version in 1984 and uses itas the basis for his first Adventure Contest at Wellesley.Structures in the Adventure GameAdvRoomMagicSuperclassComplete implementation incompiled form.AdvObjectMagicSuperclassComplete implementation incompiled form.AdventureMagicSuperclassComplete implementation incompiled form.AdventureMain program call that tiesthe application together andimplements the commands.AdvRoomMaintains the data structurefor each room in the cave.AdvObjectMaintains the data structurefor each object that can becarried by the player.AdvMotionTableEntryStructure for recording whatpassages lead from a room.– 3 –1Outside buildingYou are standing at the end of a road before a small brickbuilding. A small stream flows out of the building anddown a gully to the south. A road runs up a small hillto the west.-----WEST 2UP 2NORTH 3IN 3SOUTH 4DOWN 42End of roadYou are at the end of a road at the top of a small hill.You can see a small building in the valley to the east.-----EAST 1DOWN 1The SmallRooms.txt Data File3Inside buildingYou are inside a building, a well house for a large spring.-----SOUTH 1OUT 14Valley beside a streamYou are in a valley in the forest beside a stream tumblingalong a rocky bed. The stream is flowing to the south.-----NORTH 1UP 1SOUTH 5DOWN 55Slit in rockAt your feet all the water of the stream splashes into atwo-inch slit in the rock. To the south, the streambed isbare rock.-----NORTH 4UP 4SOUTH 6DOWN 6The SmallRooms.txt Data File6Outside grateYou are in a 25-foot depression floored with bare dirt.Set into the dirt is a strong steel grate mounted inconcrete. A dry streambed leads into the depression fromthe north.-----NORTH 5UP 5DOWN 8/KEYSDOWN 77Above locked grateThe grate is locked and you don't have any keys.-----FORCED 68Beneath grateYou are in a small chamber beneath a 3x3 steel grate tothe surface. A low crawl over cobbles leads inward tothe west.-----UP 6OUT 6IN 9WEST 9The SmallRooms.txt Data File Locked Passages and Forced Motions• The segment of the rooms data file on the previous slideillustrates two features of the Adventure game that you needto implement: locked passages and forced motions.• In room 6, you can only descend below the grate if you areholding the keys. This fact is represented by the linesin the data file. The /KEYS marker indicates that the DOWNpassage to room 8 is only open if the player is carrying thekeys. If not, the DOWN verb takes the player to room 7.DOWN 8/KEYSDOWN 7• The motion table for room 7 is the


View Full Document

Stanford CS 106A - Handout #59

Download Handout #59
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Handout #59 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Handout #59 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?