Skip to content
A parser for Project Slippi replay files
Haxe
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/slippihx
.gitignore
LICENSE
README.md
haxelib.json
shiftjis.dat

README.md

SlippiHx

haxelib git tink_json https://github.com/haxetink/tink_json

import slippihx.SlpDecoder;
import slippihx.SlpTypes;


class Main {
    var slp = SlpDecoder.fromFile('replay.slp');
    var metadata: SlpMetadata = slp.metadata;
    trace(metadata.startAt);
    // >>   2019-03-29T19:52:11Z
    var rawData: Vector<UInt> = slp.raw;
    trace(rawData);
    // Vector bigger than Leffen winning EVO.
}

On ActionScript3, Flash and JavaScript SlpDecoder.fromFile() is not available because it uses the the filesystem to read a file, and those targets don't have support for that out of the box. For AS3 and Flash, you can use OpenFL. For JavaScript, you can use hxnodejs to read files and then:

// Must include '-lib hxnodejs'
import slippihx.SlpDecoder;

class Main {
    var bytes = sys.io.File.read('replay.slp', true).readAll();
    var slp = new SlpDecoder(bytes);
    // Use SlpDecoder normally...
}
You can’t perform that action at this time.