This documentation is OUTDATED! Go to /projects/mist/ instead!
Overview
mist
(https://github.com/LtPeriwinkle/mist) is a speedrun timer written in Rust, targeting mainly Linux, but mostly supporting Windows and macOS. It started out as a series of projects that I used to learn Rust, back in 2019 or something. LiveSplit is essentially the
industry standard when it comes to speedrun timers, but it only runs on windows, weighs 80MB, and doesn't really behave under wine, so I struck out to Make A Linux Speedrun Timer. Other options were out there but they either didn't work for me or
were horribly unmaintained. The first attempts looked about how you can expect beginner projects to, but I feel that the current state of mist (in code, at least, if not functionality) is something I can be proud of. It's still incomplete, but should be
usable for a majority of usecases. mist will never support the plethora of features available in LiveSplit, but it aims to be a competent tool containing most useful functionality.
Split files
mist stores information about a speedrun and its associated times in a ron file that looks something like this.
version 1
(
game_title: "The Legend of Zelda: Breath of the Wild",
category: "Any%",
offset: None,
pb: 9034,
splits: [
"stop",
"old spice",
"sisengam",
"boom beach",
"ghost",
"robbery",
"fireblight ez",
"no reset",
"the farm",
],
pb_times: [
904,
1020,
1004,
953,
987,
1021,
1037,
1087,
1021,
],
gold_times: [
904,
1020,
953,
953,
987,
1021,
1037,
318,
1021,
],
sum_times: [
(3, 7209),
(3, 7091),
(3, 6957),
(3, 7057),
(3, 7810),
(3, 7260),
(3, 8194),
(3, 6405),
(3, 7794),
],
)
I think a lot of the elements are fairly self-explanatory but here we go.
version 1
: tells mist what version of split file this is.game_title
: the title of the game; used in the window titlecategory
: the speedrun being performed; same as above.offset
: the starting offset of the run, in milliseconds.Some(1200)
means the timer starts at -1.200 seconds. A value ofNone
means no offset.pb
: the personal best time, in milliseconds.splits
: an array of split names. can be empty for no splits.pb_times
: array of the times that each split took on the personal best run (i.e. the one that set the time frompb
.) Must have the same number of elements assplits
.gold_times
: array of the best ever times for each split. Must have the same number of elements assplits
.sum_times
: array of tuples containing the number of attempts of each split and the total time spent on the split, respectively. Used for calculating averages. Must have the same number of elements assplits
.
Configuration
mist currently reads its configuration from the location assets/mist.cfg
relative to the location of the binary, although this will be changed eventually. A
configuration file is also in the ron format, and looks like this. In fact, this is the default config file.
![enable(implicit_some)]
(
def_file: None,
img_file: None,
img_scaled: false,
colors: ((0, 255, 0), (255, 0, 0), (255, 90, 90), (135, 255, 125), (255, 255, 0), (0, 0, 0)),
frame_rounding: 30,
layout: (
inline_splits: true,
panels_top: false,
timer_top: false,
),
panels: [],
t_font: (
system: false,
path_name: "assets/DejaVuSans-Bold.ttf",
),
s_font: (
system: false,
path_name: "assets/DejaVuSans.ttf",
),
font_size: (60, 25),
binds: (
pause: "Return",
reset: "R",
start_split: "Space",
skip_split: "Right Shift",
un_split: "Backspace",
prev_comp: "Left",
next_comp: "Right",
load_splits: "F1",
load_config: "F2",
),
)
The elements of the file are as follows:
def_file
: the split file that mist should try to open on startup.None
to prevent this behavior.img_file
(available with bg feature enabled): the path of the image to use as the timer background, orNone
for no background.img_scaled
(available with bg feature enabled): whether the image should be scaled to fit the timer window, or cropped.colors
: the colors used for the timer's various displays. In order they are:(0, 255, 0)
: ahead of comparison run(255, 0, 0)
: behind comparison run(255, 90, 90)
: gaining time(135, 255, 125)
: losing time(255, 255, 0)
: gold(0, 0, 0)
: background of timer window
frame_rounding
: what framerate mist should round times to on pause or finish, orNone
for no rounding. See frame rounding for more details.layout
: mostly unused controls for mist layout.inline_splits
: whether the split name and time should be in the same row, or on separate rows.
panels
: array of information panels to display on the timer. See panels for more details.t_font
: the font to use for the large timer.system
: whetherpath_name
is the name of a system font (true
) or a path to a ttf file (false
)path_name
: either the name of a system font or the path to a ttf file, depending on the value ofsystem
.
s_font
: the font to use for the splits and panels.system
: whetherpath_name
is the name of a system font (true
) or a path to a ttf file (false
)path_name
: either the name of a system font or the path to a ttf file, depending on the value ofsystem
.
font_size
: tuple containing the size of the timer font and the size of the splits font, respectively.binds
: keyboard bindings for functions in mist.pause
: pause the timer during a run. Also unpauses.reset
: stop a run and clear the timer.start_split
: start a run, or advance through the splits in a run.un_split
: undo a split, returning to the previous split with the current elapsed time.prev_comp
: change the timer to the previous comparisonnext_comp
: change the timer to the next comparison.load_splits
: open a dialog prompting for a new split file to load.load_config
: open a dialog prompting for a new configuration file to load.
Frame Rounding
Time is, of course, continuous, meaning that a stopwatch or speedrun timer could theoretically display any sub-second value when stopped. However, this may be undesirable, for example in
extremely short runs or just ones that require precise timing. Since games have discrete frames, it must take an integer number of frames to complete a run, which means that depending on
the framerate of the game, only certain time values are "actually possible". mist supports displaying times compliant with any framerate, as specified by the frame_rounding
configuration
option. An example of frame rounding at 30 fps is as follows:
Real Time | Rounded Time |
---|---|
1.456 | 1.467 |
0.633 | 0.633 |
3.913 | 3.933 |
4.892 | 4.900 |
Panels
Panels are used to display additional information about the speedrun in mist. There are three types of panels that can be put into the panels
configuration option:
SumOfBest, Pace, and CurrentSplitDiff. SumOfBest shows the sum of the runner's golds, theoretically their best possible time. Pace shows a "prediction" for the pace of the run, depending on
the current status, such as how far behind or ahead the runner is. CurrentSplitDiff shows how far ahead or behind the runner is currently from the time on the current split that they are
comparing against.
The latter two are configurable as follows:
Pace( golds: true ),
CurrentSplitDiff( golds: false )
The golds
option tells mist whether to compare against pb or against golds when calculating the times to display on these panels.