ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.75k stars 817 forks source link

Smoothie Smash (Club Penguin) - Player color turns white on some frames #13141

Open ChrisCPI opened 1 year ago

ChrisCPI commented 1 year ago

Describe the bug

I have a modified version of the Smoothie Smash mini-game (AS3) from Club Penguin, which I have been experimenting with so that it may be ready to play on a website.

The color of the penguin that the player controls (the penguin that is bouncing up and down) will turn white on certain frames. I've noticed that it most noticeably happens when the penguin is either twirling in the air (by pressing the up arrow key when jumping off of fruit) or falling in mid-air, both for around half a second.

Links: My test site with a Ruffle player for the game Direct download for the SWF

Expected behavior

The penguin is supposed to stay black the entire time.

Below are two videos for comparison between Ruffle and Flash Player running the same file (apologies, I'm not sure how to embed videos properly).

Ruffle: https://github.com/ruffle-rs/ruffle/assets/92183829/71257449-5db2-4843-9b24-c32c73611e2a

Flash Player: https://github.com/ruffle-rs/ruffle/assets/92183829/89042d7c-2450-4bf2-84c4-61e39199a3c2

Affected platform

Self-hosted version

Operating system

macOS Catalina 10.15.7

Browser

Google Chrome 107.0

Additional information

I have specified that I am using macOS, however I can confirm that the bug also occurs on Windows 10.

Also, it's worth noting that when this file will eventually go live on the aforementioned website, it will call on an external function for changing the penguin's color to others besides black. However, I also tested the game with that ability in place, and the bug still persists.

I have the file decompiled, and white is the default color for the movieclip that changes colors.

Lord-McSweeney commented 1 year ago

It's likely that this is another case of "BMD.draw doesn't preserve filters".