[MUD-Dev] Parser engines

Travis Casey efindel at earthlink.net
Tue Mar 30 23:43:22 New Zealand Daylight Time 2004

On Saturday 13 March 2004 01:18, Mike Rozak wrote:
> Jason Slaughter wrote:

>> If you are going for something that is easy to
>> localize/translate, I would eliminate the parser and instead go
>> to an icon based point & click interface...

> Actually, I'm interested in both point-and-click and parsers. Most
> actions can be handled with point-and-click (like in Myst or
> Monkey island) but some just don't translate well. I'd rather come
> up with a solution that allows both, and lets the player and
> author decide which works best where. (I suspect that some puzzles
> will require commands though. Part of the reason that Myst's
> puzzles are the way they are, and zork's puzzles are the way they
> are, is because one uses clicks and the other a parser.) Menus are
> another alternative, depending upon the situation.

There was an old PC game, "Castle of the Winds", that for the most
part was simply a Roguelike game with a more limited plot and a GUI.

However, it had a *good* GUI.  Let me see if I can describe
it... and keep in mind that it's been some ten years since I played
it, so forgive any errors.

The main screen was the GUI Roguelike part.  Not too much of
interest there, except for nice little status bars for hit points
and mana.

The part I liked, though, was the inventory control.  Click the
"inventory" button, and a screen came up with multiple parts:

  - on the left, an outline of the character's body, with the
  locations on it that equipment could be put -- the hands, ring
  fingers, neck (for amulets and such), head, torso, feet, back,

  - on the right, two panes -- one with a window for each container
  the character had, and the bottom one being "the floor", showing
  the icons of whatever things were in grasping reach for your
  character.  Double-clicking containers on the floor opened them,
  opening up a window showing what was in that container.  Each
  container had a display of how much space it had, vs. how much was
  being used.

  - at the bottom, a percentage bar showing what percentage of your
  carrying capacity you were carrying, plus the actual weights, a
  display of your current armor class, and a counter for how much
  money you were carrying.

To pick something up and put it in a bag, you simply dragged and
dropped it from "the floor" to the window for the bag you wanted to
put it in.  To wear a suit of armor, you dragged it onto your torso.
Nice and intuitive.  You could put pretty much anything "in your
hands"... but only up to two objects (one in each hand), and having,
say, a helmet in your hands did not improve your AC.  You could
shift-click and/or control-click to select multiple items, or do
rubber-band drags for selections, and then drag them around in
reasonable ways (i.e., between containers or between a container and
the floor, but not onto the body).

If you dragged something onto an occupied location, you'd
automatically drop whatever was in that location on the floor.

It gave a realistic system of containers and carrying things, while
making it simple for people to use and keep track of.

> Because I expect both modalities, I'm not as concerned about
> making the "perfect parser" as I might be. However, text (or
> speech recognition) is very necessary for NPC conversations
> (unless you want to limit NPC conversations to menus), so a good
> parser for conversations is important. In thinking about command
> parsers I was hoping that I'd find way to to produce a better
> conversation parser, but I don't think the two overlap much since
> commands have a (mostly) fixed syntax with an obvious grammar,
> while conversational syntax is all over the place and identifying
> keywords/phrases is usually more important that word order.

One thing that can be helpful, without involving *parsing* per se at
all, is making commands smarter.  How many times have you seen
something like this:

  There is a chest here.

  > look chest
  It's a battered old wooden chest.

  > look in chest
  You'd have to open it first!

  > open chest
  You open the chest.

  > look in chest
  Items in the chest:
    red sword, bag

  > wield red sword
  You don't have that.

  > get red sword
  There is no red sword here.

  > get red sword from chest.

  > wield red sword
  You are already wielding something.

  > i
  You are carrying:
    blue sword
    plate armor

  > unwield blue sword
  You unwield the blue sword.

  > wield red sword
  Syntax: wield <item> in [right hand | left hand]

  > wielded
    nothing (in right hand)
    dagger (in left hand)

  > wield red sword in right hand

  > drop blue sword in chest
  You do not have a "blue sword in chest".

  > put blue sword in chest
  You put the blue sword in the chest.

Okay... so maybe that's a little exaggerated.  But still, I've seen
muds that were nearly that bad.  I've seen others that allowed
things like:

  > get red sword from chest and wield it

But still... there's a lot there that the commands should simply
handle for you.  Ideally, it ought to look more like this: (Adding
notes in parentheses.)

  There is a chest here.

  > look chest
  Items in the chest:
    red sword, bag

  (looking *in* a container is probably more common than looking
  *at* it.  Reasonable defaults are nice)

  > wield red sword
  Syntax: wield <item> in [right hand | left hand]

  > i
  You are carrying:
    blue sword (wielded in right hand)
    dagger (wielded in left hand)
    plate armor (worn)

  > wield red sword in right hand
  You get the red sword from the chest.
  You unwield the blue sword.

  > drop blue sword in chest
  You put the blue sword in the chest.

Of course, in Castle of the Winds' interface, what you'd do would

  - press the inventory button

  - double-click the chest

  - drag the red sword onto the character's right hand

  - drag the blue sword from the floor to the chest

Nice and simple.  And note that effectively, there's only two verbs
-- double-click for "open", and click-and-drag, which substitutes
for a mud's "get", "put", "drop", "wield", "wear", and possibly
more, depending on the mud.  "look" is effectively assumed as part
of "open".  Information about what's "wielded" or "worn" (and in
what location) is automatically given.

>> (on a side note, have there ever been any point and click text
>> based interactive fiction?)

> Kind of. Some IF allow you to click on keyword in the description
> (such as "north") and automatically "go north", or (I think) even
> examine objects.

Some also include information bars, with buttons that can be clicked
on.  E.g., I've played text games on my palm which had a button bar
on the bottom with buttons for the directions, and a button for
inventory.  (Why?  Because it's a lot easier on the Palm to tap the
"E" button three times than to write 'e' then do the "enter" stroke
three times, or even than to tap "east" three times in the
text... since the location of "east" may well be different in each
list of exits.


  obvious exits:  north, northeast, east, south, west

  obvious exits:  north, east, west

  obvious exits:  east, south, west

       |\      _,,,---,,_     Travis S. Casey  <efindel at earthlink.net>
 ZZzz  /,`.-'`'    -.  ;-;;,_   No one agrees with me.  Not even me.
      |,4-  ) )-,_..;\ (  `'-'
     '---''(_/--'  `-'\_)
MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list