[MUD-Dev] Re: Issues from the digests and Wout's list
Shawn Halpenny
malachai at iname.com
Fri Apr 25 09:34:58 CEST 1997
clawrenc at cup.hp.com wrote:
> >:The only solution there is to bind "drink" et all to the player
> >:objects (or something that all players always carry). Drink then
> >:resolves on the player, and the verb then goies out looking for an
> >:object to satisfy.
> >:
> >:It can make for an expensive parser.
>
> >I have to admit, my parser can get pretty expensive, though
> >hardcoding helps a lot.
>
> The real expense that I see is having the verb attempt to resolve its
> own subjects and objects rather than having the up-front parsing do it
> for you.
Yesterday I sat down and started hammering out my formal parser, and
came to that realization as well. My parser makes sure that each
grammatical construct
in the command can be resolved, and then passes a command object
(consisting of
each resolved object, indirect object, verb, etc.) to whichever
verb-handler
should handle the command. This way every verb-handler is assured of
having
valid data--it need only check to see if the objects are in the correct
places for it to complete its action. I leave that up to the verbs,
since
I intend to allow certain leeway if you're an admin character (i.e.
admin's can type things like "get Bubba's bag" and have it do just that
no
matter where you are in the world, while a player will only be able to
"get
Bubba's bag" if he's in the same room as the bag, it is a top-level
content
item, etc.).
> >:>>>6) Global mob AI.
> >:>>
> >:>> Ouch. Like it. Don't have an elegant solution yet.
> >:
> >:><gurgle><spastic-twitching>
> >:
> >:I thought we warned you against playing with ducttape? You really
> >:shouldn't get so wrapped up in your work.
>
> >*grin* He wasn't... he accidentaly cut the _red_ wire.
>
> I thought we told him the green wire controlled the power shunt to the
> ECT machine?
Eeny, meeny, miny...
--
Shawn Halpenny
"I got food poisoning today. I don't know when I'll use it."
- Steven Wright
More information about the mud-dev-archive
mailing list