[MUD-Dev] Re: TECH: Distributed Muds

J C Lawrence claw at 2wire.com
Thu Apr 26 22:27:22 New Zealand Standard Time 2001

On Thu, 26 Apr 2001 22:24:38 -0400 
Derek Snider <derek at idirect.com> wrote:
> From J C Lawrence on April 26, 2001 9:52 PM:

> If you design your system so that it expects that only 25% of the
> zones are going to need to be in memory at once, and that it will
> page out vacant zones, and page in zones about to become active,
> what is going to happen when your million players get adventurous
> and spread out all over the place causing 75-90% of the zones to
> be required?  

Why design your model so that the incremental unit in the working
set definition is so large as a zone?  What if the bas (world)
incremental unit was smaller, perhaps even at the individual object

> Will the system break?  Do you want the players to be able to
> break things by simply moving around too much?

If the distribution of players across the space of world-objects
approaches uniform (the pessimal working set case), you're in
trouble (not accounting for dynamic and transient object cases).
The most interesting question is what sort of trouble you are in and
how that trouble can be managed.  If your basic data set unit is
defined as a zone of some bazillion objects and related working
sets, then you're in deep trouble as your basic paging activity is
going to be in units of that million page space which is going to
kill your IO system.  If your data set space is defined in units of
individual objects, then your management overhead and complexity is
larger (?), but you can (potentially) distribute and fine-grain your
page swaps be predictive look-ahead and pre-swap to take some of the
sting out.  Of course you can do something of the same thing with
the zone model, it just gets a lot more invasive of your data flow
scheduling and working set intersection model.

Neither situation is easy or pretty.  I like the fine grained model
better as it lends itself more easily to simple approximation
approaches, as well as providing the primitives for a cleaner
distribution model (at the cost of predictive working set
computation (what do you wake up about the players?))..

> If you want to have hundreds of gigabytes of world data where only
> 10% of it is expected to be explored per year, or some such
> thing... then maybe you should have dynamic data that gets
> generated on demand.  Otherwise it seems to me that a lot of
> creative effort is being wasted, or you've auto-generated huge
> continents that do little more than waste space.

At this point I'm assuming that everyone is going to be using fixed
seed generated worlds ("drop magic number into algorithm, see fully
populated alien world type 5 pop out!").  The data set size
implications of that are inherently containable.  Where the pain
comes in is in representing history and persistent changes.

  Yes, there was a mountain there, but then Bubba missed with his
  SuperBlastoVorpal torpedo in the last space battle and now there's
  just a 60km diameter lava lake there.

  Yeah, this used to be a river until it was dammed by Tiamat's
  corpse after Boffo killed him.

  Well, the road moved after the fire when Bernie built a new shack
  for the Shop of Slightly Annoying Smells after the last one got a
  bad fungus attack and tried to eat the customers.

  This used to be a flat plain, but the player's kept knocking out
  the pillars in the catacombs below with their fireballs during orc
  fights until finally the whole thing collapsed down.

  There was a town until Tiamat burnt it down.  They rebuilt over
  by the river until the river flooded around Tiamat's corpse and
  submerged the town in the new lake.  They've relocated the city in
  what used to be the impenetrable forest (which they felled in its
  entirety), until Tiamat's corpse got eaten, and the lake drained
  leaving them with no ource of food or water, So they had the
  relocate the town again down by the new bed of the river, which
  basically means that the river has building fragments sticking up
  out of it, there are several new lake fragments scattered about,
  and in general the place is now covered generously in ruins.

The normal approach to the problems of history and persistence are
that players can't make any really noticable changes to the world,
or if they can, they are extremely well controlled and predicted
changes to the world.  Further, at the finer grainings, which is
where the real pain happens, changes are limited to a pre-determined
catalog and involve the transition of objects along a path of well
known and defined state changes, with no objects leaving an
permanent trace after their effective/useful life:

  You clear some forest.

  You build a castle.

  You don't maintain the castle.

  The castle starts to look a bit shabby.

  A wall falls down.

  More things fall down.

  The castle becomes a ruin.

  A forest starts growing.

  No trace of the castle, or the clearing is left.

ie a zero sum steady state with only minor tolerated pertubations.

I happen to think that's also a generally uninteresting problem

  This is one of the reasons I'm so keen on the whole ur-object
  concept as a method of trash collection at the data space level as
  it has the promise of allowing a half-way house between full fined
  grained persistance/decay transitions and raving SysAdm terror.

So you implelement real history and persistance, and the above
examples of Tiamat's corpse and the city relocations and the fungus
shack etc all happen, so that yes, while you do start out with a
nice fixed seed generated value accounting for perhaps 80% of your
world definition, by the end of the first year the world doesn't
look anything like what it used to and your dataset is not only 30%
generated and in fact you are spending 60% of the time you thought
you gained back through algorithmic generation in hadlihandling the
overlays and delta's that occured over time...

I have a pet world that I've been playign with for a while at a
conceptual level.  At its core its the intersection of several of
the worlds I've used in various SF short stories and MUD-Dev
scenarios I written, and various SF pieves I've liked.  One of its
nicer characteristics is that it happens to exacerbate this
particular problem space while remaining fairly staid in its
internal behaviour (ie simple mechanics):

  Basic world:

    Alien, un-earth-like, you are not human (entirely).

  The world itself is a very low density oblate sphere rotating at
  high speed (~4 hour "day"), which is sitting in one of the
  lagrange (?) points in the middle of a trinary star system
  (standard hot dwarf, cold dwarf, partially collapsed red giant).

  The planet has few significant features and is almost dry and
  almost uniformly flat.

  Exception: There is a single chasm which runs roughly from pole
  to pole along a distance of many thousands of km, along a very
  tortured and jagged route, which is averages between 20 and 30
  miles deep.  There are a few other minor chasms about the world,
  but they are comparitively small and shallow.  The main chasm was
  caused by a cosmic impact the remains of which are still visible
  on the opposite side of the planet (ie big crater and scattered
  mountains of ejecta etc).

  The world is hot.  Very.  Usually (think about orbital
  transitions).  Its also prone to oscillating extremes.  The
  surface is not survivable except by expensively equipped
  expeditions or short very well timed dashed in lulls between the
  normal cataclysmic storms/events (ie life occurs in the chasm(s)).

  The two dwarves are constantly sucking stellar material from the
  red giant, and a large portion of that material is being trapped
  in the gravitational well of the planet, and is being deposited on
  the world.
  Due to the periodicity of the stellar orbits etc, the material
  tends to be depositied in clearly distinguishable layers of
  varying density (ie clear stratification). 

  A side effect of this is that variously weird/wonderous/valuable
  crystals tend to grow in odd places (the basis of the main
  economic/trade system).  Mostly crystals grow on the surface
  (slowly and transiently -- they tend to be destroyed by the
  elements more rapidly than they form).

  The root story behind the official economy is that said crystals
  have become the default hard currency (as versus digital/virtual)
  for the rest of the space faring universe.

  The native life of the world tends toward large, strong,
  omniverous, nomadic and hungry.  The main interesting life form
  are the basilisks.

  Adult basilisks make D&D Tiamat look wimpy.  Basilisks don't
  bother people in the same way that people don't generally bother

  People are not basilisk food in the same way that insects are
  generally not human food.

  Basilisk young are about the size of cows, have a run-away
  metabolism, and have the basic characteristics of an over
  intelligent rabid scorpion with an eating disorder.

  People are acceptable but not preferred young basilisk food.

  The rest of the native animal life is less subtle.

  People tend to herd and farm minotaurs (think Paul Bunyan bred
  with babe, just bigger) as a food and slave source.

  Basilisks like living in the same places that people do (which are
  protected from the various deadly elements).

  Basilisks like eating minotaurs.

  Basilisks arrive and smart people leave.  Basilisks tend to arrive
  at most places people like sooner rather than later.

  Did I mention that Basilisks are nomadic?

  Lotsa caves in the cavern walls dug/formed between/through
  stratification layers.

  There is rain.  Only in the chasm.  It tends towards the
  deluge/flash flood variety, especially in the smaller chasms which
  fork off the big one.
  Some rain is acid in the sense of concentrated sulphuric acid.

  Some rain is purely virtual (ie you can see it but its not there)
  -- except that the flood waters exert real forces.

  Some rain looks like water and is really formed of native insects.

  Insects tend to be hungry and indiscriminate.

  A side effect of living there through more than one layer of
  stellar deposition is that you then can't leave the planet.  Ever.

  Landings of new colonists are carefully timed to occur
  immediately before stellar fall.

  Its also a high magic world.  Sorta.  This is a particle based
  economy with magic flowing in heavily packetised streams along
  generally unpredictable paths (watch rain drops rolling down your
  windshield).  If you're in the right spot at the right time, you
  intercept a mana packet and are a God on almost incalculable

  Most of the time there's no mana, or you hoarde and scrounge mana
  in the same way teenagers collect questionable magazines
  (collected mana tends to attract other mana and so grow the
  collection, with repeated viewing/page turning increasing the
  collection rate).

  Luck is also a particle economy, tho a more diffuse and more
  heisenberg one.  However luck is a tangible, seekable, and
  borderline measurable quantity.  Luck also tends to flow in stream
  like patterns which are mostly influenced by the application of
  luck in the environment.

  Due to the EM characteristics of the system, electronics doesn't
  work.  Lasers and other optical equipment occassionally works, but
  is unreliable.  The intersection of collated or high intensity
  photons and mana has bizarre effects.

    Translation: Manual labour and devices rule.  The basic energy
    systems are chemical/muscle based (thus slavery).

  Life doesn't tend to be long.  Long life implies surviving many
  stellar falls, which tends to infer unusual mana
  characteristics/mechanics/behaviours as well as a tendency to be
  haunted by hungry basilisks who just seem to want to hang around.

  Adult basilisks are low grade mana producers.

  Young basilisks are low grade mana attractors.

One of the base atractions of this set is that historical context is
actually all-important to the mechanics and player ability to have
reasonable predict on what is happening and what will happen.  

The intent is to fract the player base into three distinct
populations, a shallow short lived Quake pool at the bottom, normal
semi-RP MUD player in the middle with a fairly rich internal
structure, and an almost straight strategy play at the top (it turns
out that Basilisks are actually evolved players, tho I'm not clear
on the mechanics of this yet).

So what do we have from a data set vantage?

  -- Fixed seed world generate works for the gross features.

  -- Occassional cataclysmic events allow sections of the world to
  be redefined back to an almost raw/unevolved state which can be
  internally represented by injecting a new fixed seed for that
  region and then layering it with a patina of trashed history.

  -- Naturally concentrated player populations

  -- Smart players travel in groups, thus preserving working set
  size via intersections.

  -- Easy (ab)use of native life/weather to cull small outlying
  wanderers/populations (data set starts fracting too much, just
  ur-breed a bunch of basilisk young near any wanderers until the
  population distribution is back within the model).

  -- World definition in highly/long popluated areas is entirely
  one-off custom.  Unfortunately this means that the pessimal crowd
  case (high IPC rates) is also the pessimal data density case.

  -- Semi-natural segmentation lines between the surface and the
  chasms, and between chasm systems.  However the main chasms are
  going to naturally tend to be the most attractive to players and
  the hardest to segment.

Oops, have to go home.

J C Lawrence                                       claw at kanga.nu
---------(*)                          http://www.kanga.nu/~claw/
--=| A man is as sane as he is dangerous to his environment |=--
MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list