[MUD-Dev] Focus on Hocus Pocus

J C Lawrence claw at 2wire.com
Wed Jun 27 19:03:59 CEST 2001


On Tue, 26 Jun 2001 17:10:17 -0700 (PDT) 
Troy Fisher <ashon at wsunix.wsu.edu> wrote:

> One of the ways that I thought of doing it would be to generate
> the magic name of the item/location/person and store it on the
> player, but that would create a huge player file.  Any Ideas?

Use the player ID plus a per-player variable as a hash into a table
of namespaces.  Each namespace then contains a set of mappings of
truenames to objects.  If you want to get clever/nasty you can then
also put a salt value onto the character that is used in <insert
function> to morph/tailor the exposed truename to something a little
more custom.

  eg:

    namespace = nametable[hash (player->id, player->num)]
    truename = "foo"
    object = namespace[truename]

  or 

    namespace = nametable[hash (player->id, player->num)]
    truename = "foo"
    object = namespace[munge (truename, player->salt)]

This effectively creates anonymous groups of players that share
namespaces, which reduces your namespace storage problem as well as
a find-a-friend-with-identical-namespace challenge/game.  That fact
that you build the initial namespace tables computationally just
provides a route for them to guess/derive the mapping function.  The
salt value makes that more difficult and allows you to have families
of closely related namespaces without spending all your time tuning
hash functions.

Of course in catastrophic events you could go thru and reset all the
magic 'num' values on each player object to a new/random value,
thereby destroying any learned truename collection/ability they might
have.

--
J C Lawrence                                       claw at kanga.nu
---------(*)                          http://www.kanga.nu/~claw/
The pressure to survive and rhetoric may make strange bedfellows
_______________________________________________
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