[MUD-Dev] data structure design in a new mud

pauli.saksa pauli.saksa at ztango.com
Wed Mar 14 13:57:54 CET 2001


> From: "J. Coleman" <stormknight at alltel.net>

> Exactly. I wanted to know if there was any way to do the central
> list without 50 billion pointers back, forth, up, down, and
> sideways.

I'd use some dynamic implementation of array as a central list
(vector?), and each item would contain the pointers required to store
them in rooms' lists.  If done like this, there would be the same
amount of pointers as if there was no central list..  depending of the
indexing, a hash table would do as well..

In this case the rooms' and creatures' lists would point to the items
in the central list, so in that sense there would be pointers pointing
back and forth.  If you're planning to have one set of items stored in
two data structures, this can't be avoided.

> I think it might be easier to just keep the smaller, inventory lists
> in this case.

This whole central list thingy reminds me of some old diku-style
static item handling.  There's fixed amount of fixed items and each
item has a serial number.  Should an item be destroyed, it will be
repopped again with some mob.  *shiver* I know central list is not the
same thing as fixed set of items, but these mental images are just so
hard to get rid of.

--
pauli.saksa at ztango.com
Enhanced Mud Implementing Team (EMIT)
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list