As a result of this thread, I thought I’d build a quick adventure game of my own. Though I’m going big and doing it semi-right.
I’ve got about 30 locations so far, a few magic puzzles, and I still need to add threats to it. There are no restrictions on how much you can carry yet, but once I implement a backpack I will put than in.
Rooms are basically implemented by several lists: descriptions, exits, contents, puzzles, and threats.
Vocabulary is based on a few dictionary objects, one mapping verbs to a small subset of words, another doing the same for nouns. A third gives synonyms.
Currently it can handle one and two word commands, but I’ll be expanding the parser to do multi-word stuff like hit ogre with herring
If I get a bit further, I’ll post the code here.
update:
I have 100 rooms defined, a number of puzzles and threats. There are treasures and useful items scattered about. I think I'm about a third of the way on defining rooms.