Re: [CODE?] MOBProgs / ROOMProgs / OBJProgs

From: Erwin S. Andreasen (erwin@PIP.DKNET.DK)
Date: 10/05/97

On Sun, 5 Oct 1997, Eric Green wrote:

> > Has anyone out there implemented roomprogs/objprogs?

> I implemented room and object progs in Death's Gate.  I started from

Very nice. I personally took the hackish solution, like Smaug
( or such) - when an object is to run a
program, a special mob is moved to the room, renamed to be the object and
executes the commands necessary. You can quickly go from mobprogs to
obj/room progs that way. Of course, there are lots of cons.

> I would strongly recommend moving to C++ before starting to implement
> room and object progs.  I wish i had done that at the start, and i could
> have avoided passing around everything as void * and using a type variable
> (along with a bit of code duplication).

You could do it in C using magic numbers. See for a letter I wrote about
this to the MERC Mailing list. It had to do with act() argument checking,
but I have since expanded it to be used heavily in the mobprogs.

PS: The idea of a dot-notation to access fields of a character/object is
especially nice; I have also implemented something like this, and find it
one of the most interesting additions to mobprogs :)

Erwin Andreasen   Herlev, Denmark <>  UNIX System Programmer
<URL:>         <*>           (not speaking for) DDE

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST