T-106.1210 Basic Course in Programming, part 1

ReadMe: Project Adventure

Overview

The project Adventure is a simple text-based adventure game. The game, as given, involves the hero trying to find his way from a deep dark forest to home and his true love. There's very little else the player can do apart from moving from place to place. It's not really very interesting.

This project can be of use beyond the given, rather boring forest adventure though. You can use it as a basis for developing your own adventure game with different, more interesting commands, areas, items, people and so on.

The package src.adventure contains classes to describe the game world.

Two alternative user interfaces are given in package src.adventure.ui: a traditional, fully text-based user interface, and a slightly more sophisticated, user interface that opens up in its own GUI window.

Introduction to the Classes

Here is a quick run-through of the classes in package src.adventure:

See class documentation for more details.

Relationships between Concepts

The diagram below illustrates the main relationships between the concepts relevant to package src.adventure.

Here is a short elaboration of the diagram:

See class documentation for more details.

Dependencies and resources

A map of the game world has been provided for cheaters in forest_map.gif.

Running the program

Probably the best way to get to know the project is to first play the game, and then use the debugger to execute the program line by line. If you want, you can also experiment with the various classes of the program individually in Python interpreter.

Main methods are bundled together with both user interfaces, Adventure_text_UI, and Adventure_GUI. It's your pick.

Notes

Thanks

This project is inspired by classic games by Infocom and draws on work by M. Kölling and D. J. Barnes.