View Page Source

Revision (current)
Last Updated by Info Teddy on 4/15/2022 6:06 PM
Back to Page

[https://github.com/ruffle-rs/ruffle|Ruffle] is an Adobe Flash Player emulator written in the Rust programming language. The Linux version can be used in conjunction with [https://github.com/clementgallet/libTAS|libTAS] to make tool-assisted speedruns of Flash games.

%%TOC%%

!!! What you'll need

* [https://github.com/clementgallet/libTAS/releases|libTAS 1.4.3] or newer.
** Remember that the run must sync on an [MovieRules#UseAnOfficialEmulatorVersion|official emulator version] or it will not be accepted.
* [https://github.com/ruffle-rs/ruffle/releases|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 {{.swf}} format. 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.

__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 [https://github.com/ruffle-rs/ruffle/issues|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 vulkan}} to 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.
** If you don't know what it is, you can open up a terminal and install {{exiftool}} first with this command: %%% {{sudo apt install libimage-exiftool-perl}} %%% And then use this command: %%% {{exiftool /path/to/yourgame.swf}} %%% This will list information about the {{.swf}}, including the frame rate.

__You will definitely want to put in the proper framerate for your game!__ Setting it too low will 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 will still work with {{Runtime -> Time tracking -> clock_gettime()}} checked.

!! Nvidia drivers

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 -y nvidia-driver-440 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=1}} and then run it in the same terminal window.

!!! Movie submissions

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 [EmulatorResources/LibTAS#MovieSubmissions|submitting libTAS movies].

* Keep in mind our [MovieRules#GameplayMustBeAccurateToHardware|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 {{.swf}} is in {{/path/to/yourgame.swf}}, the save data will be in {{~/.local/share/ruffle/SharedObjects/localhost/path/to/yourgame.swf/}}. Delete any {{.sol}} files 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: Flash}} at 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 {{.swf}} (use {{md5sum yourgame.swf}} in a terminal)