Skip to content

docs: dispatch testing note (delegation to package:asobi)#12

Merged
Taure merged 1 commit into
mainfrom
feat/dispatch-test
May 1, 2026
Merged

docs: dispatch testing note (delegation to package:asobi)#12
Taure merged 1 commit into
mainfrom
feat/dispatch-test

Conversation

@Taure
Copy link
Copy Markdown
Contributor

@Taure Taure commented May 1, 2026

Summary

  • flame_asobi is a thin Flame wrapper over package:asobi and maintains no event-name → callback mapping of its own
  • All WebSocket protocol dispatch happens in asobi-dart; flame_asobi's components consume already-typed event streams (onMatchState, onWorldTick, onMatchmakerMatched, vote streams, etc.) and translate them into Flame components
  • Adds a short ## Dispatch testing section to the README pointing at asobi-dart's test/dispatch_test.dart so SDK consumers know where protocol coverage lives

Investigation findings

Per the per-SDK protocol dispatch test rollout, I read all of lib/:

File Dispatch role
flame_asobi.dart Re-exports package:asobi + the mixins
has_asobi.dart Owns AsobiClient, no routing
asobi_matchmaker.dart Subscribes to typed onConnected / onMatchmakerMatched / onError streams
asobi_network_sync.dart Subscribes to typed onMatchState / onMatchFinished streams; translates MatchState → Flame components
asobi_world_sync.dart Subscribes to typed onWorldTick stream; switches on EntityDelta.op (a/u/r) — entity delta op codes inside an already-dispatched payload, not protocol routing
asobi_input_sender.dart Sends match.input, no routing
asobi_vote_listener.dart Subscribes to typed vote streams
asobi_player.dart / asobi_projectile.dart Apply PlayerState / ProjectileState to position components

No event-name → callback maps. No re-firing of server messages as different events. Pure delegation, so no flame-specific dispatch test is warranted.

Test plan

  • lib/ reviewed; no protocol dispatch table found
  • Existing analyzer errors from flame_asobi#11 left untouched per task constraints
  • No CI changes (docs-only)

flame_asobi delegates all WebSocket protocol dispatch to package:asobi.
Point readers at asobi-dart's dispatch_test.dart for protocol coverage and
clarify that this package's tests target Flame component integration.
@Taure Taure merged commit daa7feb into main May 1, 2026
1 check passed
@Taure Taure deleted the feat/dispatch-test branch May 1, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant