JavaScript Editor Javascript validator     Website design 



Team LiB
Previous Section Next Section

Introducing the Adventure Generator Program

Databases are a serious tool but they can be fun, too. The adventure generator program shown in Figures 7.1 through 7.4 shows how a database can be used to fuel an adventure game generator. The adventure generator is a system that allows users to create and play simple "multiple choice" adventures. This style of game consists of several nodes. Each node describes some sort of decision. In each case, the user will be able to choose from up to three choices. The user's choice leads to a new decision. If the user makes a sequence of correct choices, he or she will win the game.

This program is interesting as a game, but the really exciting part is how the user can modify this game. A user can use the same system to create and modify adventures. Figure 7.3 shows the data behind the enigma game. Note that you can edit any node of the game by clicking on the appropriate button from this screen.

If the user chooses to edit a segment, the page shown in Figure 7.4 appears.

Click To expand
Figure 7.1: The user can choose an option. Let's hop onto that sub...
Click To expand
Figure 7.2: Maybe the warehouse would have been a better choice after all.
Click To expand
Figure 7.3: This page provides information about each segment in the game, including links to directly edit each segment.
Click To expand
Figure 7.4: From this screen it is possible to change everything about a node. All the nodes that have been created so far are available as new locations.

As you can see, the structure of the data is the most important element of this game. You already know some ways to work with data, but this chapter introduces the notion of relational database management systems (RDBMS). An RDBMS is a system that helps programmers work with data. The adventure generator program uses a database to store and manipulate all the data.


Team LiB
Previous Section Next Section


JavaScript Editor Javascript validator     Website design


R7