ruffle-rs / ruffle

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

Sonic RPG eps 3 - Progression via Enter key fails #9559

Closed TomFulp closed 1 year ago

TomFulp commented 1 year ago

Describe the bug

https://www.newgrounds.com/portal/view/286025

Start up Sonic RPG eps 3. Press the Play button on the loading screen. Press the Enter key when prompted on the "Just an Advice" screen. Click "Play Movie" on the menu screen. Wait for a while on the "Last episode" summary screen. The next screen has a picture of Sonic, saying "Hmm Nights?"

Pressing the Enter key on this screen should advance the dialog, however something fails. This is the error in the browser console: ERROR core/src/avm1/activation.rs:1311 GotoFrame failed: Target is not a MovieClip

Expected behavior

It is expected that pressing the Enter key will advance the dialog, to the next screen where there is a picture of Nights saying "Hmm, I don't know..." This works in the Flash Player.

Affected platform

Self-hosted version

Operating system

Windows 7

Browser

Chrome

Additional information

No response

waspennator commented 1 year ago

Still an issue as of the latest nightly. Testing out other games in the series, this seems to be an issue exclusive to this part of the saga, as the other games either have visible buttons to click on to progress the cutscenes or have the dialogue progress automatically.

This game however has a weird quirk where there seems to be a spot around the question mark in the text box for the first bit of dialogue that shows up on flash and ruffle that seems to be clickable, but does nothing.

Checking through the Scene select and testing through the options, here are my findings.

"In The Caves of the Castle" Stuck on Dialogue "Sonic and Shadow vs Seelkadoom" Battle "Nights and Reela" Stuck on Dialogue "Knuckles Introduction" Dialogue works perfectly fine advancing via enter. "In The Evil Caravan" Dialogue works perfectly fine advancing via enter. "The Mysterious Monster" Dialogue works perfectly fine advancing via enter.

It seems like whatever is going on is happening within the first few scenes that makes it advancing dialogue by pressing the space bar not work, but seems to vanish during the latter half of the SWF.

Toad06 commented 1 year ago

I investigated the issue using JPEXS:

This is quite the same thing for DefineButton2 (102):

on(press, keyPress "<Enter>") {
   gotoAndPlay(72);
}

So both of these buttons have press and keyPress events.


Let's go back to frames/frame 25. Though this was likely not intended, the button is not placed off-screen and can be clicked (as @waspennator first mentioned) - however, nothing happens when we do so. button

Now, let's replace the code of these buttons with trace("button 102/103 - " + this); to see what happens in Flash Player:

Ruffle traces button 102 - _level0.instance[Number] in both cases. This means that gotoAndPlay is called with an invalid object, resulting in the bug (and the same issue also happens in Flash Player when clicking the button).


Here is the edited version of the game that shows the traces (the gotos are removed from the related buttons).