Giter Site home page Giter Site logo

vinceau / slippi-stats Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 7.0 163.3 MB

Instantly compute Slippi stats and beautifully render the results

Home Page: https://vinceau.github.io/slippi-stats/

License: MIT License

HTML 4.46% TypeScript 88.87% SCSS 0.90% JavaScript 5.78%
slippi smash ssbm melee stats

slippi-stats's Introduction

Slippi Stats Graphic Generator

Automatically generate Summit-style Slippi set stats. Say that 5 times.

Instantly compute Slippi stats in-browser and beautifully render the results. Perfect for both tournament broadcasts and competitors.

Screenshot

generated slippi stats screenshot

Features

  • Extremely fast offline stats computation
  • Easy drag-and-drop into OBS
  • Highly customizable
  • No download required
  • Free and open source

Usage

  1. Go to https://vinceau.github.io/slippi-stats/
  2. Drag and drop your SLP files
  3. Click "Generate Stats"
  4. Drag the OBS button into OBS to instantly create a source

animated gif showing the usage

FAQ

The detected winner is incorrect!

Determining who wins a game seems easy at first but once you consider the possibilities of LRAS and quitting out of games, it's actually non-trivial. If the detected winner is incorrect, you can fix the set count by clicking on the head-to-head images.

how to change the game winner

How do I show different stats?

First click the customize stats button in the top right of the SLP file list to show the list of available stats. Then toggle the checkboxes to enable and disable certain stats from being calculated.

how to customize stats

How do I change the color scheme?

Expand the options panel at the bottom to show some more customization options.

how to change the color scheme

How do I remove the background in OBS?

Just add this to the Custom CSS in the source properties.

body {
  background: none !important;
}

Dragging the OBS button doesn't work!

If you're using Streamlabs OBS (SLOBS), or just can't get it to work in normal OBS, just copy the browser URL and create a new browser source as you normally would for a website.

How does it work?

It reads your SLP files locally and does all the computation in-browser. Nothing is sent to any servers so this works offline too! This allows very fast Slippi game parsing so you can generate these graphics instantly.

Development

Setup

Clone the repo and install dependencies:

git clone https://github.com/vinceau/slippi-stats
cd slippi-stats
yarn install

In the project directory, you can run:

yarn run start

This runs the app in the development mode. Open http://localhost:3000 to view it in the browser. The page will reload as you make changes.

To build the app for production, run:

yarn run build

Adding Custom Stats

You can add custom stats by extending the StatDefinition interface as defined in lib/stats/types.ts.

export type StatCalculation = (games: GameDetails[], playerIndex: number) => StatCalculationResult;

export interface StatDefinition {
  name: string;
  type: string;
  betterDirection?: string;
  recommendedRounding?: number;
  calculate: StatCalculation;
}

See firstBlood.ts and lCancelAccuracy.ts for an example of custom stats implementations.

Once you have a custom stats definition, simply give it an ID in lib/stats/types.ts and register the definition in lib/stats/compute.ts.

Acknowledgements

This project was made possible by:

License

This software is released under the terms of MIT license.

slippi-stats's People

Contributors

dependabot[bot] avatar vinceau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.