JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section

What Is a Text Game?

A text game is a video game without the video! Well, at least without all the cool graphics. Text games are like interactive books that are written as you play. The user gets to use his own imagination to make up what he/she thinks the universe that is being played in looks like. You may have never seen a text game because you are a product of the "GUI age." The interface to a text game is a simple as this:

What do you want to do? Eat the apple.

Yum, that tasted good!

What do you want to do?

What you see here is a short dialog with the computer and player. In most text games, the computer prompts the player to tell it to do something. Then the computer will break the sentence down to its components and see if the action is legal and proceed with it if possible.

The thing to remember is that there are no images or sounds. The only image is in the player's mind. And the only thing that creates this image is the description given by the game. Therefore, the English language used to describe the game universe should be as "fluffy" and poetic as possible. As an example, say that you were designing a text game that had a bathroom in it. When the player asks to "see" what it looks like, one possible description might be

…you see a white bathroom with towels hanging on the racks…

This is fine, but it's boring. A better response would be

…you are stunned by the size of the bathing room that surrounds you. To your West, you see a large shower enclosed in rose tinted glass. The entrance is paved with small polished stones. To the East, you see a large wash area with marble basins and silver faucets. From above, you are bathed in sunlight from the three overhead skylights. Finally, at your feet is a pattern of black and white tiles placed with surgical precision….

As you can see, the second version is much better. It creates an image in your mind and this is the key to text adventures. Even though the interface to a text game is usually nothing more than text, the game that is being played is limited only by the imagination of the designers and that of the player. Usually a text game will contain hundreds of pages of descriptive text within the universe database. This text is used as the foundation for the universe when the player asks something about it.

The technology needed for text games is based on compiler techniques coupled with very elegant data structures and algorithms. Remember, computers don't understand English and making them understand what nouns, verbs, adjectives, prepositional phrases, direct objects, and so forth are is a great task to say the least (I wish I would have paid more attention when my teachers were diagramming sentences). Many people may think that creating a text-based adventure is easy, but they are very wrong. Personally, I think that people who write text adventures probably know more about Computer Science, data structures, and Mathematics than the people who write arcade games.

Text game gurus definitely know a lot about compilers and interpreters—which everyone knows is a very difficult subject. Even today text games are still going strong; however, they have been augmented with incredible graphics. The genre of RPG (Role Playing Games) is really the evolved state of text games. Many RPGs have text interfaces so the player can dialog and ask questions to the characters in the game.

Today we aren't going to take a course in compiler design (which you should do to be a complete person), but we will learn some of the basic concepts and techniques used to create a text-based adventure. You will also see a complete game at the end of the day called Shadow Land.

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor