Ruffle is an Adobe Flash Player emulator written in the Rust programming language. The Linux version can be used in conjunction with libTAS to make tool-assisted speedruns of Flash games.
Table of contents
What you'll need
- libTAS 1.4.3 or newer.
- Remember that the run must sync on an official emulator version or it will not be accepted.
- A nightly build of Ruffle - around 2022 or newer. Currently there are no official releases of Ruffle.
- Your Flash game! This will be in the
- A lot of official game sources are listed at the bottom of https://ruffle.rs/ as Diamond Sponsors.
- If the game is embedded in a website and there is no download link, you may have to look at the page's source code to find the link to it. If it's ran via Ruffle, you can Copy Debug Info via rightclick and find SWF URL there.
Test your game natively in Ruffle before you try TASing it! Ruffle is a work in progress and some games are incompatible. If you get a popup message about unsupported features, the game won't work yet and you'll have to try Ruffle again later. If your game runs but has some glitches that don't occur in the regular Adobe Flash Player, post a well-written, detailed issue on how to reproduce it and hope for the best.
Using with libTAS
Thankfully, setting it up with libTAS is not very complicated.
- Set the executable path to the Ruffle build you downloaded.
- Set the command line options to
-g gl /path/to/yourgame.swf, substituting the path of your game. Some people have also gotten
-g vulkanto work, but you may not get OSD if you use this.
Set the frames per second to the proper frame rate for your Flash game.
Setting it too low will incorrectly speed up the game, squander viable input frames, and reduce the encode quality. And setting it too high will cause Ruffle to freeze - although if for some reason you need the higher framerate, Ruffle may still work with
Runtime -> Time tracking -> clock_gettime()checked.
Since Nightly 2023-02-25, Ruffle can print SWF info to the terminal if you launch libTAS with the following command:
RUST_LOG=ruffle_core=info libTAS | grep "Loaded SWF version"
For ealier Ruffle releases (though the new releases are mostly sync compatible with the old ones), you can open up a terminal and install
exiftoolfirst with this command:
sudo apt install libimage-exiftool-perl
And then use this command:
This will list information about the
.swf, including the frame rate.
Some Flash games are domain locked, meaning that you can only run them on specific websites. To get these games to work on the desktop version of Ruffle, you can trick the game into thinking it's on the correct website. As of nightly-2022-10-23, you can use the command-line parameter
--spoof-url http://example.yoururlhereto feed the game any URL you want.
If Ruffle is not working with Nvidia drivers, run the following commands and reboot your PC:
sudo apt install ubuntu-drivers-common sudo apt install nvidia-driver-525 && nvidia-cuda-toolkit sudo apt install ubuntu-restricted-extras && sudo apt install ubuntu-restricted-addons
Now Ruffle should run under libTAS, just make sure to have the Force software rendering option checked. If Ruffle fails to launch natively when using OpenGL, run
export LIBGL_ALWAYS_SOFTWARE=1and then run it in the same terminal window.
We allow submissions using Ruffle with libTAS. Please follow these guidelines to ensure your movie is acceptable and can be synced:
- Follow all rules already in place for submitting libTAS movies.
- Keep in mind our rules on emulation accuracy. Ruffle is incomplete and may not run games perfectly. If your movie has severe emulation problems or uses glitches not present in Adobe Flash Player, your submission may be rejected.
- Make sure your movie starts with no save data! Having your own save data present may cause desyncs when other people try to run your movie. To delete your save data, go to
~/.local/share/ruffle/SharedObjects/localhost/followed by the path of your
.swf- e.g. if your
/path/to/yourgame.swf, the save data will be in
~/.local/share/ruffle/SharedObjects/localhost/path/to/yourgame.swf/. Delete any
.solfiles in this folder (if this folder does not even exist, you're already all set).
- When making a libTAS movie that you plan to submit to TASVideos or upload it to userfiles, put
Platform: Flashat the very start of the movie annotations, that way the site will recognize your platform properly.
- In your description or movie annotations, please provide the following:
- libTAS version
- A link to the nightly Ruffle build you used
- Filename and MD5 hash of your
md5sum yourgame.swfin a terminal)
- JPEXS Free Flash Decompiler - You can use this to look at the code for any
.swf. Extremely useful for figuring out how your game works as well as exploiting game environments and restrictions.