Coder Social home page Coder Social logo

twitch-plays's Introduction

Twitch Plays

Clone of Twitch Plays Pokemon.

Modifications by JackNet.

Original code by aidanrwt.

macOS/Linux/*NIX support based on ynohtna92's fork.

Under the MIT license.

Requirements

Use Python 2.7.18.

For Microsoft Windows, keystrokes are performed by using Windows API calls through the PyWin32 extension, which must be installed alongside a normal Python installation.

For macOS/Linux/*NIX installs, keystrokes are performed through xdotool/xautomation. Check your distro's repositories if it's available for install through your package manager.

How To Run

Rename config/config_dist.py to config/config.py and replace the default username/password values with your Twitch username and OAuth token. Feel free to modify button throttles there as well.

In your Emulator, set the controls to the following keys:

Up: 0
Down: 1
Left: 2
Right: 3
Button A: 4
Button B: 5
Button X: 6
Button Y: 7
Start: 8
Select: 9
Button L: A
Button R: B

If necessary, comment out any buttons you don't want to use through the lib/game.py script.

After setup, open up your terminal and type python serve.py. If your username/password is wrong, you will be notified.

Whilst the script is running, make sure you have the emulator in focus as your primary window since the commands are only sent to the active window. If you click onto another window, the keypresses might disrupt operation of the program in focus. If you're unable to maintain a window focused should you need to do other things with your computer, run the emulator and script within a virtual machine.

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.