Jump to content

  • Log In with Google      Sign In   
  • Create Account


interpreting text commands


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 ohohvi   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 February 2002 - 12:23 PM

How do you interpret commands in a text based game(ex. get sword would run the get function) Also, are there any good refrences for programming games like these?

Sponsor:

#2 krez   GDNet+   -  Reputation: 443

Like
Likes
Like

Posted 12 February 2002 - 04:29 PM

you''ll have to tokenize and parse the commands... basically cutting up the string and having the computer figure out what you want it to do from there...
or, you can check out INFORM which (if you are a hrad-core programmer) is a cop-out, but it is still a neat engine for making text-based games (like zork and adventure! such)... also, you can check out the source code for it (it is written in c or c++, i don''t recall)...

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 12 February 2002 - 04:47 PM

In general, this class of problem is solved by a finite Automata. Look up ''automata'', and that will get you there.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS