Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

How the fuck do you make a text adventure?

Name: Anonymous 2011-10-10 16:01

More specifically how the fuck do you handle inputs for a text adventure where the player can input anything they want?

Name: Anonymous 2011-10-10 16:22

Read SICP then take a masters course in computational linguistics.

Name: Anonymous 2011-10-10 17:32

Try reading up on z-code and looking at e.g. Inform.

Name: Anonymous 2011-10-10 19:28

maybe a trie with valid strings as keys...perhaps one trie per room..,  and if not matched to room trie then fall back to global trie...

the content at a point in the trie is some kind of action id/class that says what to do... that way you can it multiple times to the trie with slightly different keys (input strings) to cover people spelling things differently or saying something that means the same as what you intended.

Name: Anonymous 2011-10-10 19:34

Seconding Inform.

Name: Anonymous 2011-10-10 23:53

>>1

I'm using a shell command with options type of deal. Every command with option combination has a help option, so it should be alright for those that have used shells.

Don't change these.
Name: Email:
Entire Thread Thread List