ruffle-rs / ruffle

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

Regression in Match Maker #12075

Open Computerdude77 opened 1 year ago

Computerdude77 commented 1 year ago

Describe the bug

There seems to be a regression in Match Maker. The game worked at one point as the #9927 issue shows. The game only goes to a blue screen with no music and no way to start the game. This seems to have started happening as of the 2023-05-20 nightly. An image of what occurs in the most recent nightly is pictured below, which is the 2023-07-15 nightly as of the time of writing this. Also, this issue affects all versions except the Windows desktop version, which works fine and does not have this issue.

Ruffle: image

Expected behavior

The game should load the title screen and allow for a few options to be picked before starting the game.

Title screen screenshot from native Flash:

flashplayer_32_sa_xOaA7OoJn6

Affected platform

Online demo

Operating system

Windows 10 22H2

Browser

Google Chrome 114

Additional information

No response

Lord-McSweeney commented 1 year ago

I suspect the relevant commit might be 0948bf7bbdf0e66ccf4136faa051a3e36e8aa3d3, but I haven't actually bisected.

n0samu commented 1 year ago

Yes, this happens because of the following game code:

            if(Capabilities.playerType != "StandAlone")
            {
                this.loadapi();
            }
            else
            {
                this.onStingerComplete(null);
            }

Implementing Capabilities.playerType had the side effect of breaking this game because if it's not run in the standalone player, it tries to load the Candystand API, which no longer exists. Previously, Ruffle always pretended to be the standalone player. Also note that the same problem occurs when running the game in the real Flash browser plugin, so this isn't technically a bug. In the future, we should make playerType customizable via a config option.