command parsing

claw at null.net claw at null.net
Mon Mar 17 09:30:32 CET 1997


On 12/03/97 at 10:23 PM, cg at ami-cg.GraySage.Edmonton.AB.CA (Chris Gray)
said:

>:I guess it's the difference between making a wall and letting users get
>:over it in whatever way they can manage (whether it be flying, climbing,
>:becoming non-corporeal and walking through, or even smashing it down)
>and :doing a script like:
>:
>:if token++.Is("climb") and token.Is("wall")
>:  room_message("$n scale$s the wall.", ch);
>:  move_char(ch, UP)

>You're going to have to have a very general scenario in order for all of
>those methods of getting past the wall work! You're not going to get any
>of them for free, I suspect.

I suspect that the solution to the general case for this sort of
limitation (eg can he get over the wall) is to fract the problem into an
attempted motion in a direction (which is easy to code for the success
failure of), and a generalist reaction to motions.  In the case of the
wall,  if he can somehow get "up" (or "scale" or whatever you call the
verb), you do that.  If he then achieves the position of being atop the
wall, you then report or react that.

This comes back to coding in general physical laws into the world, and
then presuming that they will ensure correct behaviour.

--
J C Lawrence                              Internet: coder at null.net
----------(*)                              Internet: coder at ibm.net
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...





More information about the mud-dev-archive mailing list