Fork me on GitHub
#clojure-gamedev
<
2016-08-26
>
spacepluk10:08:27

@selfsame it's fun! 🙂

idiomancy17:08:46

has anyone here worked with libgdx before? specifically, there seems to be an issue with their controller support. both triggers (left trigger and right trigger) are mapped to the 4th axis of the controller, rather than having separate axes. left trigger is 4th axis positive, right trigger is 4th axis negative soooo if you hold down both triggers, you get a net input of zero...

idiomancy17:08:55

theres got to be a way to fix that.

oahner17:08:42

@idiomancy you can poll whether each trigger is being pressed down with getButton

idiomancy17:08:05

they aren't buttons though

idiomancy17:08:09

they're axes

idiomancy17:08:15

they have continuous values

idiomancy17:08:01

so if the net value of the axis is, say, -0.25, you have no way of knowing what the value of each trigger is

idiomancy17:08:36

-0.25 could mean LT 0.5 RT -0.75 or LT 0.4 RT -0.85

idiomancy17:08:41

or a million other things

oahner17:08:26

triggers aren't very reliable for that

oahner17:08:44

altho, have you checked if your controller supports axes above 4?

idiomancy17:08:49

the xbox controller?

idiomancy17:08:31

yes it supports more than 4 axes. You can map them separately in JoyToKey

idiomancy17:08:02

also, triggers should be exceedingly reliably for that, they're independently pressure sensitive axes

idiomancy17:08:14

so, imagine having a mecha game like Robot Alchemic Drive https://en.wikipedia.org/wiki/Robot_Alchemic_Drive where the left leg is moved with the left trigger, and right leg is moved with right trigger.

idiomancy17:08:37

that would be completely impossible unless you had the independent values of those triggers

oahner17:08:57

sure, triggers are reliable if you know exactly which controller you support

oahner17:08:10

but not otherwise

oahner17:08:32

in this case tho, I think it's a bug in lwjgl

oahner17:08:48

which libgdx version are you running?

oahner17:08:27

just for the fun of it, try 1.9.4

idiomancy17:08:22

same thing in 1.9.4

oahner17:08:58

hmm, the fix I'm looking at only made it into lwjgl 3

idiomancy18:08:49

what fix is that?

idiomancy18:08:10

and is lwjgl the new or old version, hahaha

idiomancy18:08:31

huh. So. I suppose I need to look into how to use lwjgl 3

oahner18:08:49

it might solve this particular issue

idiomancy18:08:32

do you know offhand how to specify that you want an lwjgl 3 app? There's no Lwgl3Application class I can instantiate 😛 (that would be too easy i suppose)

oahner18:08:01

sorry, I've never used it myself

oahner18:08:12

I would start with changing the backend dependency

oahner18:08:30

I think the controllers extension also needs another dependency for it

idiomancy18:08:01

yeah, sure thing. I can do the legwork, I was just curious if you happened to know offhand. If its any work to figure it out, dont worry about it, thats my job.

oahner18:08:06

I have to get ready for ludum dare myself 😛

idiomancy20:08:34

fyi @oahner I was wrong, there is just a "Lwjgl3Application" class you can drop in and replace the LwjglApplication with

idiomancy20:08:45

and the deps are super easy.

idiomancy20:08:05

and, all the input works like a charm in 3