Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Verb Noun Or Complex Parser

A topic by Adventuron created Mar 19, 2022 Views: 214 Replies: 5
Viewing posts 1 to 5
Host

Thread for discussion of verb/noun (e.g. TAKE LAMP) or complex parser (ASK RANGER ABOUT THE BEAST) preferences.

Submitted

Definitely multi-word parser, but I'll try my best to allow implicit actions. For example, if you enter UNLOCK DOOR without specifying which key and you have the right key in your possession, it will respond '(with the brass key)', then proceed to unlock the door as if you had said UNLOCK THE DOOR WITH THE BRASS KEY. I think this is the best of both worlds and makes it easier for newcomers.

Submitted (1 edit)

I will also apply a complex parser but the plan is, that the game can be completed with just verb/noun commands. So e.g. TALK GRANDMA (or just TALK) will work in addition to TALK TO GRANDMA and so on.

Also taking a hybrid approach. Want to offer multi-word phrases for more options and color, but I want all of the commands necessary for game progression to be allowed as a verb noun pair for simplicity.

What if someone enters 'pick up the lamp with your legs' instead of 'pick up the lamp', or even substitue 'the' with 'blah', should it throw an error in terms of complexity?

Submitted

That depends on the engine you're using and the grammar that you've defined for the pattern matching. The first example boils to a verb phrase, direct noun phrase, preposition and indirect noun phrase. Most engines can handle that. 'blah' would cause most parsers to spit the dummy and print an error message. I think Adventuron omits any words it doesn't recognise and continues as though the word wasn't there.