Hunt the Wumpus! a text adventure in Unity

When I first went through the Text-101 course several years ago, I wanted to do more with it, such as making a console, making a Text Adventure Game framework, etc. After letting the ideas simmer for a few years, I came back to it and began a framework, but only began. In the process, I made a simple concept. Hunt the Wumpus is small as adventure games go, not as colossal as Colossal Caves, or as sophisticated as Zork, but the original version was short enough for its code (in BASIC) to be published in a magazine. In fact, here is an archive of that very article: Hunt The Wumpus – an old article worth reading (1976–the author invented the game in '74).

This is simple enough to be a “standard” example. In the oft-used Russell/Norvig textbook on AI (AI: A Modern Approach http://aima.cs.berkeley.edu/ ), a different version is used as an example, this time of AI playing the game. It is simple enough that making an AI that plays it maximizing the expectation (of getting the gold versus dying in the process) is feasible. Because each cave has random elements, it is impossible to guarantee a win every time, so you have to look at probabilities.

This version has a console and you type Zork-like commands. The parser is more sophisticated than the pre-Zork adventure games, but is far from completely free-form English. See the itch.io page linked above for a fuller description including some of the commands you can type (and some strategy info). If you look at the GITHUB source code, you can see that the simple command “kill the wumpus” is the most complex there is in the game: there are a multitude of ways you can type it, including but not limited to “use the trusty wooden bow to shoot an arrow at the smelly man-eating monster” (yes, I just tried that to make sure it worked).

I drew the wumpus myself in GIMP. I am partway through the 2D art course, and in elementary school, my art teacher did what teachers are told not to do: told me how lacking in talent I was, over and over!!! I was going for a Predator mandible mouth and sucker feet.

The source code is found here: https://github.com/DeplorableMountaineer/Hunt-The-Wumpus

Enjoy!

1 Like

Nice job! :grin:

Privacy & Terms