Skip to content

A democratized virtual N64 controller and an IRC listener, written in Rust

License

Notifications You must be signed in to change notification settings

PumpMagic/twitchplayspapermario

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitch Plays Paper Mario

Twitch Plays Paper Mario is a set of virtual game controllers, an IRC chat bot, and command parsers that together enable the collaborative play of single-player games over the internet. It's a direct spinoff of Twitch Plays Pokemon. You can find it deployed live at TwitchTV.

Running TPPM

Dependencies

Building

  1. From the project root, type cargo build. Your build should fail after building but before linking, because it can't find the vJoy DLL.
  2. Copy src/libvn64c/vjoyinterface/vjoyinterface.dll to target/debug
  3. Run cargo build again. Linking should succeed.

Configuration

TPPM uses a homegrown IRC library that is configured to work with Twitch.tv's IRC servers.

  1. In the root directory, copy tppm.toml.example to tppm.toml
  2. Get your Twitch OAuth key by visiting https://twitchapps.com/tmi/ while logged into Twitch
  3. In tppm.toml, put your Twitch OAuth key into the "pass" field, your Twitch account name into the "nick" field, and the channel of the Twitch user you want to listen to in "channel"

Running

Run TPPM with cargo run.

Before TPPM will do anything useful, you'll also need to

  • install vJoy,
  • configure your vJoy device to have 14 buttons and an X and Y axis,
  • configure your emulator of choice to listen to that vJoy device, and
  • configure tppm.toml with your Twitch credentials.

Code Overview

TPPM's virtual N64 controller is composed of, from the bottom up,

  • FFI bindings to vJoy's C API, automatically generated by rust-bindgen and cleaned up by hand (vjoyinterface)
  • "Rustifying" functions that wrap these FFI bindings, and an abstraction of a virtual N64 controller (libvn64c)
  • An abstraction of a democratized (shared control) N64 controller (libdemc)

TPPM's Twitch interface is composed of

  • An IRC listener bot (libirc)
  • A text-based controller command parser (currently sitting in main, lol)

License

TPPM is copyright 2015-2016 Ryan Conway. Code released under the MIT license. See License.txt in this repository's root directory.

Disclaimer

I wrote TPPM in my spare time to learn Rust.

About

A democratized virtual N64 controller and an IRC listener, written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages