It looks like you're new here. If you want to get involved, click one of these buttons!
Software: Hitchhiker's Guide to the Galaxy (Game)
Authors: Steve Meretzky and Douglas Adams
Language: ZIL: Zork Implementation Language
Source file: https://github.com/historicalsource/hitchhikersguide/blob/master/heart.zil
Code repository: https://github.com/historicalsource/hitchhikersguide
Zil Code Manual: https://archive.org/details/Learning_ZIL_Steven_Eric_Meretzky_1995
The Hitchhiker's Guide to the Galaxy was a text adventure game based on the book/radio/television series that was known in the universe for serving puzzles that made you want to smash your brain with a brick wrapped in a lemon. See this discussion for some common reactions. In this puzzle, and this is a spoiler, you need to have previously removed your common sense so that you can at once have "tea" and "no tea" in your inventory.
I wanted to start a thread to invite you all on a sidequest to explore the code of this game that I encountered at a very formative time of my life. Pretty much influenced everything I do as an e-lit artist. But I do recognize (especially having tried to teach it) that this game goes beyond the usual level of frustration-inducing puzzles that @jeremydouglass has written about. Some argue that the difficulty of the puzzles was tied to a profit motive -- selling more hint books, increasing gameplay time. A later game from Adams, Bureaucracy, would make frustrating puzzles its main theme. I'm not sure this is the best passage to start with, but I'd like to use this to open a code exploration of this game and perhaps also The Restaurant at the End of the Universe code, which I am just learning exists!
<ROUTINE SCREENING-DOOR-F () <COND (<EQUAL? ,SCREENING-DOOR ,WINNER> <COND (<AND <VERB? TELL-ABOUT> <PRSO? ,ME>> <SETG WINNER ,PROTAGONIST> <PERFORM ,V?ASK-ABOUT ,SCREENING-DOOR ,PRSI> <SETG WINNER ,SCREENING-DOOR> <RTRUE>) (<VERB? HELLO> <SETG WINNER ,PROTAGONIST> <PERFORM ,V?HELLO ,SCREENING-DOOR> <SETG WINNER ,SCREENING-DOOR> <RTRUE>) (<AND <VERB? WHAT> <PRSO? ,OBJECT-OF-GAME>> <SETG WINNER ,PROTAGONIST> <PERFORM ,V?ASK-ABOUT ,SCREENING-DOOR ,OBJECT-OF-GAME> <SETG WINNER ,SCREENING-DOOR> <RTRUE>) (T <TELL "\"Unless you're here to show me some clear sign of your intelligence, please leave me alone. I'm a very busy door.\"" CR> <FUCKING-CLEAR>)>) (<AND <FSET? ,SCREENING-DOOR ,OPENBIT> <VERB? SHOW GIVE KNOCK OPEN>> <TELL "You already induced the door to open." CR>) (<AND <FSET? ,SCREENING-DOOR ,OPENBIT> <VERB? CLOSE>> <TELL "The door snaps, \"Hey! I'm resting. I've had a very busy day.\"" CR>) (<VERB? KICK> <FSET ,SCREENING-DOOR ,MUNGEDBIT> <TELL "\"I suppose you think that since you have legs and I have not, you can get away with that sort of thing. Well,\" the door continues stiffly, \"maybe you can and maybe you can't.\"" CR>) (<VERB? SHOW GIVE> <COND (<AND <PRSO? ,TEA ,NO-TEA> ,TEA-SHOWN <HELD? ,TEA> ,HOLDING-NO-TEA <NOT <PRSO? ,TEA-SHOWN>>> <PERFORM ,V?KNOCK ,SCREENING-DOOR> <RTRUE>) (T <COND (<PRSO? ,TEA ,NO-TEA> <SETG TEA-SHOWN ,PRSO>)> <COND (<PROB 50> <TELL "The door says \"Big deal. Anyone can have"> <ARTICLE ,PRSO> <TELL ".\"" CR>) (T <TELL "The door yawns." CR>)>)>) (<VERB? OPEN KNOCK> <COND (<AND <HELD? ,TEA> ,HOLDING-NO-TEA> <FSET ,SCREENING-DOOR ,OPENBIT> <TELL "The door is almost speechless with admiration. \"Wow. Simultaneous tea and no tea. My apologies. You are clearly a heavy-duty philosopher.\" It opens respectfully." CR>) (T <TELL "The door explains, in a haughty tone, that the room is occupied by a super-intelligent robot and that lesser beings (by which it means you) are not to be admitted. \"Show me some tiny example of your intelligence,\" it says, \"and maybe, just maybe, I might reconsider.\"" CR>)>) (<AND <VERB? ASK-ABOUT> <PRSI? ,OBJECT-OF-GAME>> <TELL "\"To keep out sub-intelligent beings.\"" CR>) (<VERB? THROUGH> <COND (<EQUAL? ,HERE ,PANTRY> <DO-WALK ,P?EAST>) (T <DO-WALK ,P?WEST>)>) (<VERB? EXAMINE> <FCLEAR ,SCREENING-DOOR ,ACTORBIT> <V-LOOK-INSIDE> <FSET ,SCREENING-DOOR ,ACTORBIT>)>>
A few questions:
How does this code speak to the frustration-inducing nature of the game?
What does this code reveal about ZIL as a language?
Or does this code show that the game is just terribly misunderstood?
Is this a representative passage from the game?
How does this compare with puzzles of other Infocom games of the time?
What other passages of the HGTTG code should we explore?