Let's play Zork + Colossal Cave Adventure

Episode ZS

This is the first of two Zork source code episodes. Our primary instrument for exploring the source code is the remarkable Visible Zorker. It lets you play the game, and at the same time see the function call stack and inspect the world state.

You can also see the source code in a browseable online repository. See the post Zork 1/2/3 are officially and legally released under the MIT license.

Neither of us was already acquainted with the code. In this video we’re learning as we go. This episode saw us generally exploring and following the thread of whatever struck our fancy. We looked at the general game engine (rooms, objects, variables, ADVENTURER, action functions), the parser (PRSA, PRSI, PRSO variables), timers (songbird, injury, thief, sword), and combat—with numerous digressions. We found answers to some questions we had:

  • “Hello sailor” has no effect. It gives different messages if you say it enough times. Besides “sailor”, you can also say “aviator” or “footpad”.
  • It is possible to defeat the thief without the knife, just less likely.
  • ULYSSES is another word that works to scare the cyclops. But the internal name of the verb is V-ODYSSEUS.

There’s a lot more to see, so we’ll be back.

0:03:40
ZIL, MDL, The Visible Zorker.
0:06:49
"Activity" tab.
0:07:46
"World" tab.
0:09:54
Action functions. WHITE-HOUSE-F.
0:13:12
Visible Zorker commentaries (green eyeballs). Rooms and items, scenery and global objects.
0:14:56
ADVENTURER, ME, WINNER, HERE.
0:16:19
"State" tab. BEACH-DIG, COFFIN-CURE, YUKS.
0:17:01
Parser variables PRSA, PRSI, PRSO (action, indirect object, and direct object respectively). PUT and PUT-ON actions. Compound commands (PUT SWORD AND LEAFLET IN MAILBOX).
0:20:09
"Timers" tab.
0:21:08
"Files" tab. Super-brief mode.
0:21:37
"?" tab. Release history.
0:22:56
Timers and daemons. Integer underflow. C-TABLE, C-DEMONS.
0:25:55
DIAGNOSE and I-CURE. STRENGTH and carrying capacity. STRENGTH-MAX, STRENGTH-MIN. Local and global variables.
0:31:06
I-FOREST-ROOM, random chirping of songbird.
0:34:04
I-LANTERN, LAMP-TABLE.
0:35:50
BLACK-BOOK. INTNUM. JIGS-UP. LIVING-ROOM-FCN, RUG-FCN. IT.
0:42:35
Object attributes (TURNBIT, READBIT, etc.).
0:44:23
Troll room. FIGHT-STRENGTH, HERO-MELEE. Cyclops combat? CYCLOPS-MELEE. THIEF-MELEE. Combat results and the structure of melee result tables.
0:53:47
VILLAINS table. Weapon weaknesses. The troll is weak to the sword, the thief to the knife.
0:56:02
Began walking through a round of troll combat. THIS-IS-IT. TVALUE, I-SWORD, INFESTED?. I-FIGHT. DEAD. VILLAIN-STRENGTH, THIEF-ENGROSSED (see also). PROB. Points contributing to combat effectiveness.
1:28:47
TROLL-FCN. TROLL-FLAG.
1:33:53
CYCLOPS-FLAG, LLD-FLAG, MAGIC-FLAG, WON-FLAG. COFFIN-CURE, SOUTH-TEMPLE.
1:37:35
Back to analyzing troll combat. Possibility of killing the troll by getting him to eat something sharp. MUNG.
1:45:42

V-ODYSSEUS. ULYSSES is recognized as a synonym of ODYSSEUS, but ODYSSEUS is canon, for several reasons. One of the reasons is that Commandment #12592 in the black book is an acrostic. The first letters of each line spell out ODYSSEUS:

Oh ye who go about saying unto each: "Hello sailor":
Dost thou know the magnitude of thy sin before the gods?
Yea, verily, thou shalt be ground between two stones.
Shall the angry gods cast thy body into the whirlpool?
Surely, thy eye shall be put out with a sharp stick!
Even unto the ends of the earth shalt thou wander and
Unto the land of the dead shalt thou be sent at last.
Surely thou shalt repent of thy cunning.

1:57:06
Code that is unused in Zork I. V-HELLO. "Hello sailor" does… nothing! In Zork I, at least.

Topics mentioned: