interpreting text commands
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?
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)...
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)...
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
February 12, 2002 10:47 PM
In general, this class of problem is solved by a finite Automata. Look up ''automata'', and that will get you there.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement