• Stars
    star
    290
  • Rank 142,981 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐ŸŽฎ Connect to IRC to send inputs to any program, Twitch Plays Pokemon style. (Windows, Linux, OSX)

Twitch Plays X

(inspired by TwitchPlaysPokemon)

Connect to Twitch's messaging service, (TMI) via tmi.js (previously using IRC) to send inputs to a program and stream it, TwitchPlaysPokemon style. Should support linux/windows/mac.

In Action

Pokemon on Windows

Pokemon Red running in a Ubuntu 13.10 VM

Caveats

On Windows, the program has to be focused in order to send keyboard inputs so you won't be able to use your computer at the same time (unless you run the program in a virtual machine).

Installation

  • Install Node.js (check that you can run node/npm)
  • Clone the repo: git clone https://github.com/hzoo/TwitchPlaysX.git
  • Install node_modules in the created folder: npm install
  • If Linux: install xdotool: apt-get install xdotool
  • If Windows: install python and python win32 (with corresponding versions)

Setup

  • Start the program you are going to be sending keys to: (VisualBoyAdvance, Notepad)
  • Append environment variables or modify config.js if you need to change the options: TWITCH_CHANNEL=mychannelhere npm start
  • Run the server with npm start

Config

  • CONFIG_PROGRAM_NAME: Find out the title of the window that you will be sending key inputs to (may need to check Task Manager to find out)
    • Example: VisualBoyAdvance, Desmume
      • For notepad.exe it would be "Notepad" or "Untitled - Notepad".
      • If you want to test that the key's are sending correctly, run npm test with Notepad opened to see if it sends a key to it.
  • TWITCH_CHANNEL: the Twitch channel you want to listen for messages on (twitchplayspokemon)
  • Depending on the program, you may need to change the controls (in defaultKeyMap in keyHandler.js, keys.py for windows)

Misc

https://github.com/hzoo/ChatPlays/ used MutationObservers in the browser

Using IRC lets you get all the messages; you can't always get all messages through the browser (quickly or consistently) so this is a better approach overall as others have done.

Method

  • Connect to IRC
  • Use regex to match for certain commands
  • Print out username/message
  • Hook up to a program/emulator
    • if on windows: probably uses the win32 api (window has to take focus)
    • otherwise: xdotool
  • Stream it with OBS

Contributions

Feel free to give suggestions or report bugs!

More Repositories

1

awesome-gametalks

๐Ÿ’ฌ A curated list of gaming talks (development, design, etc)
991
star
2

contributors-on-github

๐ŸŒต Show stats about contributors on github
JavaScript
464
star
3

so-how-does-babel-even-work

๐Ÿค” "So how does Babel even work?" React Rally 2017
CSS
128
star
4

awesome-oss

ย โœ๏ธ A curated list to help writing/maintaining open source libraries
89
star
5

hopeinsource.com

๐Ÿ™ Hope In Source podcast site (+ transcripts)
Astro
60
star
6

twpm

๐Ÿฆ twitter package manager: npx twpm install 712799807073419264 --save left-pad
JavaScript
44
star
7

maintaining-an-oss-project

๐Ÿ˜ซ JSConf EU 2017: Maintaining an OSS Project (Babel)
CSS
27
star
8

in-pursuit-of-open-source

๐Ÿค— "In Pursuit of Open Source" Zeit Day 2018
JavaScript
23
star
9

maintainer-heal-thyself

๐Ÿ™ "Maintainer, Heal Thyself" React Boston 2017
CSS
23
star
10

ChatPlays

Send crowdsourced chat commands somewhere. (TwitchPlaysPokemon, Twitch/ Youtube to an emulator)
JavaScript
22
star
11

through-the-open-source-looking-glass

"Through the (Open Source) Looking Glass" React Rally 2018
JavaScript
20
star
12

shengji

๐Ÿƒ ๅ‡็บง: a trick-taking card game (wip)
JavaScript
19
star
13

maintainers-anonymous

Maintainers Anonymous - JSHeroes 2019
JavaScript
17
star
14

babel-explorer

visualization of babel input->output. check the /explorer folder for code additions!
JavaScript
16
star
15

tweetpleth

๐Ÿฆ A real-time choropleth map of queried mobile tweets
JavaScript
14
star
16

role-of-babel-in-js

Role of Babel in JS (TC39 May 2017)
CSS
14
star
17

open-source-charity-or-business

Talk for JSNation 2019 (Amsterdam)
JavaScript
13
star
18

babel-plugin-dedupe-string-literals

Dedupe strings with new variable declarations.
JavaScript
12
star
19

localized-keywords

Experimenting with allowing configuration of JavaScript's keywords to different languages (or anything else)
JavaScript
10
star
20

babel-preset-es2016

deprecated: babel-preset-es2016 is moved to the babel repo
JavaScript
9
star
21

new-jsx-transform

JavaScript
8
star
22

maintainersanonymous.com

Moved to the same repo as Hope in Source podcast
JavaScript
8
star
23

open-source-and-life

At Sept 16 AtlantaJS Meetup and Oct 6 Hacktoberfest event at Flatiron
JavaScript
6
star
24

babel-plugin-slides

slides for BrooklynJS and NYCHTML5
CSS
5
star
25

colorado-schools-filter

Visualization of Colorado School Data using d3 maps/crossfilter/tables
CSS
3
star
26

tppstats

๐Ÿ“ˆ TwitchPlaysPokemon realtime graphs
JavaScript
3
star
27

.-_-.

๐Ÿ˜„
3
star
28

maintainers-virtue

"Maintainer's Virtue" All Things Open 2018 Keynote
JavaScript
2
star
29

open-source-preservation

Software Preservation Quarterly Community Forum (Summer 2019)
JavaScript
2
star
30

require-from-twitter

๐Ÿฆ require(), but from a tweet.
JavaScript
2
star
31

babel-usedby

1
star
32

blog-comments

blog comments
1
star
33

Hopt

Hopt Client/Server: an emergency department design tool
JavaScript
1
star
34

urf

๐Ÿ“Š URF Stats.
JavaScript
1
star
35

babel-output-highlighting

Move to https://github.com/hzoo/babel/tree/output-highlighting
JavaScript
1
star
36

twitterhealth

A webapp to gather 'sickness' related tweet data.
JavaScript
1
star
37

babel-plugin-minify-booleans

Turn boolean literals into !0 for true and !1 for false.
JavaScript
1
star
38

Tuolaji-Nonoba

The game tuolaji on nonoba servers (check out hzoo/shengji)
ActionScript
1
star