Re: Zone resets

From: Patrick Dughi (
Date: 06/22/00

> >        I haven't made up my mind about this.  I was tempted to go with
> >standalone instances.  It does make much of life easier, and I prefer to
> >think that I'm saving enough memory elsewhere to have the liberty to spend
> >it here.  This will be slightly modified by a suggestion from the same
> >people who introduced me to the idea of the binary tree world structure, a
> >new field  - number of items.  That way, if you have 20 waybreads, it's
> >merely one item with an additional field, combined in the same way the
> >mob/obj stacking snippets do.  It was pointed out that aside from 12-20
> >items for worn equipment, a small number of collected items from the
> >current zone, most of an  adventurer's inventory is food, drink, copies of
> >scrolls/potions/etc.  Most characters do not hold 100 unique items.
> Hmm... sounds like what SMAUG or some other codebase is doing. So, if one
> of the waybreads is poisoned and another is cursed, they are considered
> unique and listed separately from the rest?

        Yep. As a matter of fact, I've actually finally decided on a
hybrid.  Until a specific (item in this case) is needed, it will not be
held in memory.  Once it is needed, it's added to the b-tree, and all
items will be generated from that prototype.  This includes our 20
waybreads which exist as one item.  Anything aside from that - for
simplicity's sake - will be tagged as a unique item, and will have unique
non-prototyped strings (even if they're identical).

> >> If you want more bang for the buck, switch out room and mob long
> descriptions.
> >> That's where most of your memory will be recovered, and you don't generally
> >> search descriptions anyway.
> >>
> >        Another teriffic idea.  I'll have to see how this works - though,
> >aren't mob long descs still just pointes to the original string?
> It will still work. I used George's world swap snippet that dumps room desc
> into a binary file, and changed it to include not only mob and obj long
> desc, but also the extra desc as well. Together with the advice from Dak to
> mmap() the whole thing, it seems to go smoothly, and uses less memory.
> People don't really look at the room, mob and obj long desc most of the
> time, and extra desc even less. But Sammy is right about room desc taking
> up a lot of memory. However, if you have builders like me who likes to
> fantasize and elaborate as much as possible for mobs and obj, taking those
> out can still save you a significant amount....
        Damn builders.  If it wasn't for them and the players mucking up
my system, I'd have no problems.  I'll cover mobs though, in the same way
I will objects.

        I'll keep everyone posted as to the results, so far it looks
pretty good - over 50% memory savings from just rooms and zones alone.


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

This archive was generated by hypermail 2b30 : 04/10/01 PDT