Urn, a speedrunning split timer software for Linux (LiveSplit alternative)

2020-11-20

(last time edited: 2021-02-16)

tags: linux, games

LiveSplit One

LiveSplit One is a version of LiveSplit that uses the multiplatform livesplit-core library and web technologies like React to create a new LiveSplit experience that works on a lot of different platforms.

I speedrun and stream Super Mario 64 on my spare time and I've been using LiveSplit One which is a Web Assembly cross-platform port of the same LiveSplit software that works only on Windows. LiveSplit One is great, works wonders, runs only on web but you can even compile it yourself in your personal workstation using Rustup and node + npm and run it on localhost. Once it's running on localhost you connect to it via web.

The instructions to compile LiveSplit One are very simple and they are explained on its GitHub repository.

However, fuck the web.

I prefer using something simpler written in C with a boomer GUI.

This is where Urn comes to play. If you are wondering what does Urn even mean, click here. Urn features a simple GTK+3 interface and you can edit CSS themes with no hassle.

Urn

Urn is a simple split tracker hacked together by 3snowp7im. It was originally written because there were no exisiting solutions for split tracking with a delayed start available on *nix platforms.

Urn requires libgtk+-3.0, x11 and libjansson.

There are multiple forks of the same program. You can choose whatever you want looking in the network graph.

How to Install Urn

First make sure you filled all dependencies.

In my personal Void Linux distribution I had to install gtk+3-devel and jansson-devel to compile it.

And if you take a look at Urn's GNUmakefile requires ImageMagick, rsync, gsettings-desktop-schemas, pkg-config and the typical userspace Unix coreutils bins (cp, mkdir, rm) to install it correctly.

Ok, let's get dirty.

First clone the GitHub repository.

$ git clone https://github.com/xPMo/urn ~/urn

Now without changing directory just compile the binaries.

$ make -C ~/urn

Use sudo or enter as root (administrator) account to install Urn in your system.

$ sudo make -C ~/urn install

First steps on Urn

The cursor is hidden by default, in order to change this behaviour run this command.

$ gsettings set wildmouse.urn hide-cursor false

Don't worry if your program shows a completely black interface. We need to load a file containing splits.

Open up ~/urn/splits/sotn.json. The json file format is very simple to modify as you wish. Feel free to experiment and spend lots of time trying different settings.

Now you might be wondering how to change the fonts, colors and everything. Here are some examples you can git clone/download and copy into a directory you'll have to create.

$ git clone https://github.com/3snowp7im/urn-themes ~/urn-themes

$ mkdir -p ~/.urn/themes

$ cp -r ~/urn-themes/* ~/.urn/themes

The next step is changing the default theme using gsettings. Urn was compiled using specific settings listed in ~/urn/urn-gtk.gschema.xml. We can change those settings on the fly by using gsettings.

With this command you can change the theme.

$ gsettings set wildmouse.urn theme material-esque

You are also able to change keyboard shortcuts using gsettings. For example...

$ gsettings set wildmouse.urn keybind-start-split Alt_R

If you wanna preserve all these settings by default in your program then you will have to edit ~/urn/urn-gtk.gschema.xml with your favorite text editor and recompile the program. This is useful if you keep a copy of the source code across computers. But it's not truly necessary. Gsettings saves your temporary settings in ~/.config/glib-2.0/settings.

Now that we know the basics we can try making our own .css. If you are not familiar with CSS this is a good opportunity to start learning.

Remember, your personal themes and splits should be always saved inside ~/.urn.

$ mkdir -p ~/.urn/splits

$ mkdir -p ~/.urn/themes

If you speedrun different games a good idea is to have different looking themes and specify the css theme name for each .json file.

Example of my personal ~/.urn/splits/sm64.json:

{
    "title": "Super Mario 64 - 70 Stars",
    "theme": "sm64",
    "attempt_count": 72,
    "splits": [
        {
            "title": "Bowser in the Dark Sky",
            "time": "0.000000",
            "best_time": "13:26.000000",
            "best_segment": "13:26.000000"
        },
        {
        "title": "Bowser in the Fire Sea",
        "time": "0.000000",
        "best_time": "24:26.900000",
        "best_segment": "24:26.900000"
        },
        {
            "title": "Bowser in the Sky",
            "time": "0.000000",
            "best_time": "37:47.210000",
            "best_segment": "37:47.210000"
        }
    ],
    "width": 320,
    "height": 506
}

Happy hacking!