Gamepad. How do i ?

0 favourites
  • 6 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • I'm working on a game where i need to connect an Xbox controller in order to perform an action, IE. i want to work around having to press a button.

    However, it appears i need to press a button before it recognizes that "Has Gamepads" is active the first time i start the game.

    Does anyone know a workaround for this ?

    (( one idéa i had was simulating a button press on start of layout, but there are apparently no gamepad actions. ))

    Thanks in advance!

  • i have the same question

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I hope I'm wrong but I don't think there is a way.

    On your opening screen you could request the player to press a button to continue which would activate the joypad - after all it's quite common to see a "Press (a) to continue"

  • Browsers require that you press a button on the gamepad before it is recognised. This is for privacy reasons, so ad networks or malicious parties can't track you by using your available controllers as part of a fingerprint to identify you. If you never touch the controller it acts like it is not there.

    I can't imagine why this would be a problem though. Just have a message on startup like "Press a gamepad button to use gamepad controls".

  • A core mechanic in the i'm working on is the controller. I want to be able to transform the character when the controller is disconnected. This part works just fine.

    In order for the player to get into the mechanics of the game i want him/her to start the game with only connecting it, since that's how it works throughout the rest of the game.

  • Honestly most player wouldn't be bothered with disconnecting and reconnecting their controller. I have mine plugged into the back of my computer and it's staying there. This means if I have to rely on that gimmick I won't be playing your game.

    A better option would be pressing a button to disable/enable controller input, and then based on what state it is, treat it like you already do for disconnects/reconnects. This can be a button you press on the keyboard/controller to switch between the states.

    This way the controller stays plugged in, you get your intended mechanic, and you don't have to have an issue with how the browser handles controllers.

    You can still provide the option for them to disconnect/reconnect if they wanted to use that, but it being a requirement is detrimental to player interaction

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)