Game Control Plus

History of GCP and an important message!

gamepad

A few years ago I bought a wired Xbox controller so I could play games with my grandson on his Xbox. So when he was not with me I had this controller doing nothing and I thought of using it with Processing. I looked for a lbrary and found proCONTROLL but it wasn't compatible with Processing V3 so I decided to fix that.

I greately extended the top level API to create the configurator so sketches could run on different computers without having to edit the source code. I did not modify the lower level software layers because I didn't have the knowledge or experience.

So here is the important message. GCP is provided as is and will not be updated further except to fix bugs in the code I added. I have an Xbox controller and a Logitech joystick that work well with GCP but it might not work with modern USB devices or only work in a limited way. If you have questions about using this library then go on the Processing forum and ask the question. if I can answer it I will but it is more likely someone else can provide a better answer as I very rarely use GCP.

Introduction

This library enables the user to create sketches that use joystick, gamepad or similar input device.

gamepad

This library is an updated and extended version of proCONTROLL created by Christian Riekoff in 2005.

The main enhancement is the support for developing sketches that can adapt to using different input devices and operating systems at runtime without the need for refactoring the source code.

Before attempting to use this library I strongly recommend you watch the three video guides (1, 2, 3) as they provide a detailed view of how the library works and how you can use it.

Library Examples

Although this library has no external dependancies some of the examples use other libraries which can be install through the Processing IDE menus.

Pcp_Configurator

Dependancies : G4P

This sketch will search for all connected devices and allow you to create configuration files for your own sketches. Look at the third video guide to see how to do this.

Pcp_ShowDevices

Dependancies : G4P

This will search for and display all connected devices. The ouput is in two parts, a simple device listing and a detailed description of each device and their inputs. It also creates two files, 'listing.txt' and 'details.txt', they can be viewed and printed in any text editor.

NOTE: In the next 3 examples you are likely to be prompted to configure another control device. The reason is that you are unlikely to use the same control device and/or operating system used when creating them. I suggest that you watch the second video guide before you try them .

Pcp_Tanker

Dependancies : Sprites
Created with : Logictech 3D Pro joystick on OSX

Use a joystick to control the tank and see how long it takes to destroy all the targets.

Pcp_gamepad

Dependancies : None
Created with : XBOX 360 wired controller on OSX

Simple demo using a gamepad.

Pcp_joystick

Dependancies : None
Created with : Logictech 3D Pro joystick on OSX

Simple demo using a joystick.