Skip to content

Actors can message each other with updates #60

@ajamesVISD

Description

@ajamesVISD

Let's say the Player walks into a Location and encounters a storm.

> examine storm a dark stormcloud hovers over the landscape, looking ominous.

But now let's suppose that the storm produces a giant lightning bolt. How would the Player know?

As it is, the Player would not know until it examined the storm again. This is not a desirable behavior. We want the storm to send an update to every Actor that is observing it.

In part this is a simple fix. To the Actor we add a Notify() public method, and the storm calls it with its message. We could even let all actors send Requests, which include a little damage to observers.

But there are some much tougher things to figure out:

— How do we determine who is an observer on an object? The storm is clearly visible to everyone in the location. But what about a caterpillar in a closed drawer in a dresser? When it turns into a butterfly, who will know? What about if the drawer is opened? But the player goes to the other side of the great hall from the dresser? What about rubber ducks on a wading pool? Are they always visible? How do we figure these things out?

— 95% of the problem is the problem of Actors changing state on their own time. So once that problem is solved (ha! You mad fool for trying!), come back here.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions