[Reality] Re: Current Task: OBJECT PROXIES.

Jean-Paul Calderone exarkun at divmod.com
Thu May 4 10:09:56 CDT 2006


On Thu, 4 May 2006 10:47:45 -0400, Christopher Armstrong <radix at twistedmatrix.com> wrote:
>On 5/4/06, Mike Pelletier <mike at mkp.ca> wrote:
>>On Thursday 04 May 2006 10:09, Christopher Armstrong wrote:
>> > We did it. Rooms can now be dark (a LocationLighting powerup on a
>> > room, with candelas set to 0), and they'll make everything inside of
>> > them invisible[1]. It does this by powering up the room for
>> > ILocationProxy, which will get a chance to proxy all of its contents
>> > found during a findProviders traversal (as opposed to an IProxy, which
>> > gets a chance to proxy all objects found *through* it, like the
>> > objects on the other side of a red glass window).
>> >
>> > Then we implemented a torch. The torch is a Thing with a LightSource
>> > powerup; the LightSource powers up its thing for ILightSource, and
>> > provides a candelas attribute. The LightingLocation proxy searches for
>> > (calls findProviders with) ILightSource, accumulates all the light
>> > sources, and adds it to the ambient light of the room, to decide
>> > whether it is bright enough to see anything.
>>
>>Does an ILocationProxy get to know who's asking?  Seems as though 
>>properties
>>of the actor would be important to deciding whether it's bright enough/too
>>bright.
>
>Not yet, but it's a good possibility. We've been careful to not do too
>much that doesn't directly solve use cases we want to implement, so as
>to avoid the abstraction-insanity that Imagination had. Getting
>information about the observer doing the requesting sounds like
>something that would really be necessary for a bunch of use cases,
>though.


I don't think IProxy.proxy needs to know who's asking.  The point
is that the proxy objects it returns have logic in them.  Currently
the illumination game system is extremely stupid: if a location is
lit, everyone can see things in it; otherwise no one can.  A more
advanced illumination game system would wrap objects and then provide
an alternate IConcept implementation.  If the light level is low but
non-zero, it can replace the thing's description with text like "a
dark oblong blob"; since conceptualization does take the observer
into account already, if it is dark but the observer has infravision,
a custom description that takes both of these facts into account can
be given to just that observer.

Jean-Paul



More information about the Reality mailing list