Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: 1.6 number of joysticks  (Read 3286 times)

0 Members and 1 Guest are viewing this topic.

biscuitdough

  • Newbie
  • *
  • Posts: 4
    • View Profile
1.6 number of joysticks
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
1.6 number of joysticks
« Reply #1 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 ;)
Laurent Gomila - SFML developer

anachron

  • Newbie
  • *
  • Posts: 2
    • View Profile
1.6 number of joysticks
« Reply #2 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
1.6 number of joysticks
« Reply #3 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
Laurent Gomila - SFML developer

anachron

  • Newbie
  • *
  • Posts: 2
    • View Profile
1.6 number of joysticks
« Reply #4 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
1.6 number of joysticks
« Reply #5 on: November 03, 2010, 05:36:27 pm »
Amazing, thank you very much :)
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
1.6 number of joysticks
« Reply #6 on: November 03, 2010, 05:45:52 pm »
SFML 2 now officially supports 8 joysticks :lol:
Laurent Gomila - SFML developer