[MUD-Dev] DevMUD Event Language

Hal Black hal at moos.ml.org
Thu Oct 22 20:14:21 CEST 1998


Okay, this is a totally off the wall and demented idea I'd like to throw out:

  To provide an event model (i.e. state changing through time on a schedule with
contention resolution), how about mutating VHDL to be mudlike and then using
that as the mud language?

Take the mute spell:

  if(target.can_talk) then -- make sure they're not already muted
   target.can_talk <= transport false after 5 seconds;	-- silence someone in 5
   target.can_talk <= transport true after 15 minutes;	-- spell wears off
							-- after 15 minutes
  end if;

Maybe change the keyword transport to something more appropriate to
mud-context.

There are also some attractive qualities of VHDL in the case of contention
stemming from two entities trying to assign something different values at
the same time.

Boffo and Buffo both trying to grab the magic hat of buffness.
	<game turn clock tick>
	Boffo% get hat
	Buffo% get hat
	<game turn clock tick>

would generate for this time sequence:

	hat.container <= Boffo;
	hat.container <= Buffo;

Then you could define a contention resolution function for drivers to 
hat.container to see who gets it:

  if (A.speed > B.speed) then  -- person 1 faster than person 2
	hat.container <= A;
	A.message <= "You grab the hat quickly as {B} stoops to grab it.";
	B.message <= "You stoop to grab the hat but {A} snatches it up.";
  elsif (A.speed < B.speed) then -- person 1 slower than person 2
	hat.container <= B;
	B.message <= "You grab the hat quickly as {A} stoops to grab it";
	A.message <= "You stoop to grab the hat but {B} snatches it up.";
  else -- both people are same speed
	(do something clever here, maybe check strength, distance, etc)
  end if;	





More information about the mud-dev-archive mailing list