Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / More raw joystick questions / requests

Author
Message
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Mar 2016 22:05
Righto, As people may or may not know, I've been messing with the raw input commands as I've been upgrading my game engine to version 3 for the creation of my VR Zelda game.

I've noticed something funny about certain joypad commands. My engine polls all input axes if a joypad is detected.

I have an xbox one controller, which has 6 input axes. Left thumbstick X/Y, right thumbstick X/Y, left trigger and right trigger.
Everything is fine with this, the sun is shining, and petrol is free!

I also have a Krusty brand imitation ps1 type digital joypad, which has 2 axes, D pad X, and D pad Y.
GetRawJoystickX and GetRawJoystickY work as expected. (yippee!) The problems start when you try and get the other inputs, which don't exist.

Is it just this one controller, or does AppGameKit report -1.000000 for all non-existent axes for other people/devices?

It's not a big deal, but I don't like the idea of phantom data being returned when the input source doesn't exist.



And here's the request to the mighty AppGameKit developers of doom of destiny.... Can we get AppGameKit to return a big fat 0 instead?
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 4th Mar 2016 09:47
All controllers I have tried with the joystick commands have the same layout.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Mar 2016 13:20
Quote: "All controllers I have tried with the joystick commands have the same layout."

What? you mean they're all of the same type, or all produce the same -1 effect for missing axes?
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 4th Mar 2016 14:00
They all have the same setup with 2 joysticks and 2 triggers. So I haven't tried on anything else.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Mar 2016 15:42
Ah, right then. No worries.

Maybe someone else can post to let me know?
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 5th Mar 2016 01:50
I can't help you. AppGameKit doesn't even see my joystick.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Mar 2016 18:17
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 7th Mar 2016 16:44
This is due to the range we are using on the DirectInput joysticks, it uses 0 to 65535 so anything that returns 0 would be at the far left of the scale and become -1. I'll change it for the next version to -32768 to 32767 so 0 lands in the middle of the range.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 7th Mar 2016 16:55
Words cannot describe how happy that makes me.

Thanks!

Login to post a reply

Server time is: 2024-11-25 10:18:51
Your offset time is: 2024-11-25 10:18:51