[MUD-Dev] Introduction Systems

Alistair Milne vw_krug at ntlworld.com
Mon Mar 12 23:06:21 CET 2001


> -----Original Message-----
> From: mud-dev-admin at kanga.nu [mailto:mud-dev-admin at kanga.nu]On Behalf Of
> Ben Chambers

> I mean, each file for each player storing each players name
> assosciated with their id number could become VERY large, VERY
> fast. Assuming you have 3 digit ID numbers, and have 999 people
> playing, with each name having an average length of 9 letters, you
> then have to store 11,976,012 bytes of information.  I think that 12
> megs of character files (without items and everything) is a little
> much, and would be better spent on areas and new items.  Any
> thoughts?

If you're using ASCII for the ID numbers and names, which you are
implying here, don't forget that you need separators between the
items, be it carriage returns, ", ", or whatever, it adds to your
calculated overhead.  A much more efficient way of course would be to
extract the 'introductions' out of the player records and place them
into their own binary database.

If you've got players each represented by a unique 4-byte binary ID
number (allowing up to 4 billion players), and a database table of
Introductions, each containing two linked player IDs and therefore 8
bytes, with your 999 people playing and assuming (as you implicitly
did) maximum interconnections, you've got 999x998/2=498501 records
(not 999^2 because you don't need to store fred-joe and joe-fred as
two records), or a shade under 4Mb for the whole lot.  This is, of
course, the extreme case since it's highly unlikely that all players
will be introduced to all other players.

Anyway, hard drive space is cheap these days ;>

Genghis


_______________________________________________
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