[Reality] we're the most frontingest

Christopher Armstrong radix at twistedmatrix.com
Fri May 19 13:11:21 CDT 2006


On 5/19/06, glyph at divmod.com <glyph at divmod.com> wrote:

> === proxy() design patterns, and quantum fronting in Imaginary ===
...
> In the case of [un]illuminated environments -- and more generally, in any
> implementation of proxy() that might want to interfere with a player's ability
> to see or interact with objects -- there are a few general types of
> interaction:
>
>     - see an object (.isOrExtends(IVisible))
>     - designate an object as a target of some kind (.isOrExtends(IDesignatable))
>       two other parent interfaces extend this one:
>         - physically interact with an object (.isOrExtends(IReachable))
>         - remotely indicate an object (.isOrExtends(IAimedTarget))
>
...
> The proposed solution here is to allow proxy() to return both providers of the
> requested interface and providers of a new interface, IWaveform.  IWaveform has
> one method: collapse(observer), which returns a provider of the originally
> requested interface passed to proxy().  collapse(player) will be called at the
> end of the resolve() phase of Action, if the given things do not implement the
> interface they are supposed to implement at that point (and, obviously, do
> provide IWaveform; otherwise this is simply an error.)
>
> For example, the IlluminatedThing wrapper will implement IVisible and
> IWaveform, since it knows what to do in the case of visibility, but it provides
> a general "can I reach this" implementation for _all_ tool and target
> interfaces, not merely those it can explicitly single out.  i.e., for any
> interface LocationLighting.proxy is passed that isOrExtends(IDesignatable), an
> IlluminatedThing will be returned, whose collapse() method will make the
> appropriate rolls: can I see this?  can I interact with it?  what's the chance
> I will hit it if it's an IAimedTarget?  how long will it take to rummage for
> it?  (the last only once we implement some kind of actions-taking-time system).


So, I'm still vaguely uncomfortable with IWaveform (for one, since its
specification is still pretty vague; I don't think IlluminatedThing
has been thought through to the point where we *really* know how its
IWaveform implementation will work).

Let me state a (perceived) problem, concentrated down from glyph's
huge and twisty maze of logic:

Currently, modification of object behavior that needs to take into
consideration the state of the actor/observer can use only one
strategy: do the observer-dependent logic in the Concept, where the
observer is available.

Unfortunately, there are (probably) use cases where conceptualization
of objects and/or events is too late in the process: those cases where
we want to change more than how how an observer perceives something,
but make the outcome of the action dependent on the actor.

Shoot a gun in the dark at a noisy enemy (while an innocent bystander
is standing next to him). Is your "Listen" check (based on Wis) high
enough to beat the enemy's "Move Silently" check? Asking this question
in ShotFiredConcept makes no sense, because the concept can't decide
who the bullet actually hits.  As a perhaps simpler example, consider
finding the exit out of a dark room: you need to "grope my way out of
here", which means feel along the wall until you've found an exit and
walk through it. Conceptualization-time, again, is too late to decide
whether you find an exit, or how long it takes to find the exit (which
should be based on the actor's knowledge of the layout of the room,
for example).

How do we solve this? I know glyph's answer already, but I want to see
what other's immediate impressions are. Perhaps this shouldn't even be
a function of the proxy system, or we need to modify some logic
elsewhere.

Of course, my current suggestion is the same as glyph's: Don't
implement IWaveform (or any solution to this problem) yet, but wait
until we've thought harder and actually get to the point where we want
to implement combat in dark rooms :-)

(also, non-dark-room use cases would be appreciated)

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



More information about the Reality mailing list