Skip to content

core: Fix execution order #2943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

relrelb
Copy link
Contributor

@relrelb relrelb commented Jan 29, 2021

This is a prototype PR for executing actions in BFS order, rather than DFS order.
Fixes at least #1626 (now Sonic runs through the corkscrew loop) and #1986 (now enemies get hit).
Doesn't fix other frame-order-execution bugs such as #1164 and #1915. They might or might not be related.

@Herschel
Copy link
Member

Herschel commented Jan 29, 2021

I believe the execution order list is actually a single global list containing all clips. The order of action execution is based on the creation order of the clips, not hierarchal -- clips get tagged onto front of the list as they are created.

Here's a sample:
execorder.zip
The final order is "clip3, clip2, clip1, root", with the newest clip first (this remains the same no matter the hierarchy I believe).

Some of the details might be wrong, but this is my understanding from various tests. Having a single list would also make some things easier (for example, it is easier to implement broadcast events in both AVM1/AVM2 because we can simply iterate over the list).

@relrelb
Copy link
Contributor Author

relrelb commented Feb 3, 2021

Closing in favor of a better upcoming approach.

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.

2 participants