Using Gamepads
Displaying 1-2 of 2 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Kryptonite803

Yay! More questions from me!

Ok, I can see that some people have taken advantage of gamepads for their games. I would like to do the same. I understand that you can add scan codes to a verge file and call that scan code later in the actual code.

If that is how you do it, how do I go about getting the scan codes from my gamepad? Or is there something simpler I'm missing?

Posted on 2009-08-07 12:35:03

Overkill

There are two options, really.

The most manual way is through the joystick functions

Or you can use the default Verge buttons up/down/left/right/b1-b4 (which, whoa, where did the documentation for these go?), and use SetButtonKey()/SetButtonJB() to modify the button mappings.

I prefer the first way myself, though. Since a lot of games nowadays use more than 4 buttons.

When I use vx, it provides an abstract "button" class, which allows any boolean state input to be checked or unpressed. I can then easily write an input checker which looks at a list of custom button settings. And this list can easily be stored in a table, so I can change button names and my startup loader finds the proper scancodes and joystick buttons and such and uses those in my game. It's kind of handy! :D

Posted on 2009-08-07 13:28:11 (last edited on 2009-08-07 13:28:35)


Displaying 1-2 of 2 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.