Malzbie's Pinball Collection

Malzbie's Pinball Collection

joyrider3774 Dec 26, 2018 @ 2:59pm
(joystick) input problems on the menu making it unable to use
Hi,

Is the an option to completely ignore joystick input or disable it ? I'm having problems running the game on my pinball cabinet. Mainly menu navigation and menu options is acting really weird and it happens due to joystick input. My cabinet has a titling system which provides a hid joypad device where the x and y axis define the titlting of the joypad and the z axis the analogue plunger.

It seems this interfering with your game, somehow it pics up the joypad device (even though i read you only accept xinput) but still it seems to pick it up. i can only make the game work by disabling my joystick device in device manager then your game is working correctly in the menu's.

So if it's not to much to ask please add an option to completly ignore joystick input so i can just disable it in the menu or use a commandline parameter (-NoJoystick) or something. I can make a video to show the problems if you like but it's very specific.

The problem is probabably the x & y axis being used for the tilting system that has some noise like never sitting still.

It could also be this is happening because there is no deadzone setup ? but only guessing here. Also do not understand if you use xinput why my joystick is giving interference it might be picking it up on some other way somehow

I'm currently using http://www.nirsoft.net/utils/device_manager_view.html to enable / disable my joystick device before starting the game and that seems to work also but having an option to completly ignore any joystick input could help as well
Last edited by joyrider3774; Dec 26, 2018 @ 3:20pm
< >
Showing 1-8 of 8 comments
Malzbie  [developer] Dec 27, 2018 @ 8:50am 
Hi.
Every input button or axis is waking up the menu. But the navigation only works with the DPad axis. So I don't know why you have problems with your configuration.
Do you see these problems in every menu? (Main menu / ingame menu)
I'll try to find a sollution.
joyrider3774 Dec 27, 2018 @ 11:14am 
Hi malzbie, yes in every menu, the menu is even unusable due to this thats why i have to disable the joystick to make it work. But i think i might not have explained it correctly so i'll try again in a more detailed way.

On my cabinet there is a arduino micro installed, this arduino micro exposes a hid mouse (not sure what this is used for), hid keyboard and hid joystick device. I attach real arcade / flipper buttons to a PCB where the arduino is connected so that when i for examples press left flipper button it registers as left shift being pressed on the hid keyboard and games / programs register this as being a real keyboard attached while there actually isn't any keyboard attached but just flipper buttons. This is done with all my buttons on my cabinet (2nd left flipper button = left ctrl usually used for magna save or left nudge, right flipper button = right shift, etc). This is just one example of a setup with some people they expose the flipper buttons as buttons being pressed on the hid joystick device and then they assign these buttons inside games.

Now about the tilting nudging system whats probably causing the problems in your game's menu.
a lot of cabinets also have a small sensor inside them probably something similar as in a phone or gyroscope like or some other way to register pushes to the cabinet. This is translated to movement on the X or Y axis of the hid joystick so in games people assign these joystick axises to the joystick axises used for nudging the table. As far as i'm aware your game does not have anlague nudge support and but it's not required either for me (i usually use the extra flipper buttons). However this sensor is constantly measuring little movement so the X and Y values of the joystick hid input device is constantly changing with small values due to me touching the cabinet. Your menu joystick code is indeed constantly triggering / activating the menu and when i try to use a 2nd real keyboard or mouse in the menu's it does not work. Wrong buttons keep being selected or menu postion being reset or even in the option menu i really have no control over it all it just starts changing settings seemingly randomly. but it's actually the sensor for the nudging / tilting system feeding small values to the joystick axis and the menu is probably reacting to it, doing things while it should ignore these small values. Even when i'm not touching my cabinet this the x & y axis from that joystick from the nudging sensor is moving in relatively small amounts. To make it clear there is no really joystick attached to the cabinet, there are no buttons (in my case in other case there can be) it's just the X a Y axis being used for tilting system and the Z axis for the analogue pluner (which also moving in very small amounts constantly).

The only way i see how you can solve this is to implement a configureable joystick deadzone. For example if the joystick x axis value is represented as a value from -1 to 0 to + 1 and having a deadzone value of 0.5 (which might be high) the game would not register -0.2 or +0.2 values as being real (read react to it) because it's bigger than -0.5 and smaller than +0.5. So the deadzone as the name implies just ignores joystick axis data unless a certain (deadzone) value is met. I'm not sure if you have implemented this already or not but it could help people with joystick input. Even my reall xbox 360 gamepad is never at value 0 when i'm not touching it sometimes its a bit higher or lower and thats why deadzones are implemented. The same can be applied if you see values from -32768 to 0 to +32768 it's implemented in the same way but i don't know what kind of values you receive from joystick axis.

Another thing that might be causing is that the z axis of my analogue pluner is in resting postion seens as completely negative (like being pulled back) and not in the center / at 0 position. The reason for this is that the whole axis is used for the analogue plunger but i'm not sure the game reacts to this z axis being constantly seen as being pulled back (-1 or --32768 instead of 0 depending on how the joystick data is being represented)

Another solution would be the have an option to disable / ignore joystick input (in my case) but for people using a cabinet where the controller uses joystick buttons as well for flipper buttons this might not work as it would disable that input as well). Maybe have us select the joypads / which axises to uses instead of all axises if the zaxis might be causing the problems here

I'll try to record a movie as well to show you how the game is reacting to it especially when i try to control it using extra keyboard or mouse. My guess is the problem arrises from the tilting / nudging sensor (which is seen as a joystick with x/y axis) that's constantly in movement and perhaps the game have no deadzone or a too low deadzone (even for activating the menu).

When it happens i do indeed see the menu as contantly being activated an behaving eractily.
I'm not sure i explained it well in more detail to understand it but maybe the video will shed some more light on it
Last edited by joyrider3774; Dec 27, 2018 @ 12:45pm
joyrider3774 Dec 27, 2018 @ 12:02pm 
here's a video showing the problem and more information to shed some light on it. It's probably either the zaxis not being centered or the x & y axis have constant small changes.

https://youtu.be/vUa0PJkwt5U

I have not tested yet but the problem might not be that important anymore if we can skip the menu's now using the commandline parameters to start a table. It could be it has no influence when actually playing a table so it could eventually be ignored if that's the case. Since this joystick does not act as a really joystick would. But it could introduce problems for people with cabinets to setup game options before using the commandline parameters. i'll keep you posted

Last edited by joyrider3774; Dec 27, 2018 @ 12:03pm
Zentory  [developer] Dec 27, 2018 @ 12:29pm 
Thank you for this great information.
As I can see, this is a deadzone problem. The fact is, I'm using XInput for the game and the menu but the menu is listening to the old direct Input values too.
I have a Thrustmaster Flightstick with many joystick axis and I'm shure I can simulate your device to find the problem.
Give me some time. :)
joyrider3774 Dec 27, 2018 @ 12:52pm 
Thanks,
Lets hope it's the deadzone thing and not the zaxis not being centered then :)

Btw having an option to ignore direct input and only use xinput might solve it also. What most people do in that case use a program called xbox 360 ce it basically maps direct input to xinput by replacing the xinput.dll (well actually place their own wrapper inside the same directory as the game's executable) so the game loads that file instead of the normal file. In xbox 360 ce they can choose what axises buttons etc from direct input can be mapped to xinput values / axises (xbox 360 simulated joypad). Thats how most people do it for pinball fx2/3 if they have a direct input device. https://www.x360ce.com/

But have the option to disable either of them or even both (in case we only want keyboard input) might be a good option also

i can go around the problem in my cabinet but i'm not sure all people can or know how to
Last edited by joyrider3774; Dec 27, 2018 @ 12:54pm
Malzbie  [developer] Dec 29, 2018 @ 10:56am 
I've made an Update and now there is a big deadzone for the DPad axis. I hope this will help you and other pinballX users. If not ( maybe because of your max value from the plunger) I don't know what I can do. You've written that it is no problem anymore for you because of the direct load. Nonetheless I try to help every user and if other users are using a similar config like your config, the deadzone could be helpfull for them.
joyrider3774 Dec 29, 2018 @ 4:37pm 
Hi malzbie, i just tested the new version and the problem persists if i launch normally but indeed as said when i use the command line options i have no problem what so ever using the game as we skip the menu's. I asked another user that has it also setup on their cabinet to see if they encounter the same problem but have not gotten answer yet.

For me it's no problem anymore and it could be very specific for my setup. It probably is not the deadzone then but maybe something else.

For people encountering a similar issue using the game on their cabinet. Start by disabling your joypad input hid devices in device manager from windows, set up the game and then use pinballx to launch the tables using commandline the joystick problem won't interfere during normal play it's only on the menu's.

I also don't know what you can do more about it to fix it but i would not look into it anymore as for me it's a no issue anymore. Thanks for the effort and even though it did not fix my problem having a deadzone (although not too high / big) is still a good idea for people using joysticks / joypads
davidfletcher100 Nov 30, 2024 @ 7:10pm 
Mine is doing this and i don't have anything plugged in.
< >
Showing 1-8 of 8 comments
Per page: 1530 50