Re: QUESTION: More versatile exits?

From: Steve (quickey@cyberverse.com)
Date: 07/04/96


On Thu, 4 Jul 1996, Nick wrote:

> 
> Right now, IMHO, exits are not done very well in stock Circle.  We are bound
> to the use of 'n,s,e,w' (and ne,nw,se,sw if you add that in) for the most
> part.  On some other muds, exits are so versatile that an exit can be called
> anything you want (and you don't have to modify the source, it just allows
> exits to be anything).  Has anyone implemented this on Circle?  If so, send
> the code snippets to the list - I'm sure some of us would appreciate it.  I
> did something like it myself, but it was for a different thing which isn't at 
> all compatible. :)
I made variable exits with my mud, and the way I implemented it would 
require more source patches than I'm willing to post. The world files 
have to be completely changed, etc. Rather than an array of exits, you 
have a linked list, so each time you mess with exits you have to switch 
it to the new way. Also you have to rewrite how exits open/close because 
you cant just assume that the exit through the door opens east on the 
other end. Before if you opened a door north, it would auto open the door 
in the room south it linked. You have to add "linknames" and a link 
pointer so you know what to link to. And without an OLC this makes world 
building horrendous.

Possible idea/timeline on how to change exits.
1. edit structs.h 
   change: struct room_direction_data add a name field, and a pointer to 
           the next room_direction_data (i.e. linked list)
           add a char *linkname, so that you know what exit in the other
           room to link to, and a struct room_direction_data *link which
           is the pointer to the room to change.
           in struct room_data change exits from an array to a pointer
2. grep for exits in all the .c files, and change every instance to use
   linked lists rather than an array
3. spend days (if not months) debugging :)
4. e-mail me if you need help (note: help, not me to do it for you)

Steve
quickey@cyberverse.com



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