Re: QUESTION: More versatile exits?

From: Charles Canning (charles@engr.mun.ca)
Date: 07/05/96


On Thu, 4 Jul 1996, Steve wrote:

> 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
> 

I was just wondering why you would store the exit name (char *linkname)for 
linking purposes. It would be easier, and a lot less costly to just store 
the vnum of the room that the exit links to. (This is how it appears to 
be regularly *not sure*). This is just my 2 cents worth. Also, it would 
make the coding a lot simpler too.

later...
...Chuck

Crom of Dragon'Spire



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