ruffle-rs / ruffle

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

[AS3] Flash Files with Box2d Engine #1848

Open jhwgh1968 opened 3 years ago

jhwgh1968 commented 3 years ago

(I thought about putting this under the tracking issue, but since it was specific to a particular engine that might work on a subset of complete AS3, I decided to make a separate issue and let it be linked as blocking.)

I have a number of flash files which use a port of the Box2D physics engine to AS3. The simplest one is their engine demo, which I managed to grab while it was still available.

If this file can be made to work, it should unlock quite a number of other files as well. Other flash player projects have also found it a helpful test case for an AS3 implementation.

main_demo_21a.zip

jhwgh1968 commented 3 years ago

Blocked on #1368

kmeisthax commented 3 years ago

This will be a good test once we have working AS3 events and most of the existing display object types wired in. It doesn't appear to require much else.

jhwgh1968 commented 1 year ago

A long overdue update.

Trying this file with master version ee52ce32, I am pleased to report it seems to work if I click through the AS3 warning. That said, the performance is significantly worse than the original flash -- where the library's entire point was to have good performance.

Based on this, I will leave it up to the team whether to close this or leave it open for further improvement.

adrian17 commented 1 year ago

For the record, box2d is very much a good target for optimization and I regularly use it to test improvement PRs :) I'm gonna keep it open till it's remotely usable at real-time.