Re: Player object files

From: Andrey Fidrya (andrey@ALEX-UA.COM)
Date: 07/30/97


30 July 1997 Heartless <pab1@KEENE.EDU> wrote:

>         Has anyone set it up so eq limits check the player obj files in
> addition to just what's in the game at the moment of the eq load?

I was thinking about that and decided that scaning all player object files
when loading an item is too slow. Especially if you have 1+ mb playerbase.

I found better solution:
Create an array "byte objects[total_objs_in_game]". On each succesful
obj_load increment corresponding entry in array. When obj decayed or
destroyed, decrement it. And add checks for current item amount in places
where items should load.
And of course save this array to disk when need to.
If your MUD have 200 zones (items from 0 to 20000) the obj array will
take only 20kb of memory. And no slowdowns during gameplay.
Just load it once when MUD is started.

I'm going to implement item limitation the way I described above in my
MUD in a few days, currently I'm working on bugs in slot spell
system. :)

  Andrey (      Kiev, Ukraine, Europe
    aka Zmey[coder]//RMUD

P.S. Sorry for my poor english. :)

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

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