ruffle-rs / ruffle

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

Problems with Golphysics game #5219

Open n0samu opened 3 years ago

n0samu commented 3 years ago

Describe the bug Link to SWF: http://i.notdoppler.com/files/golphysics.swf After beating the first level, the second level appears only in the bottom-right corner of the screen. The level also cannot be interacted with, so the game is unplayable from that point forward. Steps to reproduce:

  1. Select any of the menu options to start the game (recommend "full course")
  2. Beat the first level and try to move onto the second level.
  3. The game will no longer be playable. Screenshot of the problem: image

Is the problem with the Ruffle desktop app, extension, or self-hosted version? This problem occurs with the Ruffle extension and web demo. When I tested the game with the Ruffle desktop app, it quickly used all of my available RAM and crashed my computer. This might be an entirely separate bug.

What platform are you using? Windows 10 64-bit, Firefox 91

n0samu commented 2 years ago

Update: The memory issue with the Ruffle desktop app seems to be resolved. But the main issue shown above still occurs.

Toad06 commented 2 years ago

The following code in \frame 144\DoAction runs when a level starts:

// (...)
_root.createEmptyMovieClip("sholder",_root.getNextHighestDepth());
sholder.attachMovie("Level" + currentstage,"stage",getNextHighestDepth());
trace(sholder._x); // added for debugging
trace(sholder._y); // added for debugging
// (...)
sholder._x = sholder._x + 320;
sholder._y = sholder._y + 240;
// (...)

Flash Player traces:

Ruffle traces:


It seems like MovieClip.createEmptyMovieClip(instanceName, depth) needs to delete/reset the existing properties when the method is called with an instanceName that has already been used.

This sounds similar to #6370. Also probably related to #5492.

Sonikkustar commented 11 months ago

Issue appears to persist on nightly-2023-12-19:

image