ruffle-rs / ruffle

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

Pilgrimage: Broken animations, no music, softlock #9171

Open waspennator opened 1 year ago

waspennator commented 1 year ago

Describe the bug

https://www.newgrounds.com/portal/view/498177?emulate=flash Game doesn't seem to lock up when pressing play anymore on ng, but it still has issues.

1: The animations and sound don't seem to play correctly on ruffle, the main character just slides around in place, the coins essentially become stuck solid white when you pick them up, and enemies get squished but don't seem to vanish correctly. Also the ingame music doesn't play.

2: Moving past this point causes the entire screen to freeze up, only being able to zoom in moving right or zoom out if you move left. It does fix itself if you move left enough away from the trigger spot, but the platforming further ahead makes this unplayable.

212549230-57e7e34b-a40c-40a9-beda-c9f4b2291020

Expected behavior

The animations and sound should play correctly and the screen shouldn't get stuck at that point and should correctly turn into pixelated garbage instead.

Affected platform

Browser's extension

Operating system

Windows 11

Browser

Edge 108

Additional information

No response

waspennator commented 1 year ago

www.newgrounds.com-1676519694262.log Tested again and still happening, providing a log file with some of the errors I see. Apparently this SWF needs the "GetDescendants" opcode.

waspennator commented 1 year ago

ruffle.rs-1679015297636.log

Preloader seems to show up now (its super laggy until it finishes loading, but I guess this is more accurate lag aside), but the game still seems to not play the animations, audio, etc past the title screen, which I am guessing is because of this.

RustError("Property does not exist: Multiname { ns: Multiple([Namespace(Private(\"\")), Namespace(Private(\"\")), Namespace(Namespace(\"\")), Namespace(Namespace(\"game_fla\")), Namespace(PackageInternal(\"game_fla\")), Namespace(Namespace(\"http://adobe.com/AS3/2006/builtin\")), Namespace(Namespace(\"adobe.utils\")), Namespace(Namespace(\"flash.accessibility\")), Namespace(Namespace(\"flash.desktop\")), Namespace(Namespace(\"flash.display\")), Namespace(Namespace(\"flash.errors\")), Namespace(Namespace(\"flash.events\")), Namespace(Namespace(\"flash.external\")), Namespace(Namespace(\"flash.filters\")), Namespace(Namespace(\"flash.geom\")), Namespace(Namespace(\"flash.media\")), Namespace(Namespace(\"flash.net\")), Namespace(Namespace(\"flash.printing\")), Namespace(Namespace(\"flash.profiler\")), Namespace(Namespace(\"flash.sampler\")), Namespace(Namespace(\"flash.system\")), Namespace(Namespace(\"flash.text\")), Namespace(Namespace(\"flash.text.engine\")), Namespace(Namespace(\"flash.ui\")), Namespace(Namespace(\"flash.utils\")), Namespace(Namespace(\"flash.xml\")), Namespace(Protected(\"game_fla:MainTimeline\")), Namespace(StaticProtected(\"game_fla:MainTimeline\")), Namespace(StaticProtected(\"flash.display:MovieClip\")), Namespace(StaticProtected(\"flash.display:Sprite\")), Namespace(StaticProtected(\"flash.display:DisplayObjectContainer\")), Namespace(StaticProtected(\"flash.display:InteractiveObject\")), Namespace(StaticProtected(\"flash.display:DisplayObject\")), Namespace(StaticProtected(\"flash.events:EventDispatcher\")), Namespace(StaticProtected(\"Object\"))]), name: Some(\"Shader\"), params: [], flags: MultinameFlags(0x0) }")

Lord-McSweeney commented 1 year ago

Stubbing Shader does not fix the problem.

waspennator commented 1 year ago

Stubbing Shader does not fix the problem.

Tested it on latest nightly and noticed 2 new things.

1: The game seems to toss this up in the log, which i'm curious if the game is throwing a fit about this. "Error occured when running AVM2 frame script: ReferenceError: Error # 1065: Variable Shader is not defined."

2: If you try to go past the spot where the screen is supposed to distort and glitch out, this error gets spammed a bunch in the logs until you go back. "Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x3e148d8 }) to handler FunctionObject(FunctionObject { ptr: 0x2a91100 }) : TypeError: Error # 1009: Cannot access a property or method of a null object reference. (accessing field: data)"

waspennator commented 1 year ago

Ran it through the ruffle website and my only guess is that one of these stubs are causing the issue.

Encountered stub: AVM2 XML.name() namespaces

Encountered stub: AVM2 flash.display.Shader.byteCode setter

Encountered stub: AVM2 flash.media.Sound constructor with arguments

And then entering the part of the game where the screen gets heavily distorted.

Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x1d90338 }) to handler FunctionObject(FunctionObject { ptr: 0x3bff7f0 }) : TypeError: Error # 1009: Cannot access a property or method of a null object reference. (accessing field: bit)

waspennator commented 1 year ago

Situation is a bit better, there's still no music and the game still gets stuck halfway through, but the animations seem to be working for the player, the enemies, the coins, and the level glitching out slightly.

waspennator commented 1 year ago

Also seems like sound effects from collecting coins or jumping on enemies aren't working either.

waspennator commented 1 year ago

Retested with a nightly from a few days ago, I can confirm now the screen no longer gets stuck half way and the game is fully playable from start to finish now, the only major issue that's really left now is the missing audio when you actually start the game.

Lord-McSweeney commented 1 year ago

Shader effects are also working!

waspennator commented 1 year ago

Ingame music is still missing as of latest nightly.

waspennator commented 1 year ago

Apparently checking on discord, sound.extract is needed in order for the audio to play ingame, seems like it wasn't showing up in the console log as a stub warning because of "SampleDataEvent.SAMPLE_DATA"

waspennator commented 5 months ago

Lag when the preloader is loading up had gotten better on my s22 compared to before, but the audio is still missing ingame