ruffle
ruffle copied to clipboard
Load behaviors / preload skip option
This adds a setting to Ruffle that allows disabling streaming playback.
This comes in three layers:
-
streaming
is the current behavior - tags are processed asynchronously and all movies run concurrently with loading. Preloaders work as intended. -
delayed
- tags are processed asynchronously, but movies do not run until tag processing completes. Preloaders are skipped but the UI is not locked while movies load. -
blocking
is the old behavior - tags are processed synchronously and movies start fully loaded. The UI locks until the movie finishes loading.
You can configure this on desktop with the --load-behavior=xyz
flag and, on web, with the loadBehavior
parameter on RufflePlayer.load
.
The reason for this is a handful of movies that work, but have broken preloaders in Ruffle. Notably, Red Ball's preloader relies on some unspoken assumptions about Flash Player's streaming download that Ruffle violates. Switching to delayed
loading fixes the game.
Note that we will not be defaulting to delayed
as some other movies (such as some z0r loops) actually break if they load immediately. The primary purpose of this option is to debug regressions from chunked loading, and to allow people to play games with broken preloaders until we can fix them in Ruffle.
Will it be an option for a web extension, like the "Log level" parameter for example?
Personally I prefer long-term solutions over temporary ones, especially when it affects public API, that may be hard to deprecate later. Is there some obstacle in the way to imitate Flash Player loading behavior for all kind of SWFs?
Is there some obstacle in the way to imitate Flash Player loading behavior for all kind of SWFs?
One of them is the fact that we don't really understand it well yet; if anything, having a simple switch could help understand which movies don't load and why. If you test a random SWF and it doesn't load with no errors, trying different modes is a great way of quickly finding a possible cause.
I prefer long-term solutions over temporary ones
It's not that unusual for emulators to have custom user-configurable options for hacks, compatibility modes, more-precise-but-way-slower modes etc; I wouldn't be surprised if we got more of these over time.
But I agree that having it part of self-hosted config (while it definitely can be beneficial now), might be an issue if we ever make chunked loading "better" and the config becomes unnecessary.
Taking everyone's feedback into account I've decided to drop the web config options and just keep this as a desktop option for now.