Talon Game

Refractory Studios

You are not logged in.

Announcement

Version 1.2 released; new game mode, new map, misc improvements

#1 2018-09-10 02:28:10

Hypersonic
Member
Registered: 2014-02-24
Posts: 37

Configuring joystick by editing the .cs file

In previous versions this worked well with a 6DOF joystick

moveMap.bind(joystick0, "rzaxis", yaw);
moveMap.bind(joystick0, "rxaxis", I, pitch);
moveMap.bind(joystick0, "ryaxis", I, roll);
moveMap.bind(joystick0, "xaxis", moveAxisLR);
moveMap.bind(joystick0, "yaxis", I, moveAxisFB);
moveMap.bind(joystick0, "zaxis", I, moveAxisUD);

1st parameter joystick number
2nd parameter joystick axis
(optional inverse parameter)
3rd parameter action

Version 1.2 seems to add parameters, this what I saw as default

moveMap.bind(joystick0, "xaxis", SD, "-0.050000 0.050000", 2.000000, yaw);
moveMap.bind(joystick0, "yaxis", SDI, "-0.050000 0.050000", 2.000000, pitch);
moveMap.bind(joystick0, "rzaxis", SD, "-0.300000 0.300000", 2.000000, roll);
moveMap.bind(joystick0, "slider", SDI, "-0.300000 0.300000", 2.000000, moveAxisFB);

1st parameter joystick number
2nd parameter joystick axis
3rd parameter (I = inverse, S = sensitivity?, D = deadzone?)
4th parameter a pair of numbers, perhaps deadzone in each direction?
5th parameter sensitivity?
6th parameter action

Can anyone fill in the blanks on the new parameter? Thanks!

EDIT: no luck so far, ship spining around like mad, can't control it at all when trying this

moveMap.bind(joystick0, "rzaxis", SD, "-0.500000 0.500000", 1.000000, yaw);
moveMap.bind(joystick0, "rxaxis", SDI, "-0.500000 0.500000", 1.000000, pitch);
moveMap.bind(joystick0, "ryaxis", SDI, "-0.500000 0.500000", 1.000000, roll);
moveMap.bind(joystick0, "xaxis", SD, "-0.500000 0.500000", 1.000000, moveAxisLR);
moveMap.bind(joystick0, "yaxis", SDI, "-0.500000 0.500000", 1.000000, moveAxisFB);
moveMap.bind(joystick0, "zaxis", SDI, "-0.500000 0.500000", 1.000000, moveAxisUD);

Even with what I think is a 50% deadzone it still spins uncontrollably. v1.0.3 worked like a charm.

Also how do you enable the console?

Last edited by Hypersonic (2018-09-10 02:43:51)

Offline

#2 2018-09-10 02:44:26

Scott
Refractory Studios
Registered: 2012-08-07
Posts: 463
Website

Re: Configuring joystick by editing the .cs file

Doesn't look like you left any blanks to fill. That's exactly what it is. S and D tell the parser what to expect in the following parameters, so if you had only a sensitivity factor or only a deadzone it would be just S or just D and it would know what to do with the next parameter.

Offline

#3 2018-09-10 02:46:32

Scott
Refractory Studios
Registered: 2012-08-07
Posts: 463
Website

Re: Configuring joystick by editing the .cs file

Well that's odd. I'll plug in a stick and verify I didn't screw something up. What axis or axes are you having trouble with?

Console is Alt-~

Offline

#4 2018-09-10 02:57:35

Scott
Refractory Studios
Registered: 2012-08-07
Posts: 463
Website

Re: Configuring joystick by editing the .cs file

My Logitech 3D's working fine; what type of device do you have?

Offline

#5 2018-09-10 03:24:54

Hypersonic
Member
Registered: 2014-02-24
Posts: 37

Re: Configuring joystick by editing the .cs file

Thanks for the console bind, typing quit in the console exits much faster.

I use Space Navigator which is basically a 6DOF joystick. I also have a Thrustmaster 16000 plugged in, I'll try disconnecting that and see if that's causing a problem. Not sure which axis, possibly all, difficult to tell when its spins like crazy.

So the order doesn't matter? Can do SDI, DIS, ISD? If it sees a number pair it knows that's deadzone, and a single number is automatically sensitivity?

Offline

#6 2018-09-10 03:38:19

Hypersonic
Member
Registered: 2014-02-24
Posts: 37

Re: Configuring joystick by editing the .cs file

I disconnected the Thrustmaster to factor that out.

I changed all of the 1.000000 to 0.000000 which I assume would essentially disable all axis. The 2 buttons worked (fired weapons) but as soon as I moved the puck just slightly it goes into a wild spin (yaw/pitch/roll) and probably all translational thrusters. I let go of the puck and it's still doing it, pulling up to 1.5g and 500 on the right indicator (speed?)

I'm surprised as it worked very well in 1.0.3, I saw in the notes some work on the joystick code, perhaps its related. I'll try 1.0.3 again to verify.

Offline

#7 2018-09-10 03:49:27

Scott
Refractory Studios
Registered: 2012-08-07
Posts: 463
Website

Re: Configuring joystick by editing the .cs file

The order of the letters SDI doesn't matter, but the order of the arguments does. If both sensitivity and deadzone are give, it is expected that deadzone is first.

Alt-F4 is even faster than "quit";

edit:
Yup did mess with the joystick code; doubt it would have had this effect but I can't be sure.

Last edited by Scott (2018-09-10 03:59:52)

Offline

#8 2018-09-10 04:03:40

Hypersonic
Member
Registered: 2014-02-24
Posts: 37

Re: Configuring joystick by editing the .cs file

Thanks for the info on the order. Oh ya, forgot about alt-F4.

I just tried v1.0 and v1.0.3, and I'm getting the spin there as well, even though they worked fine before, I don't know what changed. I play many other 6DOF games with no problems, not sure what's causing it.

The slightest touch and it goes bonkers. I think it's reading it as a slider instead of absolute, I've seen this before on a few other games. However it wasn't this way before on these talon versions, I just don't get it.

If I open the option menu the spinning stops.

Last edited by Hypersonic (2018-09-10 04:05:53)

Offline

#9 2018-09-10 04:11:22

Scott
Refractory Studios
Registered: 2012-08-07
Posts: 463
Website

Re: Configuring joystick by editing the .cs file

Could something have changed with the SpaceNavigtor config and/or the joystick emulator you're maybe using with it?

Torque has code already in place to write a log of all the device input the app processes, which would be incredibly useful in cases like this, but it's all wrapped in #ifdefs, so I need to make a build with it enabled... which is a stupidly inconvenient way to do it. I'm sure the performance cost of replacing the pound defines with if conditionals will be insignificant, and it would allow to enable this logging at runtime in all builds. So I'm going to change that... but not tonight. Dunno why I never thought to do that before; it would be quite useful.

Offline

#10 2018-09-10 04:33:17

Hypersonic
Member
Registered: 2014-02-24
Posts: 37

Re: Configuring joystick by editing the .cs file

It's a newer driver and I suppose config file, maybe that's the cause. I know it's treating it as a relative (slider) device though rather than absolute, since if I'm careful and make sure I barely tap on just one axis it'll only continuously travel on that axis. If I tap it in the other direction it'll go in that other direction. Even with sensitivity 0.000001 it's crazy sensitive.

Going to attempt some more diagnostics. Ya a log would be nice, see what kind of values are being inputted.

EDIT:
OK, I disabled button one on my driver, but the game still sees button one. That means the game or direct input is not using the emulated joystick driver, rather it's tapping directly into the USB joystick interface. I'm trying to see if the game also see the driver buy trying joystick1 and joystick2, so far no luck.

Last edited by Hypersonic (2018-09-10 04:37:28)

Offline

#11 2018-09-10 04:54:03

Scott
Refractory Studios
Registered: 2012-08-07
Posts: 463
Website

Re: Configuring joystick by editing the .cs file

Kinda sounds like it's behaving like a mouse. If it's behaving like a mouse, you might try binding it like a mouse axis. Won't help for movement, but it might for rotation.

I will probably have a build with input logging tomorrow at this time.

Offline

#12 2018-09-10 15:30:44

Hypersonic
Member
Registered: 2014-02-24
Posts: 37

Re: Configuring joystick by editing the .cs file

Some related links

https://www.3dconnexion.com/forum/viewtopic.php?t=36190
"The axes always report accumulated relative values."

https://github.com/nsensfel/relabsd
"Bypass an issue causing your device to report its axis are relative when they are absolutes"

Windows seems to create 2 direct input instances of a Space Navigator. One called Space Navigator (drawing straight from raw USB HID) which is sometimes erroneously considered a relative device. Another called KMJ Emulator (via the driver) which is considered an absolute device.

Maybe if Talon would allow access to the KML Emulator instance it should be fine. I've tried joystick0 joystick1 joystick2, but I couldn't find it.

Offline

#13 2018-09-11 05:20:59

Scott
Refractory Studios
Registered: 2012-08-07
Posts: 463
Website

Re: Configuring joystick by editing the .cs file

Interesting. I would expect Talon to detect both; but I don't know how it would identify them. The problem may be that the axis mapping UI detects the first device from which it receives input, so if you want to map a joystick axis, you have to not move the mouse while you're doing it. But with this device, it is probably impossible to not generate an event from the Space Navigator every time and immediately before an event from the KML Emulator. So Talon would always register the relative device. Sure you could get around this by editing the binding config file yourself, as you have been doing, but you'll need to know the string by which Talon has identified the emulator device.

I could look into adding move/strafe bindings that take relative axis input... but let's see if we can get this working as a joystick first.

Offline

Board footer

Powered by FluxBB 1.5.9