Skip to content
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

core: Respect ratio field for non-morph shapes (fix #1291) #1305

Closed
wants to merge 2 commits into from

Conversation

Herschel
Copy link
Member

This changes the logic for rewind-gotos to respect the ratio field inside the PlaceObject tags. See #1291 for a full description.

Previously we would manually keep track of the placement frame for a display object whenever it was instantiated. A rewind would immediately remove all objects that were created after the target frame (because they should not exist on that frame). However, now we need to inspect the ratio field of the final PlaceObject tag to decide whether to remove an object; so now we defer the decision of whether to remove an object until after we churn through all the frames.

Still needs some more research+testing to verify this doesn't regress anything. I need to add a test case to verify the new behavior. My initial tests indicate this does fix #1060, which makes sense because this SWF is made by a 3rd party tool.

@Herschel Herschel added the timeline Issues relating to timeline animation label Oct 13, 2020
@Herschel Herschel marked this pull request as draft October 13, 2020 00:42
@Toad06
Copy link
Member

Toad06 commented Oct 13, 2020

There are some issues where things remain on screen while they shouldn't:

Other issues:

@Herschel
Copy link
Member Author

Thx for testing! Could you try again with the latest changes?

@Toad06
Copy link
Member

Toad06 commented Oct 14, 2020

Hmm, I'm still observing the same issues (is it because the PR seems to miss a piece of code from commit 04e3f1ecea9572801a92ac6596134fa5a174b5ba? I'm not seeing the if is_rewind { code in "movie_clip.rs").

@Herschel
Copy link
Member Author

Whoops, you're right, I futzed up a rebase. Should be okay now.

@Toad06
Copy link
Member

Toad06 commented Oct 14, 2020

Almost all of the games above work as intended now! 👍 Only Zed still has issues with transitions (for the audio stuff on Luigi's Day, I will open a bug report).

I've also tested other files, unfortunately it turns out some of the games by Ferry Halim have issues:

Starry Night (http://www.ferryhalim.com/orisinal/g3/starry.htm)
No stars to light up appear.

Critical Zone (http://www.ferryhalim.com/orisinal/g2/criticalzone.htm)
The game no longer works.

The Bottom of the Sea (http://www.ferryhalim.com/orisinal/g3/sea.htm)
The more the character gets down in the water, the more the background gets truncated (or doesn't repeat itself).

@Herschel
Copy link
Member Author

Herschel commented Oct 14, 2020

Thx for the testing!

Upon thinking about this some more, I think better would be to change GotoPlaceObject to be an enum with a Remove variant, and keep track of removes as well as places. For a rewind, we can initialize the goto command list with a remove for every current display object (because a rewind starts from an empty frame 1). This removes the need for the awkward "GotoPlacedObject" flag. I also think this will be more accurate for the execution order of clip unloads (we haven't really paid attention to this yet).

@Herschel
Copy link
Member Author

Herschel commented Oct 5, 2021

Closing in favor of #5431.

@Herschel Herschel closed this Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
timeline Issues relating to timeline animation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ridesims.com Taron Simulator Frame Skipping?
2 participants