GamePad (Xbox for PC, Stencyl 3.2)

MrMyaghi

  • Posts: 2
Hello!

I can't get Stencyl to respond to any GamePad input. Im using a corded Xbox controller for windows 7. I have tested in another game, so I know the gamepad works. I have followed the steps in the stencylpedia, and made an print[input] when ever I press a gampad button, and I also tested the presets mentioned in the stencylpedia (0, left hat, etc). I have also tested to use the block 'activate gamepad', but nothing seems to work. Zero response from the gamepad so far. Does any one of you guys have the new gamepad functionality working?

/MM

playtheHnote

  • Posts: 395
I have the same problem with my PS controller.
Check out my instrumental rock album "Hail to the Chosen One" at: https://soundcloud.com/play-the-h-note

Visit my facebook page @ https://www.facebook.com/justin.shellhorn.1
"Sound King"  now available at the forge see http://community.stencyl.com/index.php/topic,35672.0.html
for more info!

ianfitz

  • Posts: 48
Just wanted to chime in and say I'm having the same problem on my Mac (running Yosemite, Stencil 3.2 b7994) with an Xbox 360 wired controller. Primary USB port.

Tried with and without this driver installed:

https://github.com/d235j/360Controller

I can't get any button presses to show using this event attached to the Scene:



I confirmed I have logging configured correctly, as when I log events from the keyboard like this:



I DO seem them in the log.

I am doing a clean project and then Run > Mac, not doing test scene or running as Flash (which I don't think supports Gamepads, right?)

I have a PS3 controller at the office, I'll bring it home and test tomorrow to see if that works.

Has anyone got an Xbox 360 Gamepad working correctly?

Edit:

One last note, I also confirmed that my Xbox 360 controller is definitely being recognized by other apps. See this screenshot from Chrome accessing it via the HTML5 gamepad API.

http://note.io/15t1lpO




« Last Edit: January 20, 2015, 07:33:34 pm by ianfitz »

Northfield82

  • Posts: 649
Was just about to post this myself! same problem.

ianfitz

  • Posts: 48
Was just about to post this myself! same problem.

Can you provide exact details like I did, so we can try to get this problem resolved then?

- Controller type
- Is it wired, going directly to computer? Primary port?
- Platform (Windows / Mac / Linux)
- Stencil version/release number
- Driver type/did you confirm it communicates with rest of system
- How are you testing?  (Flash Debugger? Run > Mac, Run > PC ?)
- Other troubleshooting steps?

« Last Edit: January 21, 2015, 07:14:13 am by ianfitz »

ianfitz

  • Posts: 48
I confirmed that my PS3 controller is not sending events to the log either. Used the same event structure as screnshotted above, got no log output when pressing any buttons. Even though my PS3 controller is bluetooth, I'm connected via USB to my Mac's primary USB port.

I confirmed that my system is seeing my gamepad by going to html5gamepad.com




colburt187

  • *
  • Posts: 2416
Just want to double check people are testing game pads running Mac Or Windows builds only, you cant test gamepad inputs on flash. Might be obvious to others but I made this mistake.

Also I dont think wireless x-box controllers work on Mac.

I have x-box 360 controllers working great on Mac and Windows, up to 4 player.

« Last Edit: January 21, 2015, 08:58:18 am by colburt187 »

Northfield82

  • Posts: 649
I was testing in Flash Player - does that mean that's why it didn't work?

- Wired Xbox controller, Win 7, Stencyl 3.2, tested controller with windows control panel worked ok

letmethink

  • *
  • Posts: 2545
They cannot work in flash player at least in Stencyl. I have seen a flash game or two that managed to do it but I presume it was very much customised.
~Letmethink

ianfitz

  • Posts: 48
Just want to double check people are testing game pads running Mac Or Windows builds only, you cant test gamepad inputs on flash. Might be obvious to others but I made this mistake.

Also I dont think wireless x-box controllers work on Mac.

I have x-box 360 controllers working great on Mac and Windows, up to 4 player.

Just for the record, I am testing a WIRED XBOX 360 Controller (tried PS3 plugged in too), and I am testing on Mac (Run > Mac) as I had read elsewhere that Flash is not supported.

It's interesting to hear it's working for you, what build number are you on, and what platform?

Edit: oops, I see you said both Mac and PC.

How about build #?

Also, did you use a particular XBOX driver on Mac?

« Last Edit: January 21, 2015, 11:58:45 am by ianfitz »

ianfitz

  • Posts: 48
Another update...I installed Stencyl on a Windows 7 laptop, latest Stencyl build (7994). Even on Windows 7 platform I am not getting any print statements to the log when I press a button on my Xbox 360 controller.

- Confirmed controller driver is installed/recognized by going to HTML5gamepad.com, confirmed screenshot similar to above
- Also added an event for "on press any KEYBOARD key" print key code to log, and this event works fine
- Am using Run -> Windows method of compilation, NOT clicking 'test' and NOT using Flash Debugger environment

So...my logging method works for keyboard, and my gamepad is recognized by the OS for sure on both Mac AND Win 7. Yet, Stencyl doesn't seem to register my gamepad.

Any help, please?

Shommey

  • Posts: 14
So far, I played just a little bit with gamepad support. My OS is win 7, Gamepad is Gigatech GX-105, wired, Stencyl 3.2 (Ill check my build later today, and I have always run test for Windows, not flash or any other. So far, D-Pad is working perfectly, also I tried to map X button, but it's not printing anything to log or working anything, while D-pad prints output. To be honest, I was in hurry and I'm not sure I did the mapping right. I can do some testing, and post it if you guys want?

ianfitz

  • Posts: 48
Yes, the more info the better!

ianfitz

  • Posts: 48
With a ton of help from @colburt187 , I got my Xbox 360 Gamepad working!

The trick, is I'm not 100% what finally tipped the scales, as I changed a bunch of things.

Most likely culprit is not having the 'enable gamepad' block. You should have something like this, which I didn't see documentation for on the Gamepad page in Stencylpedia:



Other notes, for future searchers who come across this thread:

1. I upgraded from OS X 10.10.0 to 10.10.2
2. I am using version 0.14 (Dec 22, 2014 release) of this driverhttps://github.com/d235j/360Controller/releases.
3. Just another reminder, controllers don't work in Flash. You have to do Run > Mac

Hope this helps someone!

Shommey

  • Posts: 14
Sorry for delay, I was busy these days. Anyways, I succeeded to map all buttons right on stencyl 3.2 build 7994, using windows 7, Gigatech GX-105 Gamepad..
And, yes, @Ianfintz, you must have "enable gamepad" block to have it working.