MCPcopy Index your code
hub / github.com/LtPeriwinkle/mist

github.com/LtPeriwinkle/mist @v1.15.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.15.1 ↗ · + Follow
152 symbols 321 edges 24 files 63 documented · 41%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

mist

Lines of code

a minimal, improved speedrun timer

Changelog

Latest Release

Planned features

Once all planned features are complete, I will likely stop developing this and only squash bugs etc. More might still be added to this list.

  • [X] Cross platform
    • [X] Linux
    • [X] Windows
    • [X] MacOS (or it was in the past, as I cannot build or test it on a mac)
  • [X] Human-readable split file (using ron)
  • [X] LiveSplit split file transposing (split tool)
  • [ ] (limited) customizability
    • [X] custom fonts/font sizes
    • [X] custom colors
    • [X] keybinds
    • [X] timer backgrounds
    • [X] panels (sum of best etc)
    • [X] time rounding (30/60/off)
    • [ ] very limited timer layout (i.e. use two rows for splits like option available in LiveSplit)
  • [ ] split file creation tool
    • [ ] edit existing msf
    • [ ] convert lss to msf
    • [ ] create new splits
    • [ ] actually good and usable (hardest part)
  • [X] fps-based time conversion (so that the timer always ends on a time that corresponds to a possible frame time)
  • [X] dynamic colors
  • [X] different run comparisons
    • [X] sum of best
    • [X] pb
    • [X] none
    • [X] average
  • [X] hot reloading
    • [X] split file reloading
    • [X] config reloading
  • [ ] plugins
    • [ ] autoloading from plugins directory (probably run as some kind of child process thing?)
    • [ ] communicate with plugins through ipc (i.e. unix socket, windows named pipe)
    • [ ] plugins that are shipped with this repo (a discord presence, some kind of notes plugin, maybe more)
  • [ ] search for config/assets in standard os-specific dirs rather than hard-coded one (allows for packaging, installation, etc)
  • [X] better way to find fonts than paths in config file
  • [X] skip splits (because somehow i missed this all along)

Unplanned features

These features will not be implemented, in the spirit of minimalism (and maybe because I don't want to).

  • Autosplitters
  • Horizontal timer layout
  • Ingame time
  • Internet time sync
  • SRC/SRL/splits.io/racetime.gg integration
  • GIFs
  • Split icons

Installation

Compiling from source

Probably the best way to try this out is to compile it from source. To do this you need rust installed, and an installation guide for that can be found here.

Features

This package provides two features, bg and icon. icon sets the icon of the application when it is running, and requires sdl2_image. bg allows for configuration of a background image, and requires both sdl2_image and sdl2_gfx. To use only icon (removing gfx requirement), append

--no-default-features --features=icon

to the cargo commands below. For only bg, do the same except replace icon with bg. Finally, to remove both, remove the --features altogether.

When you run mist, make sure it is in the same directory as the assets directory or else it won't work.

Linux

Requirements are SDL2, SDL2_Image and SDL2_TTF shared libraries, as well as development libraries. On ubuntu:

sudo apt-get install libsdl2-2.0.0 libsdl2-ttf-2.0.0 libsdl2-image-2.0.0 libsdl2-gfx-2.0.0 libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-gfx-dev

On arch:

sudo pacman -S sdl2 sdl2_ttf sdl2_image sdl2_gfx

Clone this repo (git clone https://github.com/LtPeriwinkle/mist), enter the directory, and run cargo build --release. Move the resulting binary from ./target/release/ into the repository root (or just the same folder as assets/) to run.

Windows

Follow this guide to set up your SDL dependencies. You will have to follow this process for SDL2, SDL_Image and SDL2_TTF, whose development stuff is available here and here. I had to use vcpkg to get sdl_gfx and then copy the .lib file to the folder specified by in the guide.

Compile with cargo build --release then move the exe as well as the sdl related dlls into the same folder as the assets folder to run it.

MacOS

Install sdl2, sdl image, sdl gfx and sdl ttf. Using homebrew:

brew install sdl2 sdl2_image sdl2_ttf sdl2_gfx

Then you should be able to run cargo build --release.

Usage

The default keybinds are:

  • F1: Open new split file
  • Space: Start/split/stop
  • Enter: Pause
  • R: Reset
  • : Previous comparison
  • : Next comparison
  • Mousewheel: Scroll splits up/down (if there are more than fit in the window)

Configuration

Mist reads configuration info from assets/mist.cfg in the directory where its executable is located. You can find more information about the configuration file and split file formats here.

Credits

Thanks to Xeryph and Komali for testing, bug reports, and help on things.

Licensing

Like Rust itself, mist is licensed under MIT or Apache 2.0, at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

Core symbols most depended-on inside this repo

pb_times
called by 22
crates/mist-core/src/timer/run.rs
render_text
called by 16
src/render.rs
gold_times
called by 14
crates/mist-core/src/timer/run.rs
into
called by 12
crates/mist-core/src/parse/msf.rs
split_time_sum
called by 10
crates/mist-core/src/timer/format.rs
parse
called by 9
crates/mist-core/src/parse/msf.rs
write
called by 9
crates/mist-core/src/parse/msf.rs
split_time_text
called by 8
crates/mist-core/src/timer/format.rs

Shape

Method 93
Function 33
Class 19
Enum 7

Languages

Rust100%

Modules by API surface

crates/mist-core/src/timer/run.rs21 symbols
src/render.rs19 symbols
crates/mist-core/src/config/config.rs16 symbols
crates/mist-core/src/timer/instant.rs14 symbols
crates/mist-core/src/timer/state.rs12 symbols
crates/mist-core/src/timer/format.rs12 symbols
crates/mist-core/src/parse/msf.rs10 symbols
src/splits.rs9 symbols
crates/mist-core/src/dialogs.rs7 symbols
src/panels.rs6 symbols
crates/mist-split-tool/src/main.rs4 symbols
crates/mist-core/src/parse/lss.rs4 symbols

For agents

$ claude mcp add mist \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact