events: add Manager event system for inter-entity signaling#597
Open
Akif-jpg wants to merge 1 commit into
Open
events: add Manager event system for inter-entity signaling#597Akif-jpg wants to merge 1 commit into
Akif-jpg wants to merge 1 commit into
Conversation
- Add new package engine/systems/events with: - Manager, Channel, Subscription, EventData types - Async (Emit) and sync (EmitSync) delivery methods - Thread-safe subscription management using RWMutex - Utilities: CreateChannel, GetChannel, RemoveChannel, Clear - Add unit tests covering basic behavior, concurrency, types and benchmarks (src/engine/systems/events/event_manager_test.go) - Add examples demonstrating entity communication, host integration and channel management (src/engine/systems/events/event_manager_example_test.go). Examples use EmitSync where deterministic output is required. - Integrate event manager into Host: - add eventManager *events.Manager field - initialize in NewHost and expose via EventManager() getter - clear manager during Teardown - All new comments are in English and follow project style. This commit implements a publish-subscribe event system intended for lightweight, in-process signaling between entities and systems.
BrentFarris
reviewed
Jan 18, 2026
BrentFarris
left a comment
Contributor
There was a problem hiding this comment.
Sorry about the delayed response here, I've not ignored or forgotten about this pull request. I've just been a bit tied up in some other features I've been working on. Thank you for the PR!
Adding in a pub/sub is a bit of an architecture change for things like entity destruction, but it does simplify a lot of other types of events. I can see it being useful as a framework tool for game developers. I'll try and make some time to think more about something like this being in architecture or as a helper for developers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit implements a publish-subscribe event system intended for lightweight, in-process signaling between entities and systems.