[Reality] Re: Current Task: OBJECT PROXIES.

Christopher Armstrong radix at twistedmatrix.com
Thu May 4 09:09:37 CDT 2006


On 5/1/06, Christopher Armstrong <radix at twistedmatrix.com> wrote:
> Jp and I will be working on "OBJECT PROXIES" starting tonight. These are
> meant to solve the problem of dynamically changing the behavior based on
> intermediary game objects. FOR EXAMPLE: A sound-proof glass window should
> let light through but not sound. This would be implemented by capturing
> events which traverse the glass window, and removing aurial concepts from
> that event. MAYBE. We don't actually know how we're going to do this, but
> we'll write some unit tests and see where that takes us.

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.

None of this stuff is yet available to builders in the game world, but
hopefully we'll try to do something about that before we merge.

I think this is the first lighting system in a looong time. Reality? TR/J?


1: Perhaps the LocationLighting proxy should, when it gets a chance to
proxy the actual location, return an IVisible whose name is "dark
place"? That would let the player know whether they're standing in
complete blackness or floating in a pure white abyss,  for example.

--
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/



More information about the Reality mailing list