https://github.com/valentinh/slither-joystick-controller
Simple script to bind joystick controller to Slither mouse events
https://github.com/valentinh/slither-joystick-controller
Last synced: 9 months ago
JSON representation
Simple script to bind joystick controller to Slither mouse events
- Host: GitHub
- URL: https://github.com/valentinh/slither-joystick-controller
- Owner: ValentinH
- License: mit
- Created: 2016-11-12T16:07:45.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-05T22:04:48.000Z (over 9 years ago)
- Last Synced: 2025-03-25T10:22:03.078Z (over 1 year ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slither-joystick-controller
Simple script to bind joystick controller to Slither mouse events
[](https://www.npmjs.com/package/slither-joystick-controller)
[](http://npm-stat.com/charts.html?package=slither-joystick-controller&from=2015-01-01)

> For now, only PS3 dualshock3 is supported.
## Installation
```
npm i slither-joystick-controller
```
## How to run
1. go to the `node_modules/slither-joystick-controller` folder
2. run `node index.js` or `node index.js supported/controller/here`
### Supported Controllers
- ps3/dualshock3 (default)
- ps4/dualshock4
- snes/tomee
- snes/retrolink
- n64/retrolink
- logitech/rumblepad2
- logitech/dualaction
- logitech/gamepadf710
- microsoft/sidewinder-precision-2
These controllers are handled by [node-gamepad](https://github.com/carldanley/node-gamepad). If you need to add another controller, see the [Contributing Controllers](https://github.com/carldanley/node-gamepad#contributing-controllers) of `node-gamepad`.
## How to use
Game pad action | Slither action
--- | ---
start | `pause/unpause` all the other actions.
L3 | `move mouse`
X | `boost`
triangle | `enter` - use to start the game
L2 | `zoom out` (require [Slither plus](https://chrome.google.com/webstore/detail/slitherplus-zoom-skin-cre/cpbghpalffgmgocmnigfhalghmaemffo) extension)
R2 | `zoom in` (require [Slither plus](https://chrome.google.com/webstore/detail/slitherplus-zoom-skin-cre/cpbghpalffgmgocmnigfhalghmaemffo) extension)
select | redefine center position. It can be useful when the game is not in full screen. Place your mouse on the snake head and press `select` to set the center.
## Libraries used in this project
- [node-gamepad](https://github.com/carldanley/node-gamepad) - for reading controller inputs
- [robotjs](https://github.com/octalmage/robotjs) - for firing mouse/keyboards events
- [node-notifier](https://github.com/mikaelbr/node-notifier) - for displaying notifications