Introducing the Adventure Kit

The Adventure Kit game program you will produce in this chapter is fun in a couple ways. For one, it allows you to play simple adventure games. However, the real appeal of the program is that it encourages the user to create original adventure games. One key to making a program interesting is to make it extensible. You can use the Adventure Kit to develop many types of adventure games.

Viewing the Main Screen

The Adventure Kit game uses several screens to control the action. The main screen is extremely simple. It allows the user to load, play, or edit (or create) a game or quit the program. This simplistic main program is featured in Figure 9.1. I deliberately made the main screen simple because the other parts of the program can be complex and I wanted to control the level of complexity. For example, a complete beginner to the program would probably want to play a game or two before calling up the editor.

Figure 9.1. The main screen provides very basic access to the other parts of the program.


Loading an Adventure

The Adventure Kit game is designed to allow multiple adventures. Each adventure is stored as a file on the drive system. The adventure files can be shared between users. To play an adventure, you must load it into memory first.

When the user clicks the Load button, a standard file dialog appears (see Figure 9.2). The File dialog box uses very standard Windows metaphors to handle selecting a file from the drive system. It looks like a complex form to build, but don’t panic. A trick is coming, in the section titled (strangely enough) “Using the File Dialog Controls.”

Figure 9.2. The file dialog looks very familiar to experienced users of Windows.


Playing an Adventure

Of course, the obvious thing to do with the Adventure Kit game is to play an adventure. If the user clicks the Play button, a second screen appears, with a game preloaded into it (see Figure 9.4). The user interface of the game program is designed to be as clean and obvious as possible so that the user can concentrate on the game rather than on the mechanics of moving around.

Figure 9.4. The screen changes to reflect the new situation. It’s not looking good, but there are plenty of places to jump.


I wrote a simple adventure named Enigma. In this adventure, you are a spy sent to capture the famous enigma code machine from a Nazi submarine. Figures 9.3

NOTE

IN THE REAL WORLD

The enigma device was a code machine and has a significant role in the history of computer science. An enigma device was recovered from a Nazi submarine, and a team of mathematicians led by Alan Turing built one of the earliest computers (named Colossus) specifically to crack the enigma code. In Turing's day, the notion that a computer (there were supposedly four computers in the world at that time, and all were top secret) could work on information besides numbers was considered extremely radical. It’s a fitting tribute to Turing that this sample program, related to his work, illustrates the fun and usefulness of non-mathematical data.

through 9.5 show a few scenes from this adventure. When the user is finished with the game, he can close the game form with a command from the menu. Alternatively, the player can edit the current game, also with a menu command. The menu system is nice because most users already know how to use menus.

Figure 9.3. Here’s the starting situation. Try clicking Sub Deck. (The Enigma device was carried on submarines.)


Figure 9.5. Oh, no!


Creating an Adventure

When you finish saving the world, you can also use the Adventure Kit to build your own adventure games or modify existing games. Use the menu system to close the game window and return to the main screen. From there, call up the Dungeon Editor by clicking the Edit button. The editor screen is featured in Figure 9.6. It is similar in general design to the game screen but has some important differences.

Figure 9.6. In the Dungeon Editor, you can change the values of the screen elements.


The editor is designed along the same general lines as the game program but is designed for building and editing adventures rather than playing them. Each game is designed as a series of rooms. A room has a name, a description, and links to as many as four other rooms. You can type the name of the room and its description directly into the appropriate text boxes and can choose the other rooms from the drop-down list boxes. You can move between rooms in the editor with the Next and Prev buttons.

I’ve found that the easiest way to write an adventure game with this system is to start by entering all the room names first. When I come back to edit the rooms, all the other room names are available in the list boxes. Creating all the connections then becomes a simple process. Finally, I flesh out the story by adding the descriptive text.

That the editor and the game engine use a similar interface is handy because it speeds up the learning curve. You can safely assume that a user interested in creating or editing an adventure has already played at least one, so having the elements in familiar places makes learning the editor easy for a user.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.209.201