[MUD-Dev] Unique items vs. item references

Sean Kelly sean at hoth.ffwd.cx
Wed Aug 7 10:11:17 CEST 2002


On Mon, 5 Aug 2002, Brian Hook wrote:

> I've been dabbling with our little space adventure RPG in my spare
> time, and I'm now beginning to address the issue of inventory.
> I've got MySQL installed, but I'm torn as to whether it's overkill
> or not.  Part of me knows that having a database system that is
> indexed and allows for fast queries is important, but another part
> of me knows that it's a royal pain in the ass to have a machine
> with mysqld running, not to mention database table construction
> and editing.  Free text doesn't scale, but damn, it's handy.

You only have to figure out how to set it up once.  And as for
overkill -- the transactional support alone is a godsend if you're
at all concerned about item duping.  It may take some more work
initially, but IMO the payoff is well worth it.

> Anyway, one of the fundamental decisions we're going to face is
> whether to store item references to templates, along with some
> minor ancillary information (damage, charges, flags for "stolen",
> etc.), or whether to have fully unique items.  Obviously the
> latter requires a crap load more storage, but it's also more
> flexible in the long run.

I'm not sure I agree, though it depends largely on your game system
and how much you want to normalize things.  I would probably use
some combination of the above -- have base item templates in one
table (where each stock item in the game represented one
template... so special quest items would have a separate template
from their more common counterparts) and store additional
information in one or more other tables.  This gives you the ability
to easily identify who has which items and to modify item attributes
later on.  IMO once you're going for a system that allows arbitrary
queries, there's no point in hurting your ability to perform them
easily.

Sean


_______________________________________________
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