Messaging system can cause duplicated update calls #592

Open
opened 2025-12-17 03:45:45 +00:00 by SakulFlee · 0 comments
SakulFlee commented 2025-12-17 03:45:45 +00:00 (Migrated from github.com)

When sending a message to different tags, the same entity might be updated multiple times.

For example, say we have a tag group for Enemies and multiple Elements in this group.
We send a message to each Enemy Element individually, all causing an update to occur.
We then send a message to the tag group "Enemy", which will also call all Enemy Elements and also update them yet again.

The simplest solution is probably to bring back the on_message function. It doesn't matter how often this function gets called, the actual on_update would be only called once by the event loop.

When sending a message to different tags, the same entity might be updated multiple times. For example, say we have a tag group for Enemies and multiple Elements in this group. We send a message to each Enemy Element individually, all causing an update to occur. We then send a message to the tag group "Enemy", which will also call all Enemy Elements and **also update them yet again**. The simplest solution is probably to bring back the `on_message` function. It doesn't matter how often this function gets called, the actual `on_update` would be only called once by the event loop.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SakulFlee/Orbital#592
No description provided.