SFML community forums

Help => Window => Topic started by: biscuitdough on September 03, 2010, 09:20:09 pm

Title: 1.6 number of joysticks
Post by: biscuitdough on September 03, 2010, 09:20:09 pm
On the sfml todo list, it says that the number of joysticks in version 1.6 was raised from 2 to 4, but in the documentation it still says that the only joy numbers you can put in are 0 or 1 when requesting info about joystick input. I was just going to order a 3rd controller, but wanted to make sure it really supports more than 2.
also, i know it's a weird request but, is there any reason that SFML has to limit the number of gamepads at 4? im working on a game that's a quasi-sequel  of Tank 8, a super hard to find Atari game that's basicly Combat but with 8 players.
http://www.arcade-history.com/?n=tank-8&page=detail&id=3675
and yes, it's as awesome as it looks. I mean 4 players is fine, and if adding more joysticks takes up too much memory or cycles, I completely understand, but 8 player tank battles would certainly be cool.
Title: 1.6 number of joysticks
Post by: Laurent on September 04, 2010, 06:17:50 pm
Quote
I was just going to order a 3rd controller, but wanted to make sure it really supports more than 2.

Yes it does, I forgot to update some parts of the documentation.

If you use 3 joysticks let me know if everything is ok, as far as I know nobody gave me feedback for more than 2 joysticks ;)
Title: 1.6 number of joysticks
Post by: anachron on October 27, 2010, 10:51:07 am
Quote
Is there any reason that SFML has to limit the number of gamepads at 4?

I am wondering the same thing, for mostly the same reason as you. We are making a single-screen multiplayer game and would like to have the possibility to use at least 8 controllers simultaneously.
Title: 1.6 number of joysticks
Post by: Laurent on October 27, 2010, 11:36:20 am
I think SFML can support more joysticks, I don't see anything in the code that would limit it to 4.

I wish that someone could test it with more than 2 joystick... :P
Title: 1.6 number of joysticks
Post by: anachron on November 03, 2010, 04:54:30 pm
Today we did a preliminary test, using:
* 4 original ps3 controllers
* 1 logitech ps3 controller
* 2 Guitar Hero controllers

We changed the number of joysticks in Event.hpp to 16, and compiled SFML2.
Our test program only listens for button input, and outputs the controller id / button id.

The test was successful, as we got input from all 7 controllers.
This test was done under Linux.
Title: 1.6 number of joysticks
Post by: Laurent on November 03, 2010, 05:36:27 pm
Amazing, thank you very much :)
Title: 1.6 number of joysticks
Post by: Laurent on November 03, 2010, 05:45:52 pm
SFML 2 now officially supports 8 joysticks :lol: