Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Thom Benjamin
Thom Benjamin
10,494 Points

Making Twitch Plays with JavaScript

I would like to make an app with JavaScript (and probably Node.js), that takes messages from the Twitch chat as strings (up, left, right, down, a and b), and makes those messages trigger the appropriate button on my MacBook. This way the chat has to be able to play on a GameBoy Emulator on my MacBook, like in the popular streams of Twitch Plays Pokemon.

I found one resource to do this with another app called Twilio: https://www.twilio.com/blog/2015/12/building-your-own-twitch-plays-pokemon-with-javascript-twilio-ip-messaging-and-socket-io.html And a video series where they teach it using Python: https://www.youtube.com/watch?v=sCagGV9Jl88&t=439s

But not a single resource for using JavaScript to access the Twitch API and play videogames with a chat.

My questions:

  • is it possible?
  • what steps would you take?
  • do you have any useful resources?

Thanks!