[MUD-Dev] Introduction Systems

Travis Casey efindel at earthlink.net
Wed Mar 14 11:56:34 CET 2001


Tuesday, March 13, 2001, 8:39:40 PM, Ben Chambers
<bjchambers at phoenixdsl.com> wrote:
> From: "Kwon Ekstrom" <justice at softhome.net>

>> Understandable that you're losing space with this system, but if
>> you're worried about space, why save in ASCII?  There are a variety
>> of ways to save data direct into binary and preserve the ability to
>> expand.  A large amount of the data saved in a MU* is integer or
>> floating point data, which for a 32 bit integer can take up 10
>> characters for 80 bits in ASCII or 320 bits in Unicode.
 
>> I personally don't use ID numbers for my players, since it'd be
>> rather confusing to be holding a meeting about a troublemaker named
>> Krule for example, if there are 8 players who use the name.  It'd
>> be fairly difficult, unless there was repeated discussion to follow
>> one about Player 985.

> Names would still be in require ASCII or Unicode.

Why?  There's no technical reason why names *have* to be in one of
these two... you could use a reduced ASCII set, for example, by taking
out the 33 control codes that ASCII has and using them for other
purposes (e.g., if "DEL" is in as the name, then this character simply
accepted the other character's default short name, or do primitive
compression by analyzing a set of online name for common digrams or
trigrams and using those 33 codes to represent the 33 most common of
those).

Something people often forget is that ASCII only uses 7 bits per
character, not 8.  There are libraries available that can "pack" and
"unpack" one-byte-per-character representations of ASCII, giving a
savings of one byte per seven characters.  If you don't want to do
that, you can use the 128 extra "high" characters for something else
-- e.g., using the idea above of having codes for common digrams and
trigrams, expand your "library" of them to 161.

Another possibility is to reverse things.  Instead of players
assigning names to the people they're introduced to, let players
introduce themselves to others using different names.  A single player
is unlikely to use more than a few different names.  If the average
player has three different names that he/she uses, then you'd only
need to store 999x3 names on a 999 player mud instead of 999x998.  You
can limit the number of aliases to a reasonable value (say, 64), and
give each player an array representing who they know and which of
their aliases they know.  You could pack this and the player number
into a few bytes (say, 3 bytes would let you have 6 bits for 64
aliases and 18 bits for 256K player IDs).

So far, all the calculations seem to have been assuming a worst-case
scenario -- namely, that every player has a name stored for every
other player.  This is unlikely to be true on a mud unless it's very
small.  I remember people on this list mentioning that they have
introduction systems on their muds -- anyone out there have statistics
on how many players you have and the average number of names they have
stored?

--
       |\      _,,,---,,_    Travis S. Casey  <efindel at earthlink.net>
 ZZzz  /,`.-'`'    -.  ;-;;,_   No one agrees with me.  Not even me.
      |,4-  ) )-,_..;\ (  `'-'
     '---''(_/--'  `-'\_)   


_______________________________________________
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