Re: Changed rnums with olc (using room-tables)

From: Harvey Gilpin (rv@twylite.demon.co.uk)
Date: 04/13/96


On Sat, 13 Apr 1996 19:52:28 -0400 (EDT), you wrote:

>On Sat, 13 Apr 1996, Thomas Krautz wrote:
>
>> Just wondering how the OLCs that are currently in existance handle
>> creating new rooms.

OasisOLC mallocs a new world array of the new size and copys
everything over to it, then frees and replaces the old one.
The it goes on to update the real_num pointers that are littered
throughout the code.

>As for problems after resorting the prototype arrays, I can see how rooms 
>would cause trouble with all the exits, and of course all objects and 
>mobs in the game are pointers to prptotypes, so those would have to be 
>updated.  Unless you're using threads, that's likely to cause some 
>serious lag any time you create a new prototype.

Agreed.  On big worlds, each new room added will cause some serious
lag.

>Hades' solution of 
>convetting prototypes into linked lists would probably be a good way to 
>solve problems with adding new protos.

I implemented this on my mud today, and amazingly it booted on only
it's second attempt.  Almost everything is working fine.  New room
creation  becomes ridiculously easy, and the whole world is so much
more flexible.  I highly recommend anyone considering this approach to
go for it.


Rv.



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