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 (ftp://ftp.game.org/pub/merc/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 http://pip.dknet.dk/~erwin/letters/magic.txt 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 <erwin@pip.dknet.dk> UNIX System Programmer <URL:http://pip.dknet.dk/~erwin/> <*> (not speaking for) DDE ============================================================================= +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST