Help test the new Gamepad object!

    Is there anyway to implement the vibrate feature on the 360 controllers? I'm working on an iso type game and would like to shake the controller when under attack.

    Tested with Logitech Precision Gamepad.

    Chrome 20 Beta: Nothing

    Firefox 16 Nightly: Nothing

    Firefox 11 Gamepad Nightly: Nothing

    Windows 7 sees the gamepad and I can see button clicks in the test app for the driver, so it must be an issue with the browsers.

    Have there been any work done on this, or have more important things taken precedence? (Like exe maybe, since it was mentioned in the notes for r96 :3 )

    ATM it doesn't work at all for me, in either Chrome or Firefox (even nightly). I can get around that with j2k, but I'm not expecting players to go that far.

    Is there a way to get more debug information out of this? I'm a developer so I can understand api calls, stack traces etc. Is there anyway to see more detail about what could going wrong?

    firebelly - we only expose what the browser gives us. You might have to try different drivers, or try getting the browser makers to improve support.

    I tested this out in google chrome at this page:

    html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html

    And I get solid results, and everything is mapped perfect, but I can't seem to get the construct 2 test page to work. Let me know is there is something I can test for you to help. I have a Logitech gamepad and an XBox 360 Wired (third part madkatz but works on the normal testing page).

    Does this plugin work? Maybe the manual entry was released prematurely or something. It's not recognising my 360 controller (I pressed buttons and used Chrome), it works on the site firebelly posted and I just played Dark Souls using the controller too.

    It did work somewhat when it was first introduced (though even then it was iffy) but currently I think C2 has changed too much for it to work at all.

    Yeah, maybe the gamepad HTML5 stuff has changed or something since it was made too.

    alspal: I tested it in Chrome 21 and it worked fine. However in Chrome beta and canary (currently 22 and 23) it didn't work because Google tweaked the way Gamepad support worked in them. Thanks for the heads up - it's fixed to use the new way in the next build.

    Since Gamepad was mentioned in the new build I decided to give it a go. Hooked up my Dual Shock 2 and put in some events for the gamepad and previewed. Nothing.

    So I tried something else. I put x360ce in the Chrome folder and tried it that way. Now it works.

    So it seems to me that it's Xinput only (at least in Chrome). Though I don't know if it's because of the browser, or because of C2. If it's because of C2 I'd highly suggest broadening the gamepad object to support more than just Xinput. If it's because of the browser... then I don't know what could be done. Maybe someone else does.

    In any case, while Xinput is decent, it doesn't cover that much of the possible peripherals people use. While enthusiast like us here at the Scirra forums may feel comfortable mucking about with experimental drivers, third party software and whatnot to make stuff work. More than likely, the common user won't, and I don't expect them to (as already stated).

    Aside from the obvious Xinput issue, there're some things that I'd like to see which would make the gamepad object more useful.

    The gamepad object lacks some conditions that the keybord has. Namely "on key pressed" and "on key released". Gamepad versions of these would be great.

    Setting up events for both gamepad and keyboard is a bit clunky currently. I'd have to copy the entire group and redo the events in it for gamepad. If the "OR" blocks supported more than one condition per ... uh.. block(?), it would make supporting multiple control types easier. Like this:

    Left Arrow Down

    Player on ground

    OR

    D Pad Left Down

    Player on ground

    This was mentioned in another post a while back, not sure what happened to that thread though.

    inkBot - unfortunately which controllers are supported depends entirely on the browser - we can't do anything to add support. Browser makers are still working on it though, so I anticipate it will improve gradually over time.

    Good point about the missing triggers - added to the todo list.

    You can either use global variables or a third party function plugin (official features will be coming soon) to handle control input. Alternatively the events you gave can be rewritten easily using a subevent:

    Left arrow down

    OR

    D Pad left down

    ---- Player on ground (subevent)

    ---- Do stuff!

    inkBot - unfortunately which controllers are supported depends entirely on the browser - we can't do anything to add support.

    I was afraid of that. Guess we'll just have to bombard Google and Mozilla with emails about better gamepad support.

    Good point about the missing triggers - added to the todo list.

    Sweet.

    Alternatively the events you gave can be rewritten easily using a subevent:

    Left arrow down

    OR

    D Pad left down

    ---- Player on ground (subevent)

    ---- Do stuff!

    That is a good solution, not sure why I didn't think of it immediately. Broader OR conditions would still be nice though. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    It's cool that it works now, thanks! But could you add an action eventually to get the index of the last button pressed (or something like that), this way we can make ? custom controls ?.

    If you don't know what I mean by custom controls, it means I can have a menu in the game that lets the user define their own input (everyone likes their input a specific way). This is a standard for every proffesional game, here is an example from a few games to show you what I mean:

    dota2.jpg

    seriousSam3.jpg

    darksouls.jpg

    A video on the subject.

    A way to get data for which button is/was pressed would be good for both the gamepad and keyboard objects. There seem to be expressions for the gamepad object to get some input data. But that seems to be returning a value from 0 to 100. I'm guessing this is simply checking if the button is pressed (since you have to specify the button in question it seems), and by how much if analog. Interesting, but not what I was looking for.

    EDIT: All of that was available in the manual. XD

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