Adventure Game Studio

Community => Adventure Related Talk & Chat => Topic started by: lo_res_man on Fri 16/06/2006 00:02:07

Title: AGS parser
Post by: lo_res_man on Fri 16/06/2006 00:02:07
I was just wondering if anyone has used the parser tool (on AGS) to good effect. As well, does anyone have any hints and tips on programming this rarely used function?
Just a thought.
Title: Re: AGS parser
Post by: Radiant on Fri 16/06/2006 08:20:03
The best place to ask is probably an IF newsgroup or forum; they have way more experience with text parsing than we do.

Title: Re: AGS parser
Post by: Helm on Fri 16/06/2006 09:39:03
Also, the parser system isn't very intuitive so if you can deal with no graphics, go with Inform 6 or 7
Title: Re: AGS parser
Post by: Bernie on Fri 16/06/2006 12:29:33
Just out of curiosity - what kind of game do you want to make? Sierra AGI/SCI0 style?
Title: Re: AGS parser
Post by: lo_res_man on Fri 16/06/2006 17:52:14
it was mostly aimless curiosity.(I have a lot of that ;D) but I thought it would be useful for a spell system, or for crime scene investigation, to hinder the meta-game "click everywhere" tendency, to add extra details. I was also wandering if anyone had any experience with this function in AGS, more specifically the AGS parser system. Is it good , is it bad? should I take the time to learn it, and can anyone help me.
Title: Re: AGS parser
Post by: BerserkerTails on Fri 16/06/2006 18:17:41
I believe one of the Road Kill games was paser based... You know you've been around a long time WHEN, haha...
Title: Re: AGS parser
Post by: Bernie on Fri 16/06/2006 18:19:03
Those two ideas can be realized with the AGS parser.

I like AGS' parser system. With some clever coding you can make one that's a lot better than Sierra's. Getting close to IF parsers like Inform or Adrift is another story, but that's not really what you want to do, right? :=
Title: Re: AGS parser
Post by: lo_res_man on Fri 16/06/2006 18:36:20
QuoteGetting close to IF parsers like Inform or Adrift is another story, but that's not really what you want to do, right? :=
no, it was to basically add more detail, and to discourage meta-game thinking.
Title: Re: AGS parser
Post by: Layabout on Fri 16/06/2006 18:39:29
The AGS parser caused Shawn Guzzo to go insane and create Earwig is Angry and Captain Mulchy eats bleach. We now keep him in the broom closet...
Title: Re: AGS parser
Post by: on Fri 16/06/2006 20:16:35
you know, at one point i wanted to make a game that was totally parser based, and had millions of things you could type in, and each one did a different cool thing, and the point was people who played it, would make a list of all the words they had typed in, and what had happened so other people could ty it too, just a game that you never seem to find all the secrets in, you know?
but all the work that went into just one parser command, made me give up, dang!
mabye i just don't have the stamina to create a complex game, shoot.
Title: Re: AGS parser
Post by: TheCheese33 on Sat 17/06/2006 04:13:25
Quote from: lo_res_man on Fri 16/06/2006 17:52:14
it was mostly aimless curiosity.(I have a lot of that ;D) but I thought it would be useful for a spell system, or for crime scene investigation, to hinder the meta-game "click everywhere" tendency, to add extra details. I was also wandering if anyone had any experience with this function in AGS, more specifically the AGS parser system. Is it good , is it bad? should I take the time to learn it, and can anyone help me.

From what you're saying, it does sound like it would be very effective. I'll have to keep that in mind... ;)
Title: Re: AGS parser
Post by: lo_res_man on Sat 17/06/2006 21:14:56
But master can you help me? I just want help with using this system, does anyone have any hints and tips? hello,anybody?
Title: Re: AGS parser
Post by: Bernie on Sat 17/06/2006 22:08:23
It's hard to help you if you're not getting more specific. What do you have problems with? The parser commands? Or maybe with creating a GUI for text input?
Title: Re: AGS parser
Post by: lo_res_man on Mon 19/06/2006 17:26:36
I would probably say the parser commands, understanding how to implement my ideas, and add "synonyms" any other hints and tips 9such as setting up a gui) would also be useful
Title: Re: AGS parser
Post by: Bernie on Mon 19/06/2006 22:51:43
Quick overview:

1. Create GUI
2. Put TextBox on GUI
3. Put 'Enter' button on GUI
4. Make GUI pop-up modal if you want to pause the game while it's on

If user clicks on 'Enter', use ParseText() with the text from your Textbox (put it in a string with .GetText() and ParseText that string). Now you can use Said() to check if the user entered a word from the dictionary:

if (Said("look at door")) {cEgo.Say("There is no door in this room.");}

Synonyms are easy - if you add a synonym to a present word in the word list (like adding synonym 'look' to word 'examine'), the player can enter both and get the same result:

If the player's entered 'look at door' or 'examine door' and you do if (Said("look at door")), the 'examine door' text will trigger the same action.

EXAMPLE GAME: http://www.origamihero.com/files/parserex.zip

Really basic, but shows how to implement a simple parser. Call it by pressing space. You can hit the button or press enter to accept after typing your commands. It also shows how to make standard replies.