We have a new joysticks database in Castle Game Engine, and we need YOU to help us test it

Posted on

Joystick

Hello everyone!

We have a big and important, but simple request. We’ve reworked the handling of the joysticks and gamepads in Castle Game Engine, with a lot of new features that include serious improvement of joysticks API, access to a huge joysticks database by SDL2 with hundreds of joysticks definitions, autodetection of joysticks, detection of connection/disconnection of joysticks, etc.

However, because we have very limited access to hardware, we are unable to test how well those new features work. And therefore we need your help to test if everything is working as expected on different hardware joysticks/gamepads.

You can download and build “joystick” project from “examples” in this fork: https://github.com/eugeneloza-clean/castle-engine. It is not yet merged into CGE master, but of course it will be — that’s why we ask you to help with testing!

Ready precompiled binaries for Windows 64 bit and Linux 64 bit are here.

If you have access to a hardware joystick or gamepad, please use this tool and tell us (e.g. using forum):

  1. Your joystick name and operation system (Linux or Windows)
  2. Name your joystick was detected in Castle Game Engine

  3. If your joystick was correctly autodetected. If not, can you find your joystick in the list of joysticks and try using it?

  4. Did the axes and buttons on your joystick corresponded to the axes and buttons displayed in the tool? Note, that the names of the buttons and exact joystick layout may be different, but right stick must be right and upper button must be the upper one.

Thanks a lot!

And thanks a lot to Eugene Loza for developing it all!

Notable Replies

  1. Here you have some tests:

    I have checked “Wireless Steam Controller” on Linux 64. Name is correct but buttons are and axes are all wrong.

    Second one is “MLG Pro Circuit Controller (Xbox)”: this one seems correct. Triggers are analog and not shows correctly: yellow if I push the trigger and still yellow when release.

    Third one: Nintendo Wiimote, model: RVL-036: paired on system bluetooth but not detected at all. I can move list of controllers with it so it may acts as keyboard.

  2. @tsr Thank you!

    We’ll look into it :), in particular why “Wireless Steam Controller” failed.

    I think the failure of “Nintendo Wiimote” may not be easy to handle, if it is not detected at all.

  3. Linux - Logitech F510

    This has a switch on the back to go between xinput and directinput modes. I usually use xinput. In xinput mode it is detected as “Logitech Gamepad F510 (ID: 0); Axes: 8; Buttons: 11”. However, it fails to autodetect the layout and shows it as a generic XBox pad, while physically the gamepad layout follows the Dualshock convention. The axes and buttons light up correctly on the diagram, although L2 and R2 light up at minimum and maximum values but remain unlit when the trigger is half pressed.

    In directinput mode, the gamepad is detected as “Logitech Logitech Rumblepad 2 USB (ID: 0); Axes: 6; Buttons: 12”. The diagram is still a generic XBox pad. Every axis and button in this mode lights up an entirely wrong control on the diagram.

  4. Windows, Nintendo Switch Pro Controller, which is detected as “XBox Adaptive Controller”.

    I changed the layout to Nintendo Switch Pro Controller and everything works fine except the right stick which cannot rotate left/right.

  5. Thanks a lot for the tests everyone!

    It seems like the database doesn’t have Wireless Steam Controller record, only 7 Steam Controller records (without “wireless”). Creating a database entry for this joystick might help, see the links below.

    Unfortunately this joystick does not seem to be available in the database (or is detected by a significantly different name). If you could create the corresponding database record it’d be a very great help both to SDL2 and Castle Game Engine.

    E.g. Try using one of the tools listed here: SDL_GameControllerDB/README.md at master · gabomdq/SDL_GameControllerDB · GitHub (I used SDL2 Gamepad Tool and it worked well both on Linux and Windows) and submit it to SDL2 database through issues Issues · gabomdq/SDL_GameControllerDB · GitHub
    Note that they do not accept all joysticks definitions, first of all if they are buggy like my Esperanza EG102 (e.g. if many joysticks with different layouts share the same GUID which makes their autodetection next to impossible or if joystick layout depends on firmware version), but even in this case we still can include this record in Castle Game Engine database, as we alternatively provide a way to select the joystick by name even if autodetect fails.

    Unfortunately at the moment we’re using an “obsolete” /dev/js# interface on Linux. It works well for most joysticks, but it has its limitations - e.g. not detecting correctly some sophisticated cases (like wi-fi or bluetooth joysticks). We plan to upgrade it to /dev/event#, but it’s still work in progress.

    You mean that the joystick image is different from the actual joystick image, right? Note that we use the same X-Box gamepad image for all joysticks (like SDL2 Gamepad Tool does). We had an idea to draw all possible joysticks layouts, but it’s a really tremendous amount of work (almost 800 joysticks in database :smiley: + about an hour to find, validate and draw each layout), so, it’s left for later if ever :slight_smile: As an alternative we wanted to try to figure out most common layouts (like X-Box, NS, PS) so that at least sticks, D-Pad would be placed correctly and buttons would have correct captions. But again this information is not available in the database and therefore it requires googling (duckduckgoing) images for all the joysticks in the database to determine their look.

    Currently we consider trigger pressed when it has > 0.5 pressure. Should it be reduced to some lower value, like 0.2-0.1?

    Did you try selecting Logitech F510 Gamepad from the list of joystick layouts? It looks like it has the same layout as Logitech RumblePad 2 USB (only axis[1] and axis[3] are inverted), but still worth a shot.
    I’m not sure if that could help, but could you try creating a database entry for your joystick in this mode (see the tool linked above) too? The database has the entry for this joystick, but maybe it’s wrong or there is an alternative layout for the same joystick name. At least that’ll give the answer what exactly works wrong in this case.

    It looks like there might be a problem with the database definition (that was the case for my Esperanza joystick - left stick and most of the buttons were working correctly, but the right stick and triggers weren’t; Everything started working well after I’ve created a manual database entry for the joystick). Could you try creating a database entry (see the tool linked above)?

    Thanks again everyone!

    You can also track the generalized testing results here:Castle Game Engine joysticks&gamepads tests - Google Sheets

Continue the discussion at Castle Game Engine Forum

4 more replies

Participants

Avatar for tsr Avatar for eugeneloza Avatar for bunnylin Avatar for michalis Avatar for kagamma