General
libTAS has been initially developed to support games that are using Simple DirectMedia Layer (SDL) for rendering (both software and OpenGL rendering). SDL is a cross-platform library for developing games. It is used in many commercial Linux games, either directly, or by using a high level framework that uses SDL as an intermediate layer. This includes FNA, a reimplementation of Microsoft XNA, or Chowdren, a cross-platform runtime for Clickteam Fusion games.
There has been some development to handle low-level rendering/inputs to support more games, including GameMaker Studio or Unity games.
Also, Steam games are partially supported right now. We can't let the game connect to Steam because Steam is messing with our code injection by spawning multiple processes and injecting code itself (such as game overlay). To fix that, a dummy Steam library is implemented, but it is still under development and games have many ways to connect to Steam so this does not work for all games yet. On the game compatibility below, it is noted if the Steam version of the game is supported. If not, you must use a drm-free version, except if the Steam game is or can be made drm-free.
Rendering
LibTAS supports SDL1 software rendering, SDL2 software and OpenGL rendering, and low-level GLX (OpenGL) rendering.
Inputs
Supported inputs are:
- Keyboard: SDL1, SDL2 and Xlib
- Mouse: SDL1, SDL2 and Xlib
- Joystick: SDL1, SDL2, jsdev module (reading /dev/input/jsX) and evdev module (reading /dev/input/eventX)
Audio
Audio playback needs to be controlled for a correct playback when game is paused, and for audio dumping. Audio sources are intercepted from the audio library calls made by the game, and are mixed together by libTAS and played back at frame boundaries. The currently supported high-level audio libraries are SDL1 Audio, SDL2 Audio and OpenAL. Also, low-level ALSA API is supported, so that other high-level libraries (like FMOD) are still working.
Compatibility
Engine Compatibility
This is a list of game engines/frameworks that libTAS should be able to run, with their specific settings. Most games of the indicated engines should run fine with the required settings. Some games may be noted as not compatible in the next section.
- LÖVE framework (only >11.1 was tested): no specific settings are required. Some games using this framework are indicated on the website.
- GameMaker Studio games need
Runtime > Time tracking > clock_gettime()
to prevent softlocks. If the Steam version is running, you may need to take several libraries from Steam runtime ("~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/") to the game library folder (such as "libcrypto.so.1.0.0" and "libssl.so.1.0.0"). Here are two lists of games using this engine. - FNA / MonoGame games may need
Runtime > Time tracking > clock_gettime()
to prevent softlocks. Also, some versions of mono needRuntime > Recycle threads
unchecked to prevent crashes when threads exit. Here are two lists of games using this engine. - Unity: not much tested compared to the other engines. Because it is using mono, it requires the same settings as FNA/MonoGame. Some Unity games have a configuration screen which needs to be bypassed by relocating or removing ScreenSelector.so bundled with the game. In libTAS v1.3.2 and below, Audio library may choose PulseAudio driver instead of ALSA, making the audio not hooked. Uninstalling pulseaudio solves the issue. The command-line option "-force-gfx-direct" should be used to enforce rendering on the main thread. This greatly improves determinism. Here is a guide to port Windows games on Linux.
- Chowdren is a runtime for Fusion and Construct games. No specific settings are required. A list of games is indicated on the main page.
Recreated Engine Compatibility
Taken from this post, thanks to Slamo for gathering all this data.
- ScummVM does not require specific settings. See the list of supported games.
- Abuse (Abuse) and a recent SDL2 fork. Go into the ".abuse" folder and open
abuserc
, then set fullscreen to be 0. - DXX-Rebirth (Descent, Descent 2): open d1x-rebirth/d2x-rebirth by itself first and turn fullscreen off. Needs
Runtime -> Time tracking -> SDL_GetTicks()
to be checked. - PrBoom+ (Doom). Needs
Runtime -> Time tracking -> SDL_GetTicks()
to be checked. - Chocolate Doom (Doom, Heretic, Hexen, Strife). Softlocks at OPL init, run
chocolate-xxx-setup
and disable music. - Strife: Veteran Edition (Strife: Veteran Edition). Needs
Runtime -> Time tracking -> SDL_GetTicks()
to be checked. - EDuke32 (Duke Nukem 3D). A couple things to set up: First, run eduke32 and uncheck "Always show this window at startup". In the game, go to Options -> Display Setup -> Video Mode, then set Renderer to Classic (or else it will look like clown vomit in libTAS). Set windowed mode as well, as it defaults to fullscreen. In libTAS, needs
Runtime -> Time tracking -> SDL_GetTicks()
to be checked. - QuakeSpasm (Quake) does not require specific settings.
- OpenMW (Morrowind). Loading a savestate often softlocks the game
Emulator Compatibility
Having an emulator compatible with libTAS does not mean that submissions of games running inside this emulator are accepted. I suggest you contact one of the TASVideos staff member if you are interested in such submission, or wait for an official statement.
- DOSBox (DOS). Needs to set fixed cycles in dosbox.conf, otherwise it will run extremely slowly. Needs
Runtime -> Time tracking -> SDL_GetTicks()
to be checked. - DOSBox-X (DOS). Write a config file with "config.com -all -wc" and set the cycles to a fixed amount, otherwise it will run extremely slowly. Needs
Runtime -> Time tracking -> SDL_GetTicks()
to be checked. - MAME (arcade/consoles). See the specific topic.
- PPSSPP (PSP). There is a fork that enforces a single-threaded execution to get determinism, but is still under work. The hotkey "Speed toggle" must be set (In System > Controls > Control mapping) and pressed at the beginning of the run to unthrottle the emulation. Option
Runtime > Backup savefiles in memory
must be disabled. In ppsspp.ini, setEnforceSingleThreaded = True
andSoftwareRenderer = True
. See the specific topic and the repository issue on this subject. - Citra (3DS). The SDL frontend (
citra
) must be used. Edit the config file in "~/.config/citra-emu/sdl2-config.ini", go to the "Audio" section and set "output_engine = sdl2" to force using sdl2 audio. See the specific topic. - Gnash (Flash). See the specific topic.
- PCem (IBM PC). There is a fork that removes multi-threaded code for determinism. See the specific topic for configuration.
- FS-UAE (Amiga). There is a fork that removes multi-threaded code for determinism, and a PR has been opened on the upstream repository. Setting
Runtime > Wait timeout > Finite waits
is required.
Game Compatibility
This list contains games that don't use the above engines, or require specific settings.
Game | Framework | Steam | Comments |
---|---|---|---|
1001 Spikes | ??? | Yes | Needs to create a file steam_appid.txt containing the Steam appId |
Braid | SDL1 or SDL2 | ??? | Offset between system and game cursor |
Dead Cells | Heaps/SDL2 | ??? | Needs Time tracking > gettimeofday() to prevent softlocks, randomness not controlled, audio effects not supported |
Dustforce | SDL2 | ??? | |
Limbo | SDL2 | ??? | Needs Time tracking > SDL_GetPerformanceCounter() to prevent a softlock at startup |
Metal Slug | SDL2 | ??? | |
Osmos | ??? | ??? | Needs Time tracking > gettimeofday() to prevent softlocks |
Shovel Knight | SDL2 | Yes | |
SteamWorld Dig | None | ??? | Needs Time tracking > clock_gettime() to prevent a softlock at startup |
SteamWorld Dig 2 | SDL2 | ??? | Needs Time tracking > SDL_GetPerformanceCounter() to prevent a softlock at startup, variable loading times |
Spacechem | Tao/SDL2 | ??? | |
Super Hexagon | SDL2 | ??? | |
Super Meat Boy | SDL2 | Yes | |
The End Is Nigh | SDL2 | Yes | Variable splash screen time |
Volgarr | SDL2 | ??? | Needs -vsync=2 to get consistant startup. Variable loading time between levels, removed by a game setting |
VVVVVV | SDL2 | ??? | fps is 1000/34, letterbox mode forces 320x240 because logical size is not supported |
Wonder Boy: The Dragon's Trap | SDL2 | Yes |
Game | Framework | Steam | Comments |
---|---|---|---|
Antichamber | Unreal Engine | ??? | Crash at startup. Issue |
Enter the Gungeon | Unity | Yes | Prompts the game window then crash. Spawns more than 30 threads! |
Guacamelee | SDL2 | ??? | Softlock at splashscreen. Issue |
Hotline Miami | Qt5 | ??? | Instable. Common freezes, relies entirely on time hack, rendering thread is not main thread (thanks Qt...)! |
La-Mulana Remake | SDL2 | ??? | Only run with Uncontrolled time and Native events . At least three different threads render on screen (wtf) |
Papers Please | OpenFL | ??? | Softlocks at startup. Uses SDL Timer which is not supported |
Steredenn | Unity | Yes | Prompts the game window then crash. Spawns more than 30 threads! |