Project Slippi Public Release

Writing History

Jas Laferriere
project-slippi
8 min readJun 17, 2018

--

Download

If you are simply looking for a download link, join the Discord. For a demo of the launch functionality, watch this video. If you are interested in learning more about the project, read on!

Introduction

It’s a tragedy — to date we have lost nearly 17 years of Melee competition data. The classic games that we love will likely never be able to be recreated or analyzed beyond what can be inferred from videos. Further, the games with videos are the lucky ones as many important games never even got that much. The goal of this post is to discuss how we can better preserve and utilize Melee data going forward and what we, as a community and a sport, stand to gain from it.

Mission

In order to explain what can be achieved by preserving data, it might help to look at a different sport that has done a decent job of it. Chess games are commonly stored using a file called a PGN. A PGN describes every move in a game of chess. When you have a single PGN, that means you can allow any chess enthusiast to step through all of the moves of a game in which Paul Morphy dominated some poor soul way back in 1858. Pretty cool.

Things get even more interesting when you have hundreds of PGNs of Morphy’s games. You can display what his favorite openings were. You can show his win rate — with both colors. Maybe you can so far as to analyze in which positions Morphy was strongest, what were his most incredible moves? What were his worst blunders?

Then what if we have millions of PGNs from a variety of chess masters? All this data can be used to create tools with the ability to enrich every aspect of the sport.

And that is exactly the mission of the project.

  1. Create an easy to parse, data-rich replay file for Melee
  2. Make it extremely easy to obtain, upload, and share
  3. Use the replay files to enhance the fan/competitor/caster experience

So where are we?

There are untold possibilities for enhancing user experience and I simply don’t have the time to pursue them all myself. That is why everything in this project will be fully open source.

My focus so far has been to lay the groundwork required to get others involved. That said, part of getting people involved is generating excitement about the possibilities. Along with setting the groundwork, I’ve built a few features to showcase the power of having replay files. These will be discussed in the remainder of the post and my hope is that some readers will be inspired enough to become contributors.

The Replay File

I have defined a specification for the .slp replay file which can be found here. The replay file is really the heart of the entire project. The data contained includes:

  1. Game settings
    a. Character, color, port
    b. Stage
    c. Stocks, team attack, etc
  2. Character frame by frame info
    a. Controller inputs
    b. Action state, position, percent
  3. Metadata
    a. Time and date game played
    b. Platform played on — dolphin or console
    c. More to come

Generating Replays

The easiest place to start creating replays was Dolphin. Dealing with console is a bit more challenging and I figured could be added on later. The release includes a modified Faster Melee build that includes a toggle for “plugging-in” a Slippi device to port B. By selecting Slippi in Port B and having the recording code enabled, replays will automatically be saved to the Slippi folder in the directory of the emulator.

Slippi “plugged into” Slot B

Playback

The most obvious thing to do with a data-rich replay file is having the ability to play it back. I wanted to make this as easy as possible so I decided to make a cross-platform launcher application. You can think of this a bit like Spotify but for Melee replays. Currently it has a pretty limited feature set but in the future many features could be added for sharing, discovery, and organization of replays.

To use the launcher, simply set up the location of your root replay folder and your melee ISO and then proceed to browse and launch replays.

Launching a replay for playback

You can pause, play, and frame advance the replay using Dolphin’s tools (set up shortcuts for quick control). Currently skipping ahead or backwards is not possible outside of using Dolphin’s save state feature. This is a very clear place for improvement in the future.

In general I would like for the playback feature to feel as much like a video player as possible in the future. Ideally Dolphin’s display would be built directly into the application. There could then be tools for skipping, fast forward built directly into the player. It could even leverage a lot of the great work by people like Achilles, Dan Salvato, and UnclePunch to toggle on and off things like DI draw, controller inputs, action indicators, etc.

Stats

In 2017, my stats system was used to power stream overlays at Summit and Smash Rivalries by Yahoo Esports.

Stats stream overlay at Summit. Credit to Beyond the Summit

This was, in my opinion, a success — but there was a problem. The stats were being computed real-time and then sent to a server after the completion of the game. The source data by which the stats were calculated was entirely lost. This meant that if ever the stats calculation algorithms improved, the old stats would become antiquated. I realized what really needed to be stored was the underlying data for stats calculation, the replay data.

With this release, the replay file now exists. Stats calculation is currently embedded into the launcher application. The actual library that computes all the stats is maintained in a separate project and can be used by anyone interested in using it in other ways.

Game stats display

There is a ton of work here that could make the data more interesting, digestible, and relevant. Currently the application only supports displaying stats for individual games. Another future endeavor could allow for viewing and comparing stats by character, player, skill level, etc.

Contributing

The above details just about everything that exists so far. As already described, there are many avenues for improvement. To me those avenues fall under four major buckets:

  1. Collection — Making it easier to obtain replay data from emulator and console
  2. Playback — Improving the experience for playing back replays
  3. Stats — Enhancing the stats views and calculations
  4. Organization/Sharing — Creating new ways to organize, share, and distribute replays

If you have interest in any of the above, please join the Discord and introduce yourself! My hope is that anyone interested in working on something could post in the correct Discord channel, find out if others are working on something similar, and self-organize teams to work on different parts of the project. The dream is that we could all function as a team and work on a cohesive product together.

In the early phases, I will likely personally review any changes to the project. While I encourage people to contribute however they want, there needs to be some form of control to prevent the project from becoming a mess. Using GitHub’s pull request feature is likely how code changes will be controlled. I expect this will be a learning experience for me and I’m certainly willing to adapt and change to make things work.

For non-programmers

You do not have to be programmer to contribute. There are many other important avenues for helping the project grow. These include:

  1. Art — Could use a better icon for the application or other graphics/icons
  2. Discord admins/leaders — Helping keep people on topic and starting interesting discussions
  3. Design — Improved stats displays or general improvements for any screens. Also possibly ideas/concepts behind new screens and flows
  4. Content — Better documentation about various parts of the project
  5. Stats buffs— Coming up with common accepted language around stats. Defining the way we talk about stats and situations in melee.

If any of the above interests you, or if you have other ideas, join the Discord and let me know!

My Short-Term Plans

Currently there’s no way to get a replay file from games played on console. I view this as a major problem, and would love to see replays start being collected at tournaments. This is the next thing I will be tackling.

Console replay extraction could likely be achieved using a hardware solution similar to what I’ve used in the past. The problem with this, however, is it’s not easily accessible. I recently had a different idea that I think might have some potential.

Nintendont has a feature that allows for games to use virtual memory cards… this is a Gamecube game communicating with Wii hardware. The Wii has all the hardware components needed to store and extract replays, namely an SD card slot and WiFi/Ethernet connection capabilities. It might be possible to create a modded version of Nintendont specifically designed to load the Slippi code and extract data automatically over WiFi. This would allow anyone to generate replays and by extension, view stats for their games.

I plan on pursuing this idea. If anyone is interested in helping me out, please let me know in the Discord.

Acknowledgements

There are many people that have helped get Project Slippi to where it is today. I would like to shout out some of them here. My apologies if I forgot some people here. I greatly appreciate everyone that has helped me along the way!

Achilles1515 — For helping get the original stats system working and providing incredibly insightful knowledge about the inner workings of melee

UnclePunch — For being extremely responsive and helpful when I have random questions about modding

Dan Salvato — For the inspiration and paving the way for this kind of project

Milktea — For design and social media input

hannesmann — For helping me with Dolphin problems

--

--