[Reality] Re: [Divunal-author]Propgating events (fwd)

Glyph Lefkowitz glyph@twistedmatrix.com
Sat, 2 Oct 1999 18:11:24 -0400 (EDT)


On Sat, 2 Oct 1999, Michael Dartt wrote:

> Off the top of my head:
> 
> Perhaps a "Propogate events to" list in rooms, possibly allowing for
> certain "wildcards" like the ones below and, ideally something like "all
> other rooms in the forest".

Agreed, but thinking of it like a wildcard, or glob pattern, involves
searching.  And that's slow ;-)

> This sounds like it could get into the "separate maps" issue, and that
> might be the most expedient way of dealing with it (and having "shards"
> down the road).  It might be sufficient to have a) a property on rooms
> to denote what area(s) they belong to (e.g. Maxwell's Castle, Tenth's
> Mansion) or b) a vector for each area of "pointers" to included rooms. 
> The former might fit better with the current setup, while the latter
> would probably be faster to use.

One of the ideas that I've been playing around with (but haven't actually
gotten around to implementing) is something very much like this.  Since I
don't respect UO's server platform :-) I would call it "Zones" not
"shards" (shards are weird, much more complex than this, also ...)

This is also useful if you want to send periodic events to locations.  I
don't know if we actually need to make any server modifications to do this
though... it may be possible to do in another way which just modifies an
authoring verb (more on this later, though...

> In any PropEvent parent class would be handy for handling universal
> propogation issues, being extended for individual things like weather,
> sounds, time of day, etc.

Yup.

> Something I thought about a bit a while ago, that seems pertinet here:
> should we change room's descriptions when the weather/time of day/etc
> changes?  Certainly more realistic, but probably too panful to
> implement.

Why too difficult?  We just describe all "outdoor" rooms in such a way
that a sentence at the end describing the weather or whatever would be
appropriate, then we make it a description element.  It seems simple to
me.  (Is this the geek in me overriding the writer?)

> Sorry I can't send code, but doing this requires much more time and
> knowledge of the server than I have.

"No code is the best code."  A little more detail on my previous idea:
what if there were just an uber-room ... let's call it the "ethereal plain
of atrii" wherein resided a bunch of rooms called things like "Tenth's
House" or "Maxwell's Castle"...

Inside "tenth's house", we have all the rooms comprising tenth's house --
gods can walk around on the meta-map to perform large editing functions.
Also, this might be a good way to deal with "lost objects": we won't have
to remember what all the rooms are called, even if they're completely
disjoint from the rest of the area, because we can "step outside" and have
a look at the item list.  (Authors would have to be sternly reminded not
to do anything goofy like pick up rooms and put them inside other rooms!)

> > > Another thing for the todo list... Propgated events (e.g., a unifed way to
> > > say "everyone in adjacent rooms hears" or "everyone in non-obstructed
> > > adjacent rooms" hears.) Progated events in general also includes weather
> > > and stuff, but this would be nice to think about soon, too.

What Mike was talking about was good, obviously, and I'd like to do it,
but these questions are really about 2 different kinds of things:

Large, area-spanning effects should be implemented as discussed above, I
think, or by some small modification of it.  A good one I can think of off
the top of my head is an earthquake -- you run the earthquake on the
uber-room and its effects filter down.

Broadcasting events to adjacent rooms, or through walls, however, is a
different issue.  In this case, the event starts in one room, and then
goes through to another.  More importantly, the *effect* of the event
should change from room-to-room.

This can be accomplished now (enumerate the portals; check to see if the
portals are "wide open" (not obstructed), "somewhat open" (obstructed,
but with an intervening object), or "closed" (obstructed and sealed)...
Of course, that leads to other questions.  How thick are the walls?  How
does sound travel through them?

Although there will probably be some common (or at least similiar) code
for doing things like this, I don't think that there is anything really
generic we can do to facilitate the wide range of differing effects that
propogating events would require.

So, in short, the principal difference is between events which affect a
*fixed* group of rooms with a *given* effect, and events which affect a
*calculated* group of rooms with a *group* of effects.

I will put both of these on my ever-growing TODO list =)