Possible Extension Ideas
The following extensions would make the Adventure program much more powerful and would allow the construction of more interesting puzzles and scenarios:
Active items. The biggest weakness in the current game is that the items are entirely passive. All you can do with an item is to pick it up or drop it. Moreover, the only way in which the items enter into the play of the game is in the specification of locked passages in the room data file: if you are carrying an item, some passage is open that would otherwise be locked. It would be wonderful if it were possible to type
WAVE WANDorUNLOCK GRATEand have the appropriate thing happen. Moreover, being able toREADorEXAMINEan item adds a lot of interest to the game.Item state. In the original version of Adventure, items can have different states. For example, the grate at the entrance to the cave can be either locked or unlocked; similarly, the snake in the Hall of the Mountain King can be blocking your path or driven away. You might add some way to allow the program to keep track of the state of each item and then make it possible for the motion rules to indicate that a particular passage can only be taken if an item is in a certain state: you can go through the grate only if it is unlocked.
Containment. In Don Wood’s extension to Adventure, some items can contain other items. Putting this concept into the game adds dimensionality to puzzle construction, but also requires implementing prepositional phrases in the parser so that the program can parse such constructions as:
> PUT NUGGET IN CHESTFiller words. The current parser limits the player to using commands that consist of one or two words. Saying:
> TAKE THE KEYScauses an error because the program does not know the word
THE; if the parser ignored articles and other filler words, the program would seem more conversational.Adjectives. A similar extension to the parser is the introduction of adjectives that allow the player to issue commands like:
> TAKE BLACK RODIn the classic Adventure game, adjectives are associated uniquely with the noun to which they refer. In Zork, on the other hand, adjectives were used to differentiate many different items of the same name, so that there could be both a black rod and a green rod in the same game.
Convenient shortcuts for “all” and “it”. When you are in a room with many items, it is extremely useful to be able to type
> TAKE ALLto take all the items at that location. Similarly, the conversation flows more smoothly if you can refer to the last mentioned item as
IT.Random passages. There are several rooms in the original Adventure game at which the motion through a passage is probabilistic. You could implement this sort of feature by specifying a percentage chance on a locked passage rather than an item. Thus, if the data for a room specified the passage entries:
SOUTH : RoomA/30 SOUTH : RoomBmoving south would go to
RoomA30 percent of the time and toRoomBthe rest of the time. (The program can differentiate this specification syntax from the traditional locked passages because the percentage chance starts with a digit, vs a alphabetical character for a key.)