← Back to context

Comment by levzettelin

1 day ago

Hmm, interesting! Sounds a bit like a DSL for ECS with tight integration of event handling.

There's other out-there ideas that I don't remember seeing elsewhere and I don't know what made me think of them, but I definitely want to try:

For example, let's call it "environments" or "event scopes": If a game entity (class) is in a certain environment/scope, that environment can trap/intercept all events/signals sent to/from that entity.

I'm not yet sure how exactly it would work/look, but I feel like it could be useful for easily implementing complex RPG-like conditions like: "Hitting {purple} {orcs} with this sword on a {Tuesday} night with a {full moon} deals +42 damage"

So none of the base objects need to know about that condition, but the "environment/scope" could impose or "overlay" extra conditions on every event passing through it..