HOME

TheInfoList



OR:

{{Refimprove, date=August 2007 In
adventure game An adventure game is a video game genre in which the player assumes the role of a protagonist in an interactive story driven by exploration and/or puzzle-solving. The genre's focus on story allows it to draw heavily from other narrative-based m ...
s, a text parser takes typed input (a command) from the player and simplifies it to something the game can understand. Usually, words with the same meaning are turned into the same word (e.g. "take" and "get") and certain filler words are dropped (e.g. articles, or the "at" in "look at rock"). The parser makes it easier for the game's author to react on input. The author does not have to write special code to process the commands "get the gem", "take the gem", "get gem", "take gem", "take the precious gem", etc. separately, as the parser will have stripped the input down to something like "take gem". For the player, the game is more flexible, as the game has a larger vocabulary, and there are fewer guess-the-verb and guess-the-noun problems. Parsers are used in early
interactive fiction '' Interactive fiction, often abbreviated IF, is software simulating environments in which players use text commands to control characters and influence the environment. Works in this form can be understood as literary narratives, either in the ...
games like the ''
Zork ''Zork'' is a text-based adventure game first released in 1977 by developers Tim Anderson, Marc Blank, Bruce Daniels, and Dave Lebling for the PDP-10 mainframe computer. The original developers and others, as the company Infocom, expanded ...
'' series, and more recently in games created by systems like
Inform Inform is a programming language and design system for interactive fiction originally created in 1993 by Graham Nelson. Inform can generate programs designed for the Z-code or Glulx virtual machines. Versions 1 through 5 were released bet ...
and TADS.


See also

* Natural language parsing


External links


Inform Designers Manual
(in particular, see chapter 4, "Describing and Parsing", and chapter 5, "Natural Language")
How To Program A Simple Text Parser
Basic Tutorials .

Demos. Parsing Text parser