Jump to content
  • Advertisement
Sign in to follow this  
Schade

Text game strings

This topic is 3205 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello im working on a text based game. an right now you have choices to pick. But i wanna have it like in zork, N = north an stuff like use nasty knife on evil troll. how you gotta type out a command before it moves on. Thanks

Share this post


Link to post
Share on other sites
Advertisement
You could start off by googling for 'text parser' or 'natural language processing'

Basically, you need to look for recognised words within your text input string, decide which are verbs and which are nouns then take actions upon those.

e.g. If the user enters "take knife" then the action is take, and the object is knife.

It can quickly become much more difficult if you want more than just basic verb-noun inputs though. e.g. "Quickly take the rusty knife then use it to kill the large grue".

Here you will have multiple verbs and nouns, along with other natural language constructs such as adjectives, prepositions and such.

Share this post


Link to post
Share on other sites
Quote:
Original post by OldProgie2
It can quickly become much more difficult if you want more than just basic verb-noun inputs though. e.g. "Quickly take the rusty knife then use it to kill the large grue".


Which is why it's probably best to just use Inform instead.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!