Skip to content

New EEex Feature: Add deferred AfterListsResolved Lua hook#10

Open
4Luke4 wants to merge 1 commit into
Bubb13:develfrom
4Luke4:EEex_Opcode_AddListsResolvedListener
Open

New EEex Feature: Add deferred AfterListsResolved Lua hook#10
4Luke4 wants to merge 1 commit into
Bubb13:develfrom
4Luke4:EEex_Opcode_AddListsResolvedListener

Conversation

@4Luke4

@4Luke4 4Luke4 commented Jun 5, 2026

Copy link
Copy Markdown

This PR implements an alternative listener to the existing EEex_Opcode_AddListsResolvedListener() (which is prone to cause stuttering / slowdowns under certain circumstances).

The new deferred listener fires:

  • at most once per sprite ProcessAI() pass
  • only if that sprite had one or more ProcessEffectList() resolutions since the previous flush
  • never for temporary copied sprites that resolve lists but are destroyed before ProcessAI()
  • independently from the legacy immediate listener, which still fires on every raw list resolution

So for one active sprite under normal 30 FPS / 15 AI-pass-per-second behavior: expect about 15 deferred callbacks per second max. For 20 active sprites, the upper bound is about 20 * 15 per second, but only for sprites that actually had pending resolved-list work.

See also: Bubb13/EEex#129.

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