TASVideos

Tool-assisted game movies
When human skills are just not enough

Emulator Resources / lib TAS / LTM Format

<< Emulator Resources / lib TAS
<< Emulator Resources

The tool records inputs into a movie file which has a .ltm extension. It is actually a tar.gz archive which contains three text files.

Config

The first one is config.ini, containing all meta-data of the movie file. It consists of a list of key/value pairs. Here is an example of such a file, with added comments:

  [General]
  authors=me ; authors of the movie
  frame_count=81 ; frame count of the movie file
  framerate_den=1 ; denominator of the number of frames per second
  framerate_num=60 ; numerator of the number of frames per second
  game_name=SuperMeatBoy ; name of the game executable
  initial_time_nsec=0 ; number of nanoseconds of the initial system time
  initial_time_sec=1 ; number of seconds of the initial system time
  keyboard_support=true ; are keyboard inputs sent to the game
  libtas_major_version=1
  libtas_minor_version=3
  libtas_patch_version=0
  mouse_support=true ; are mouse inputs sent to the game
  nb_controllers=0 ; up to 4 controllers are supported
  rerecord_count=0
  savestate_frame_count=13 ; savestate frame for savestate movies
  ; Time hack values
  [mainthread_timetrack]
  clock=-1
  clock_gettime=-1
  gettimeofday=-1
  sdl_getperformancecounter=-1
  sdl_getticks=-1
  time=-1
  [secondarythread_timetrack]
  clock=-1
  clock_gettime=-1
  gettimeofday=-1
  sdl_getperformancecounter=-1
  sdl_getticks=-1
  time=-1

Inputs

The second file is the inputs text file. In this file, each line that starts with the character '|' is an input frame. The content of one line depends on the three settings keyboard_support, mouse_support and nb_controllers above.

If keyboard_support=1, a list of Xlib KeySym (u32) values of each pressed key is appended to the line. They are encoded into an hex string and separated by the ':' character. The list ends with the '|' character.

If mouse_support=1, mouse inputs in the format: xpos:ypos:12345 are appended to the line. xpos and ypos are x and y coordinates of the pointer (i32) in decimal strings (can be negative). This is followed by 5 characters which are either a digit if the corresponding mouse button is pressed, or the character '.'. When decoding the file, the code only checks if the character is a '.' or not. The list ends with the '|' character.

For each controller from 1 to nb_controllers, the corresponding controller inputs is appended to the line, in the format: axis_left_x:axis_left_y:axis_right_x:axis_right_y:trigger_left:trigger_right:ABXYbgs()[]udlr. The first 6 values are the axis values (i16) encoded in decimal strings. Then each character is either a button character or '.', indicating if the corresponding button was pressed or not. The order of the buttons are:

Each controller inputs end with the '|' character.

Annotations

The third file is the annotations.txt text file, containing movie annotations.


Combined RSS Feed
EmulatorResources/libTAS/LTMFormat last edited by feos on 2018-09-12 18:10:55
Page info and history | Latest diff | List referrers | View Source