GithubHelp home page GithubHelp logo

keithellis74 / approxeng.input Goto Github PK

View Code? Open in Web Editor NEW

This project forked from approxeng/approxeng.input

0.0 1.0 0.0 2.78 MB

Python classes to handle game controllers, including PS3, PS4, XBox One and Rock Candy

Home Page: https://approxeng.github.io/approxeng.input

License: Apache License 2.0

Python 94.66% Makefile 5.34%

approxeng.input's Introduction

approxeng.input

A Python (2 or 3) library to handle game controllers. At the moment it can work with the following:

  1. DualShock3, as used by the Sony Playstation 3
  2. DualShock4, as used by the Sony Playstation 4
  3. XBox One, the most recent version with bluetooth
  4. Pi Hut, mixture of DualShock3 and 4

See the full documentation here

Get the code using pip:

> pip install approxeng.input

Note - you may need to install some prerequisites first, and this will only work on Linux based operating systems. See the full docs for more details.

All three controllers can be used either over USB or bluetooth, the library handles event management and lets you simply query an object model to get button presses, hold times, and axis values. It also deals with analogue axis concerns such as dead and hot zones, centering, for both triggers (where the controller has analogue triggers) and stick inputs.

Controls are references by a set of standard names, so you don't need to code against a specific controller - it should be possible to write code using a PS3 controller then pick up a PS4 or XBoxOne device and have it just work out of the box (with the exception that if you rely e.g. on the PS4 analogue triggers you won't get those on the PS3 controller as it doesn't have them)

This library, or previous versions thereof, has been used successfully by several PiWars teams, it's focused more at robotics than game creation (there's no support at the moment for multiple controllers for example).

approxeng.input's People

Contributors

tomoinn avatar keithellis74 avatar claremacrae avatar recantha avatar tabroughton avatar ukbaz avatar

Watchers

 avatar

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.