Hi, nice lib.
With the broadcast behaviour (not implemented yet ?)
Are we looking at sending that msg to all actors, or will there be a actor.subscribe() type of function to limit who receives various broadcasts
Thinking of the scenario where there are a very large number of actors, with only a small subset interested in certain broadcasted events
…..
Secondary question with broadcasts - consider the scenario where there are many “games” running, each game with many players, each player controlling many actors, and each actor subscribed to a subset of broadcast events
The “event message” could then be a complex struct such as
{
game_id: int,
player_id: int,
… other fields
}
Imagine an actor could subscribe to …
- all messages for a given game_id, any player_id
- only messages for a match on both game_id and player_id
This is already possible using a single message_type .. but for ergonomics it might be interesting to allow complex matching logic for subscriptions.
Performance wise - the match has to be executed at some point in the flow, so it’s just as much work doing it in the actor code as it would be doing it in the engine. Just an ergonomic nicety I think
Thoughts ?
Hi, nice lib.
With the broadcast behaviour (not implemented yet ?)
Are we looking at sending that msg to all actors, or will there be a actor.subscribe() type of function to limit who receives various broadcasts
Thinking of the scenario where there are a very large number of actors, with only a small subset interested in certain broadcasted events
…..
Secondary question with broadcasts - consider the scenario where there are many “games” running, each game with many players, each player controlling many actors, and each actor subscribed to a subset of broadcast events
The “event message” could then be a complex struct such as
{
game_id: int,
player_id: int,
… other fields
}
Imagine an actor could subscribe to …
This is already possible using a single message_type .. but for ergonomics it might be interesting to allow complex matching logic for subscriptions.
Performance wise - the match has to be executed at some point in the flow, so it’s just as much work doing it in the actor code as it would be doing it in the engine. Just an ergonomic nicety I think
Thoughts ?