1. help write game
- Posted by alan123 Feb 16, 2009
- 894 views
Can someone help me? What i want to do is input a sentence and then let the computer check each word against a data base and then try to understand what is written by the passion of the words in the data base say 173 so the computer would know that 173 is [feed the cat]. So don’t let my cat go hungry .any help would be good
2. Re: help write game
- Posted by ChrisB (moderator) Feb 16, 2009
- 956 views
Hi
What you want is a text parser (see the Zork series for examples, all freeware now).
a quick google search produced these
and this in particular
http://www.malinche.net/howtextadventuregameswork.html
You will want to make extensive use of find and match, have a table of keywords, and make frequent use of "I'm sorry, I don't understand what you are asking of me."
A table of keywords is just a database, so you could substitute any of the database programs to maintain the file(s).
Chris