ReTux


Creating Timelines

Timelines are special scripts located in "data/timelines" which are executed within levels. They are written in a custom mini-language which can also include Python calls if necessary. Timelines should be used for things like cutscenes and special level events.

Because ReTux is licensed under the GNU GPL and timelines link to ReTux, all timelines legally must be under a GPL-compatible license. Please indicate such a license with a comment or series of comments at the top of the timeline. See the timelines included with ReTux for an example.

Table of Contents

Timeline Syntax

ReTux timelines are standard JSON files connecting moments of time with lists of instructions.

The base of any timeline is an object with "steps" in time from the moment the timeline started as keys, and lists of strings indicating instructions as values. A step is 1/56 of a second.

Each instruction consists of a command followed by an argument, separated by whitespace. The argument may be interpreted as multiple arguments depending on the command; in this case, arguments are separated by whitespace, but the final argument expected includes the entire remaining text. For example, if the "spam" command takes two arguments, the instruction "spam a b c d" will result in the first argument being "a" and the second argument being "b c d". If a command starts with or is a "#" character, the instruction is treated as a comment and not interpreted.

Commands

The following commands are available for use in timelines: