making HUD analog joystick that lines up with gamepad

Get help using Construct 2

Post » Sat Jul 26, 2014 8:58 pm

@littlestain hadn't because buttons are binary events, but certainly worth a try so I did it and yea it doesn't seem to offer any analog value.. just on/off output.

Taking that logic I also tried Rawaxis which seemed to produce the same 4 values that the normal Axis offers.

it seems like there must be a hidden other two analag values somewhere.. I know that the keypress action offers "trigger left" and "trigger right" so I can get that much data from the controller, but if they really do support "xbox360 input" then this data must be in there somewhere to access because it's a standard control input.

http://part12studios.com/temp/ControllerTest6/

this is an updated version.. it has been updated to reflect a true xbox360 controller.. although my goal is the Ouya, I'd rather work with what Scirra officially supports so this joystick is an xbox controller. getting the ouya's differences (and there definitely are some) can be sorted out later.
You do not have the required permissions to view the files attached to this post.
B
59
S
9
G
1
Posts: 939
Reputation: 6,545

Post » Sat Jul 26, 2014 9:12 pm

One of those button indexnumbers should give analog input between 0 and 100..
If there is an analog button that is..

From the manual:

Button(Gamepad, Index)
Retrieve the current button press value of a button on a specific gamepad. Index specifies the zero-based index of a button from the dropdown list in the Is button down condition (e.g. 0 returns the value for the A button). The returned value depends on the features of the button: if the button is pressure sensitive, it can return any value from 0 to 100 depending on the pressure; otherwise it returns 0 for not pressed and 100 for pressed. Buttons which are not pressure sensitive are easier to detect using the Is button down condition.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 26, 2014 9:16 pm

Should be gamepad.button(0,10) and (0,11) if I understand correctly..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 26, 2014 11:58 pm

aah ok I wasn't sure i followed the talk of index stuff and why it matter..

turns out its actually 6 and 7, but yes I was able to capture the analog input of the controller this way! man talk about some cat and mousing, heh. I'll be sure to come up with some illustration for the tutorial to set the record straight.

Thanks @littlestain for your help has been amazing as always!

http://part12studios.com/temp/ControllerTest7/

this effectively maps the entire xbox360 controller. Making it for the Ouya is just a matter of figuring out what buttons are different.
B
59
S
9
G
1
Posts: 939
Reputation: 6,545

Post » Sun Jul 27, 2014 8:10 am

Superb work - been following this thread with great interest.

Are you sharing the .capx for your fantastic efforts? Certainly would help any dev's on here that will be targeting OUYA releases.
B
17
S
2
Posts: 46
Reputation: 1,105

Post » Sun Jul 27, 2014 12:02 pm

Yes! :) Here is a cleaned up version of the app for the xbox controller.

@grimbarian could you do me a favor? now that we have a baseline of a fully working controller, could you take this and tweak it to represent the Ouya? Doesn't have to be pretty.

I'm wanting to shift my focus to Ouya IAP stuff so it would be great to split up the load with someone else invested in the Ouya :)
You do not have the required permissions to view the files attached to this post.
Last edited by part12studios on Sun Jul 27, 2014 12:39 pm, edited 1 time in total.
B
59
S
9
G
1
Posts: 939
Reputation: 6,545

Post » Sun Jul 27, 2014 12:37 pm

here is an ouya version of the above attachment.. I removed the menu buttons from the event sheet and updated the OUYA buttons with appropriate art.
You do not have the required permissions to view the files attached to this post.
B
59
S
9
G
1
Posts: 939
Reputation: 6,545

Post » Mon Jul 28, 2014 6:53 pm

Ok so I had some quiet time this morning and i'm not known for my patience.. so I went ahead and took a solid stab at adjusting the xbox version of the controller to the Ouya as best as I could.

Here is a link to the "final" version of the Ouya controller simulator. http://part12studios.com/games/OuyaController/

two problems that I would LOVE someone to fix that I could not:

- left and right analog triggers failed to work properly. They can work as a button, just not the analog element. As you can see when you pull them in the test above, they "jump" showing they "fire" off an event, but what I had trouble with was 0-100 stuff..

- right analog thumbstick wouldn't work nice for me. Seems to be some issues with the Left trigger influencing the axis, but i couldn't get them to play nice together..

honestly I think there seems to be some overlap in my testing between these problems. I noticed that I could move my right analog thumbstick with the left analog trigger, so while I've labeled them as two issues, I feel like they might be related.

I have attached the project related to the link above for folks to play with and learn from and MAYBE find someone to fix it

The big thing is that since this isn't an xbox360 controller, Scirra won't be able to support problems with it. I was able to fully map a xbox controller so it IS working as they claim. Maybe at some point they will add official Ouya support, but nothing so far.

NOTE: I test with Chrome and I have noticed that each time you test you need to completely close Chrome. If you use Node Webkit you shouldn't have this problem, its just a habit for me to stick with things being on chrome

(removed old capx from this because there is a better version available further down)
Last edited by part12studios on Wed Jul 30, 2014 12:14 pm, edited 1 time in total.
B
59
S
9
G
1
Posts: 939
Reputation: 6,545

Post » Tue Jul 29, 2014 7:50 am

part12studios wrote:Ok so I had some quiet time this morning and i'm not known for my patience.. so I went ahead and took a solid stab at adjusting the xbox version of the controller to the Ouya as best as I could.


Sorry man - I was away with my family over the weekend and away with work on Monday - so had no time at all to even look at this.

Thanks for your work on it though - will be checking it out as soon as I have time.
B
17
S
2
Posts: 46
Reputation: 1,105

Post » Tue Jul 29, 2014 1:55 pm

no problem, i was just throwing it out there if you had some time :) it wasn't too tough to remap.. I'm just disappointed about the analog controls I couldn't get to work properly on the Ouya. Hopefully someone can find out what I'm doing wrong.
B
59
S
9
G
1
Posts: 939
Reputation: 6,545

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: David181 and 12 guests