Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

interpreting text commands

4: Adsense

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   

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?

#2 krez   Members   

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   

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.