[MUD-Dev] Room-based vs. coordinate-based

clawrenc at cup.hp.com clawrenc at cup.hp.com
Wed Jun 4 10:24:22 CEST 1997


In <33943B87.41C67EA6 at iname.com>, on 06/03/97 
   at 08:58 AM, Shawn Halpenny <malachai at iname.com> said:

>Alex Oren wrote:

>> (*) Area effects.
>> 
>> How will I handle "Boffo arrives from the north" type of messages?
>> 
>> Room-based (or, rather, "container-based") has an advantage here.  A
>> container may send messages to the objects it contains.  In a
>> coordinate-based system I will need to consult a "map" of object
>> locations to determine message recipients.  Or am I wrong?

>Well, I have a mapping of locations to objects as well as each
>objects existing in a container (i.e.  the room it's in).  To make
>Boffo arrive from the north, I (roughly):
>    - set Boffo's coordinates to the new location
>    - check the location->object mapping to see if there is a real
>      room at that location
>        - if so, add Boffo to that container and generate a message
>          for its contents
>        - if not (the room is deterministically generated, so there
>          is no room container), from the mapping grab all objects at
>          Boffo's new location and tell them of Boffo's arrival.  

In which case how do you handle remote effects?  This was discussed
back when for the Sceptre and the Elven Forest:

  When the King's sceptre is in the Elven Forest magic ceases to 
    work in Castle Krak.  ie all previously exstant magical results 
    in the castle fail.  If Bubba was magically invisible, he is no 
    longer, 

  When the sceptre is no longer in the Elven Forest, magic works 
    in Castle Krak.

  Any transition of the sceptre in or out of the Elven forest 
    transitions the state as appropriate.  eg if the sceptre enters 
    the forest and Bubba was magically invisible in the castle, 
    voila!  He's visible.  If Boffo was flying, he falls.  If Bernie 
    was magically strong, he's now weak.  If Buzz was magically 
    disguised, he's now back to normal.  If Thrud was weiling the 
    Sword of Doom, well we's waving a bit of base iron about now. 
    The magic sack as in the GGGG ceases to function, and teleports 
    cease to work as do all other new spells...  You get the idea.

Now, just to prevent you special casing the magic calls to go check we
had the relics of the Great God GooGoo and the Magic Sack.  Ohh, what
the crap, I might as well post the entire scenario (it was what was
used to develop and exercise my spoof and watcher models):

  The GreatGodGooGoo has a number of holy relics.
  Each relic has a non-magical base state, and a magical awakened
    state.
  If more than three of GGGG's relics are simultaneously awakened,
    the GGGG does nasty things.
  Relic #1 is a stone which awakens into the Gem of GGGG.
  The gem turns its bearer into a FireGod only for so long as he
    carries the gem.
  The FireGod is very hot.  Food cooks when in his presence, metals
    get painfully hot, and candles melt.
  Other players near the FireGod are slowly damaged by the heat.
  Relic #2 is the Horn of the GGGG, which awakens only while it is
    blown and then reverts to the base state.
  Relic #3 is a sword which awakens to the sword of GGGG.
  The sword has interesting properties when awakened:
    1) If the GGGG is awake (three relics etc), the the sword
       teleports to GGGG.
    2) If it can detect the MistWraithe it magically teleports to the
       MW and begins attacking him.
    3) If it is carried by a FireGod, then the sword is destroyed.
    #1 happens as soon as the GGGG is awake, and the sword can
    detect him and it can teleport.
    #2 happens as soon as it can detect the MW and can teleport.
    #1 has priority over #2, and #2 has priority over #3.
  There is a Magic Sack of Hiding.
  Anything in the MSH is hidden from the rest of the game.  No
    magical effects can either enter of leave the MSH.  Players, and
    the MW can enter the MSH.
  There is a Wizards Lair.
  Any magical effects, such as an awakening, occuring in the WL are
    hidden from the rest of the game.  No magical effects or spells
    can enter the WL, but they can all leave the WL.  ie in fails,
    out works.
  There is a Magic Cloak.
  Anyone wearing the MC appears to be the MW (more than the real
    MW (ie gets preferentially attacked)).
  Anyone carrying the MC appears to be the GGGG (non-preferentially).

--
J C Lawrence                           Internet: claw at null.net
(Contractor)                           Internet: coder at ibm.net
---------------(*)               Internet: clawrenc at cup.hp.com
...Honorary Member Clan McFUD -- Teamer's Avenging Monolith...





More information about the mud-dev-archive mailing list