Chapter 1: Introduction

The C++ Maze Red Thread Project is based on William Crowther's game Colossal Cave (figure 1.

Figure 1: William Crowther

In the collossal cave the user is given a description of a situation he/she's in, and the user may take several actions, given the actual situation. The classic adventure game, when started, shows this:


    WELCOME TO ADVENTURE!!  WOULD YOU LIKE INSTRUCTIONS?
    
    > 
        
If you answer 'yes', you receive the following information:

    SOMEWHERE NEARBY IS COLOSSAL CAVE, WHERE OTHERS HAVE FOUND FORTUNES IN
    TREASURE AND GOLD, THOUGH IT IS RUMORED THAT SOME WHO ENTER ARE NEVER
    SEEN AGAIN.  MAGIC IS SAID TO WORK IN THE CAVE.  I WILL BE YOUR EYES
    AND HANDS.  DIRECT ME WITH COMMANDS OF 1 OR 2 WORDS.  I SHOULD WARN
    YOU THAT I LOOK AT ONLY THE FIRST FIVE LETTERS OF EACH WORD, SO YOU'LL
    HAVE TO ENTER "NORTHEAST" AS "NE" TO DISTINGUISH IT FROM "NORTH".
    (SHOULD YOU GET STUCK, TYPE "HELP" FOR SOME GENERAL HINTS.  FOR INFOR-
    MATION ON HOW TO END YOUR ADVENTURE, ETC., TYPE "INFO".)
                                  - - -
    THIS PROGRAM WAS ORIGINALLY DEVELOPED BY WILLIE CROWTHER.  MOST OF THE
    FEATURES OF THE CURRENT PROGRAM WERE ADDED BY DON WOODS (DON @ SU-AI).
    CONTACT DON IF YOU HAVE ANY QUESTIONS, COMMENTS, ETC.
    
    YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK BUILDING.
    AROUND YOU IS A FOREST.  A SMALL STREAM FLOWS OUT OF THE BUILDING AND
    DOWN A GULLY.
        

The Red-Thread Project is likely to continue throughout the course, eventually resulting in a multi-user multi-developer Internet game, where the users may not only play, but also contribute to the game. Contributions are rewarded with points. When playing the game you also gain (or lose...) points.

In addition to the users, the game contains daemons: trolls trying to make life hard on you, a pirate trying to steal your valuables, and probably some more.

Your virtual self may die during the game. That means that you lose all your accumulated wealth (= objects you own, accumulated points) and must start all over again as a new user.

While playing the game you may want to stop playing the game at some point. In that case you have to leave all the objects you might be carrying at the location you're currently in, and you will leave the game, keeping your accumulated points. The next time you enter the game you'll be back in the location where you left the game, and hopefully you'll be able to retrieve your objects. After all, it's a multi-user game, and another user might have visited `your' location while you were away, grabbing the items you previously owned.

The Maze projects uses files describing locations (called states below, objects, users, and daemons. The program controlling the game interacts with the user(s). Because the Maze is designed as a multi-user game, there are several programs:

1.1: Entities

Inside the program entities communicate with each other. The following entities are defined: