Epic: UI Event Subscription System #298

Open
opened 2026-03-16 01:59:23 +00:00 by freemo · 0 comments
Owner

Background and Context

The Terminal UI Framework (#112) requires a robust event subscription system to connect domain-level game events to the UI rendering layer. Currently, there is no structured way for a player's UI to receive and react to game events (room changes, combat updates, chat messages, etc.). The UI Event Subscription System provides per-player event subscribers that attach to relevant domain objects via the Wisper pub/sub library, automatically manage subscription lifecycles as game state changes, and decouple event production from rendering via a thread-safe queue.

Expected Behavior

Each connected player gets a UIEventSubscriber that listens to Wisper events from relevant domain objects. Subscriptions are automatically managed — when a player moves rooms, the subscriber detaches from the old room/area and attaches to the new one. Events flow into a thread-safe render queue, allowing the game logic thread and render thread to operate independently.

Acceptance Criteria

  • Per-player UIEventSubscriber attaches to relevant domain objects via Wisper.
  • Auto-resubscription occurs on room changes and combat start/end.
  • A thread-safe render queue decouples event production from rendering.
  • All child issues are completed, reviewed, and merged.

Child Issues

All child issues for this epic are tracked as individual issues with dependency links.

Definition of Done

This issue is complete when all child issues are merged to master and the UI Event Subscription System is operational.

## Background and Context The Terminal UI Framework (#112) requires a robust event subscription system to connect domain-level game events to the UI rendering layer. Currently, there is no structured way for a player's UI to receive and react to game events (room changes, combat updates, chat messages, etc.). The UI Event Subscription System provides per-player event subscribers that attach to relevant domain objects via the Wisper pub/sub library, automatically manage subscription lifecycles as game state changes, and decouple event production from rendering via a thread-safe queue. ## Expected Behavior Each connected player gets a `UIEventSubscriber` that listens to Wisper events from relevant domain objects. Subscriptions are automatically managed — when a player moves rooms, the subscriber detaches from the old room/area and attaches to the new one. Events flow into a thread-safe render queue, allowing the game logic thread and render thread to operate independently. ## Acceptance Criteria - [ ] Per-player `UIEventSubscriber` attaches to relevant domain objects via Wisper. - [ ] Auto-resubscription occurs on room changes and combat start/end. - [ ] A thread-safe render queue decouples event production from rendering. - [ ] All child issues are completed, reviewed, and merged. ## Child Issues All child issues for this epic are tracked as individual issues with dependency links. ## Definition of Done This issue is complete when all child issues are merged to `master` and the UI Event Subscription System is operational.
freemo self-assigned this 2026-03-16 01:59:24 +00:00
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.

Reference: aethyr/Aethyr#298
No description provided.