[WF-General] libCirce

Daniel Tomalesky grim at xynesis.com
Wed Oct 4 05:10:23 PDT 2000


Tess Snider wrote:

> Hrm.  Circe points need to persist, but they aren't the kind of thing I
> want to put into the base player table, as they are a system-specific
> concept.  Perhaps we need to define a way to extend the player data.  (We
> have a way to extend character data, but that's a whole different ball of
> wax.  Someone with no characters at all could still have Circe points, if
> she earned them, and all of her characters are dead.)  Perhaps we can give
> the player table an extra column which provides an entity ID representing
> an entity which stores game-specific player extension parameters.  For a
> game like Pong, or an RTS, this could store your tournament ladder
> ranking, and play statistics.  For Belchfire, it could store Circe points.
> For any game, it could store any additional player (not character!)
> related data that the administrators wished to track.

In my past experience, I have seen this kind of database thing implemented two
ways:

1>  Have a variant table.  This table contains rows that define certain
attributes specific to the system in question.  This table can be joined
many-to-many with the player table so that each player would be able to have
value for any number of the rows in the variant.  This allows the system to be
extensible without having to muck with the central schema to fit a specific
system.   This can become a problem when you need to join multiple variants to
each other.  The queries can get ugly.

2> Add new tables that attach the the core schema.   This can be good in that
the system can generate queries that a bit more sane, but then you can have
problems when you attempt to port code between systems.  In certain cases,
you'll end up having these extra tables hanging around, and inevitably you are
using one or two columns in each, and you have a mess of a schema.

We eventually stuck with the variant style.  If you can keep the database
optimized, and implement some kind of in memory caching on the server, its
tolerable to good.  I hope this makes sense...I'm getting kinda bleary eyed.

I can throw together an example if anyone's interested.

Dan (Grimicus)






More information about the General mailing list