• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Implemented on GIT Remove code that makes non standard mapped joysticks on HTML ignored

grant

Member
CX Code Contributor
3rd Party Module Dev
3rd Party Tool Dev
Joined
Nov 19, 2019
Messages
80
In JavaScript gamepads have a "mapping" property that says if the gamepads has a specific mapping and so far they only have a "standard" value. Other gamepads may or may not be mapped correctly. A lot of generic USB gamepads and adapters return that they don't have a mapping. On Firefox especially. The source code in Cerberus X's HTML5 export ignores any gamepads that haven't been marked as "standard". This should be removed, because these gamepads still may be mapped correctly and even if they aren't we shouldn't block the player from trying them.

Info on JavaScript Gamepads: https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API

These lines should be removed form targets/html5/modules/native/html5game.js
Code:
if (gamepad.mapping == "standard") {

Code:
} else {
   console.log('Cerberus has ignored gamepad at raw port #'+gamepad.index+' with unrecognised mapping scheme \''+gamepad.mapping+'\'.');
}
 
Last edited:
Interesting! When I'm done with the current project I'm planning to make Cerberus talk with
different sensors and MIDI through the gamepad-API.

(I'll be emulating gamepad events and hide the fact that MIDI and hardware sensors are not gamepads at all).
 
Interesting! When I'm done with the current project I'm planning to make Cerberus talk with
different sensors and MIDI through the gamepad-API.

(I'll be emulating gamepad events and hide the fact that MIDI and hardware sensors are not gamepads at all).
Interesting! I don't have any MIDI devices. How would they connect through the gamepad API?

This change I'm proposing is just because most game controllers have different button mappings. Sometimes the web browser remaps them so they are "standard".
 
I understand! I wonder what else will come after having only standard for such a long time..
Augmented reality & Accessibility will certainly come into play there.

The connection is easy actually you just emulate events in pure javascript.
Here's a few examples that are quiet well coded :


 
All the MIDI timing inside Javascript is so great at this point so can even do Audio DSP real-time and be quiet okay with the results.

Which means the full lag-chain will be almost zero and non-existant.
 
As nobody mentioned any problems, I moved it to the develop branch.
 
Back
Top Bottom