JavaScript EditorFree JavaScript Editor     Ajax Editor 



Main Page
  Previous Section Next Section

Chapter 14. The Text Generation

"I'll be back!"

You know who

In this bonus chapter we will learn about the oldest games around, known as "text adventures" or text-based games. A long time ago (the 70s and early 80s), computers didn't have the graphics capabilities that they have today. Because of this, most games were descriptive in nature rather than graphic. The games would use text to convey the state of the game and, conversely, the player would enter in plain English sentences to command the character in the game. One of the most notable games created in the early 80's was a game called Zork by Infocom. It was incredibly successful because the language interpreter was very advanced and the game environment was very robust. Furthermore, the user could type in almost any sentence and the game would be able to figure out what the player was trying to say.

The material we will cover isn't hard, but it is different from what we have been covering. There will be a lot of new terms and many of them have meanings that aren't well defined. But, by the end of this chapter, you will be able to make your own text adventure! Here are the topics we'll cover:

  • What is a text game?

  • How do text games work?

  • Getting input from the outside world

  • Language analysis and parsing

  • Lexical analysis

  • Syntactical analysis

  • Semantic analysis

  • Putting all the pieces together

  • Representing the universe

  • Placing objects in the world

  • Making things happen

  • Moving around

  • The inventory system

  • Implementing sight, sound, and smell

  • Making it real-time

  • Error handling

  • Creeping around with Shadow Land

  • The language of Shadow Land

  • Building and playing Shadow Land

  • Shadow's game loop

  • Winning the game

      Previous Section Next Section
    



    JavaScript EditorAjax Editor     JavaScript Editor