Hello,
I am a student programmer and I am working on a project where I am using Logitech gamepads to control a remotely operated vehicle (ROV). I was playing around with the Game Control Plus as an option to achieve this.
My question is does Game Control Plus allow inputs from two different gamepads? If multiple gamepads are allowed does anyone have any recommendations for tutorials to walk me through the process. I have not been able to find this information myself and I thought it would be a good time to ask the experts!
I have not tried using multiple identical devices with GCP because I don’t have them but it should work, hopefully
Create a configuration file for a gamepad and call it something like “gamepadconfig”
Now use the getMatchedDevice method twice to get the two gamepads. The code will look something like this
import org.gamecontrolplus.gui.*;
import org.gamecontrolplus.*;
import net.java.games.input.*;
ControlIO control;
Configuration config;
ControlDevice gpad0, gpad1;
public void setup() {
size(400, 240);
surface.setTitle("GCP Duel Gamepad trial");
// Initialise the ControlIO
control = ControlIO.getInstance(this);
// Find a gamepad that matches the configuration file. To match with any
// connected device remove the call to filter.
gpad0 = control.filter(GCP.GAMEPAD).getMatchedDevice("gamepadconfig");
if (gpad0 == null) {
println("No suitable device configured");
System.exit(-1); // End the program NOW!
}
// Find a second gamepad that matches the configuration file. It should ignore
// devices already matched.
gpad1 = control.filter(GCP.GAMEPAD).getMatchedDevice("gamepadconfig");
if (gpad1 == null) {
println("No suitable device configured");
System.exit(-1); // End the program NOW!
}
}
I am not promising it will work but what the heck
For more information about this library visit my website.