Skip to content

Conversation

@jarca0123
Copy link
Contributor

@jarca0123 jarca0123 commented Aug 15, 2025

This fixes Pink Tac Toe, Ratman Ralph, Super Sub Hero, Electricman 2, from_shumway/duplicatemovieclip/dontremove, avm1/rewind_depth and the rest of failing timeline/nav tests (ratio2, ratio3, morph_shape). I am not sure about the logic though.

@Lord-McSweeney Lord-McSweeney added A-avm1 Area: AVM1 (ActionScript 1 & 2) T-fix Type: Bug fix (in something that's supposed to work already) labels Aug 15, 2025
@n0samu n0samu added timeline Issues relating to timeline animation newsworthy labels Aug 15, 2025
@n0samu
Copy link
Member

n0samu commented Aug 15, 2025

Ahh this is super exciting!! Another one I'll need to test - I'm curious if it will affect Electricman 2 or Super Sub Hero, among others.

@n0samu
Copy link
Member

n0samu commented Aug 18, 2025

As far as I can tell, this PR (EDIT: almost) completely fixes Electricman 2! This is incredible news 🎉 🎉 🎉
(No change in Super Sub Hero, though.)

@n0samu
Copy link
Member

n0samu commented Aug 18, 2025

As @p0008874 pointed out on Discord, there is still a more subtle problem remaining with Electricman 2. If you beat the Cirrian Guard and then play the same level again, only two enemies will spawn in the second time. That's a problem since you can't beat the level till you defeat 3 enemies. Also, if you play the Replicants level after that, a Cirrian Guard will spawn in in place of one of the Replicants.
GitHub won't let me upload the video demonstrating this, but here's the link to it on Discord: https://discord.com/channels/610531541889581066/704769195749146634/1406900010729345075

@n0samu
Copy link
Member

n0samu commented Aug 18, 2025

This also fixes #5219! 🎉 🎉 🎉

@jarca0123 jarca0123 force-pushed the rewind-depth branch 2 times, most recently from 8f714b1 to 9a40c4a Compare August 19, 2025 05:21
@danielhjacobs danielhjacobs added the waiting-on-review Waiting on review from a Ruffle team member label Aug 19, 2025
@n0samu
Copy link
Member

n0samu commented Aug 19, 2025

Now that this PR is using logic from #5431, it seems to work perfectly 🎉
Fixes #10382, #815, #5183, #9594, #5219 (can we link these issues to the PR please?)

Copy link
Collaborator

@Lord-McSweeney Lord-McSweeney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this!

@jarca0123 jarca0123 force-pushed the rewind-depth branch 2 times, most recently from 2b6b2f7 to 6fcac5b Compare September 8, 2025 07:21
kjarosh added a commit to kjarosh/ruffle that referenced this pull request Oct 3, 2025
This patch sets PlaceObject's ratio on DisplayObject as it's also used
for rewind logic. By itself this patch does not change how rewinds work.

This is pulled from ruffle-rs#21336 as a
low-risk patch.

Co-authored-by: Mike Welsh <mwelsh@gmail.com>
Co-authored-by: jarca0123 <11705208+jarca0123@users.noreply.github.com>
kjarosh added a commit to kjarosh/ruffle that referenced this pull request Oct 3, 2025
Add a flag PLACED_BY_AVM1_SCRIPT, which is used for rewind logic.
This patch by itself does not change how rewinds work.

This is pulled from ruffle-rs#21336 as a
low-risk patch.

Co-authored-by: jarca0123 <11705208+jarca0123@users.noreply.github.com>
kjarosh added a commit to kjarosh/ruffle that referenced this pull request Oct 3, 2025
Add a flag PLACED_BY_AVM1_SCRIPT, which is used for rewind logic.
This patch by itself does not change how rewinds work.

This is pulled from ruffle-rs#21336 as a
low-risk patch.

Co-authored-by: jarca0123 <11705208+jarca0123@users.noreply.github.com>
kjarosh added a commit to kjarosh/ruffle that referenced this pull request Oct 3, 2025
Add a flag PLACED_BY_AVM1_SCRIPT, which is used for rewind logic.
This patch by itself does not change how rewinds work.

This is pulled from ruffle-rs#21336 as a
low-risk patch.

Co-authored-by: jarca0123 <11705208+jarca0123@users.noreply.github.com>
kjarosh added a commit that referenced this pull request Oct 3, 2025
This patch sets PlaceObject's ratio on DisplayObject as it's also used
for rewind logic. By itself this patch does not change how rewinds work.

This is pulled from #21336 as a
low-risk patch.

Co-authored-by: Mike Welsh <mwelsh@gmail.com>
Co-authored-by: jarca0123 <11705208+jarca0123@users.noreply.github.com>
kjarosh added a commit to kjarosh/ruffle that referenced this pull request Oct 3, 2025
Add a flag PLACED_BY_AVM1_SCRIPT, which is used for rewind logic.
This patch by itself does not change how rewinds work.

This is pulled from ruffle-rs#21336 as a
low-risk patch.

Co-authored-by: jarca0123 <11705208+jarca0123@users.noreply.github.com>
kjarosh added a commit that referenced this pull request Oct 3, 2025
Add a flag PLACED_BY_AVM1_SCRIPT, which is used for rewind logic.
This patch by itself does not change how rewinds work.

This is pulled from #21336 as a
low-risk patch.

Co-authored-by: jarca0123 <11705208+jarca0123@users.noreply.github.com>
@kjarosh kjarosh removed the waiting-on-author Waiting on the PR author to make the requested changes label Oct 3, 2025
@kjarosh kjarosh requested a review from Lord-McSweeney October 3, 2025 22:31
@kjarosh kjarosh added the waiting-on-review Waiting on review from a Ruffle team member label Oct 3, 2025
Comment on lines +1728 to +1740
let ratio_equals = match new_params.ratio {
Some(ratio) => old_object.ratio() == ratio,
None => true,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit: this could be shortened to new_params.ratio.is_none_or(|r| r == old_object.ratio()) (and similarly for the subsequent matches).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's shorter but less readable, you'd have to think for a while what's the default value for None, it's not natural to read it as is none or / is some and.

Copy link
Contributor

@moulins moulins Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk, it seems fairly natural to me: "new_params.ratio is none or equal to old_object.ratio()"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The true/false default value is an equal choice, there's no reason why you would choose "is none or" vs "is some and". Matter of fact, for some properties it's the former, for some it's the latter. When trying to assess which one should be where, you have to map "is none or" & "is some and" to default values instead of reading them as-is.

Not to mention, this logic is untested, so we don't really know which one should be where.

Comment on lines +1566 to +1569

let final_placements: HashMap<Depth, &GotoPlaceObject<'_>> =
goto_commands.iter().map(|cmd| (cmd.depth(), cmd)).collect();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a larger refactor, we could instead have goto_commands be directly a HashMap; from what I can see it doesn't have a meaningful ordering and we already ensure no duplicate Depths.

@kjarosh
Copy link
Member

kjarosh commented Oct 11, 2025

I think we should pull in this code and improve upon it later (with dedicated tests).

@kjarosh kjarosh requested a review from moulins October 11, 2025 17:11
jarca0123 and others added 2 commits October 12, 2025 09:17
Co-authored-by: Mike Welsh <mwelsh@gmail.com>
Co-authored-by: Kamil Jarosz <kjarosh256@gmail.com>
@torokati44 torokati44 enabled auto-merge (rebase) October 12, 2025 07:17
@torokati44 torokati44 merged commit b33e449 into ruffle-rs:master Oct 12, 2025
24 of 25 checks passed
@kjarosh
Copy link
Member

kjarosh commented Oct 12, 2025

@jarca0123 thank you for working on it!

@kjarosh kjarosh removed the waiting-on-review Waiting on review from a Ruffle team member label Oct 12, 2025
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request Oct 19, 2025
----------------------------------------------------------------------------------
clk.mk 9c014001dac74bd3e443600cd3fbf727a6402e62 # Version: Commits on Oct 13, 2025
----------------------------------------------------------------------------------
Merge pull request #1600 from TomHarte/ShorterOpenDialogue

macOS: shorten prompt to File -> Open...,

------------------------------------------------------------------------------------------
dolphin-emu.mk 1067754d218edab5ece7a1878a987c5d61bdaa65 # Version: Commits on Oct 13, 2025
------------------------------------------------------------------------------------------
Merge pull request #13983 from jordan-woyak/wmreal-android-fix

WiimoteReal: Use GetEnvForThread within IORead/IOWrite calls to fix real Wii remotes on Android.,

------------------------------------------------------------------------------------------
duckstation.mk a035c487218e7b5c00645977ed3a7cf4d4d3f783 # Version: Commits on Oct 13, 2025
------------------------------------------------------------------------------------------
GameList: Fall back to achievement badges for game icons,

-----------------------------------------------------------------------------------
eden.mk 56e2dbc6198125bbc26ff7aef11a0c0e435400d4 # Version: Commits on Oct 13, 2025
-----------------------------------------------------------------------------------
added barriers against zero valued overlayControlData.individualScale (#2721)

--------------------------------------------------------------------------------------
flycast.mk 8edd8fc447fef631f5ac8f9d3a50e8e592f68aa3 # Version: Commits on Oct 13, 2025
--------------------------------------------------------------------------------------
Merge remote-tracking branch 'origin/dev',

--------------------------------------------------------------------------------------
melonds.mk 91ab68090c0aa588aabaeaa5e2c62564fd661ccc # Version: Commits on Oct 13, 2025
--------------------------------------------------------------------------------------
AR: add fun D4 opcodes,

----------------------------------------------------
pcsx2.mk v2.5.222 # Version: Commits on Oct 13, 2025
----------------------------------------------------
- [Debugger: Floating point display in memory view](PCSX2/pcsx2#13362)

,

------------------------------------------------------------------------------------
rpcs3.mk 1cae72c87281525468a09f721d4781aff42d433d # Version: Commits on Oct 12, 2025
------------------------------------------------------------------------------------
vk: Uniquely identify images using a monotonic incrementing counter,

-------------------------------------------------------------------------------------
ikemen.mk 42a345be637db241b57bf056ffe3d349362d0aaf # Version: Commits on Oct 13, 2025
-------------------------------------------------------------------------------------
Merge pull request #2777 from rakieldev/fixes

fix: random cycle restarting from the last used index, mirrored palettes in demo mode mirror match,

-----------------------------------------------------------------------------------------
lightspark.mk c86d37119f745964b23bedf5b4dfe4939abfccbb # Version: Commits on Oct 13, 2025
-----------------------------------------------------------------------------------------
revert previous commit,

---------------------------------------------------------------
ruffle.mk nightly-2025-10-13 # Version: Commits on Oct 13, 2025
---------------------------------------------------------------
## What's Changed

* avm1: Adjust clip removal logic for rewinds by @jarca0123 in ruffle-rs/ruffle#21336

* core: Add ARM64 `FJCVTZS` instruction optimization for `f64` to `i32` by @CrazyboyQCD in ruffle-rs/ruffle#21780

* avm1: Remove `base_clip_unloaded` flag in `Activation` by @moulins in ruffle-rs/ruffle#21866

* avm1: Some `Function` refactors by @moulins in ruffle-rs/ruffle#21849

* chore: fix formatting by @moulins in ruffle-rs/ruffle#21902

* chore: Update wgpu to 26, egui to match by @torokati44 in ruffle-rs/ruffle#21730

* chore: Update cpal to 0.16, dropping oboe by @torokati44 in ruffle-rs/ruffle#21903

* avm2: Refactor Array.splice to ArrayStorage by @kjarosh in ruffle-rs/ruffle#21690

* ci: Remove posting coverage comment by @kjarosh in ruffle-rs/ruffle#21838

## New Contributors

* @CrazyboyQCD made their first contribution in ruffle-rs/ruffle#21780

**Full Changelog**: ruffle-rs/ruffle@nightly-2025-10-12...nightly-2025-10-13,

------------------------------------------------------------------------------------
box64.mk 81c56d7155cdd7a4c49173a2fe4d7bdd87698683 # Version: Commits on Oct 13, 2025
------------------------------------------------------------------------------------
Bumped version to v0.3.8,

---------------------------------------------------------------------------------------
etlegacy.mk 5ac4099159ef2b6282709932101654c522024731 # Version: Commits on Oct 13, 2025
---------------------------------------------------------------------------------------
app: google changed requirements for apps to use only 16KB page size so make sure we are aligned,

-------------------------------------------------------------------------------------------
jazz2-native.mk c0a761ebae78e9e964ed2e21a5fb90561b02dc60 # Version: Commits on Oct 13, 2025
-------------------------------------------------------------------------------------------
Fixed build,

-----------------------------------------------------------------------------------------
retroarch.mk 8d16395de9d8a2534a00feb354163a68488ca90d # Version: Commits on Sept 01, 2025
-----------------------------------------------------------------------------------------
apple: fix display server resolution/refresh rates on macos/ios,

-------------------------------------------------------------------
libserum.mk v2.3.0-concentrate.1 # Version: Commits on Oct 11, 2025
-------------------------------------------------------------------
use fixed unit64_t instead of size_t that varies between 32bit and 64bit,

-----------------------------------------------------
libzedmd.mk v0.9.7 # Version: Commits on Oct 05, 2025
-----------------------------------------------------
removed osx build target,

----------------------------------------------------------------------------------------
doomretro.mk 6788a780439384f784b49737471e50011f73314d # Version: Commits on Oct 13, 2025
----------------------------------------------------------------------------------------
Minor tweaks,

-------------------------------------------------------------------------------------
gzdoom.mk e558d2be8a13f74ed16f70646bc442185e682db2 # Version: Commits on Oct 11, 2025
-------------------------------------------------------------------------------------
properly handle reading from embedded compressed archives.

Fixes #2622,

-----------------------------------------------------------------------------------
tr1x.mk cec5d916a64e9fc6bfc1ee31593644c0c2a381f5 # Version: Commits on Oct 12, 2025
-----------------------------------------------------------------------------------
objects: rename GAME_OBJECT_ID to OBJECT_ID

This rename is necessary, as `OBJECT_ID` is supposed to refer to the

internal TRX indexing, whereas \game object ID\s refer to the OG level

data indexing, and are used strictly by the level reading facilities.,

-----------------------------------------------------------------------------------
tr2x.mk cec5d916a64e9fc6bfc1ee31593644c0c2a381f5 # Version: Commits on Oct 12, 2025
-----------------------------------------------------------------------------------
objects: rename GAME_OBJECT_ID to OBJECT_ID

This rename is necessary, as `OBJECT_ID` is supposed to refer to the

internal TRX indexing, whereas \game object ID\s refer to the OG level

data indexing, and are used strictly by the level reading facilities.,

-----------------------------------------------------------------------------------------------
libretro-flycast.mk 8edd8fc447fef631f5ac8f9d3a50e8e592f68aa3 # Version: Commits on Oct 13, 2025
-----------------------------------------------------------------------------------------------
Merge remote-tracking branch 'origin/dev',

---------------------------------------------------------------------------------------------
libretro-vba-m.mk 53bc1c173872fb8924488192124bed835f6bcfee # Version: Commits on Oct 13, 2025
---------------------------------------------------------------------------------------------
Default bilinear=false, hide_menu_bar=false

Signed-off-by: Rafael Kitover <rkitover@gmail.com>,

-------------------------------------------------------------------------------------------
glsl-shaders.mk 2eca39ad100cabf1ebe0323c7b67c321eba6c837 # Version: Commits on Oct 13, 2025
-------------------------------------------------------------------------------------------
Update ntsc_module (#544)

* Update ntsc_module.glsl

* Update crt-consumer-1w.glsl

* Update ntsc_module.glsl,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm1 Area: AVM1 (ActionScript 1 & 2) newsworthy T-fix Type: Bug fix (in something that's supposed to work already) timeline Issues relating to timeline animation

Projects

None yet

7 participants