Input maybe a bug?

Miscellaneous Forums/General Discussion/Input maybe a bug?

I thought id ask here before saying its a bug, but ive been having trouble with joypads and port numbers in blitz3d.

ok I have a game which i have configured to use 4 control pads, I got myself 3 extra Logitech Dual Action Gamepads because i really like the one ive got and ive had no trouble getting it to work in blitz3d. Ive not done anything fancy ive just used the standard

if joydown(buttonNumber, port)
speed = speed +1
etc

with all 4 pads plugged it works fine on my computer. but round my friends house on his machine with the same 4 pads and same version of my game, the first pad works fine, the second pad i can't steer but can speed up brake etc, the really odd thing is when i press button 4 on the second pad, the first car revearses.

the only difference in the setup is my friend has a usb keyboard and mouse does this some how screw up the port numbers because the mouse is a human input device in windows isnt it?

its driving me round the bend.

I wouldn't rely on port numbers being assigned to a specific controller. A guy called Pepsi wrote a small userlib a couple of years ago to get a string name for each controller, so you might use that. I don't know if he (or his DLL) are still around.

I don't know why you'd get different results on different PCs regarding d-pad and buttons. The only time I've known this happen is with controllers with throttle/yaw/pov controls etc.

GetJoyProperty$() by fredborg

http://www.blitzbasic.com/codearcs/codearcs.php?code=840

is this the same thing?

i guess to have results on all systems im going to have to write some code that scans to see what controllers are connected and allows the user to pick what controls they want to use. I guess this is a bit unusual because not alot of games have more than 1 - 2 players on the same screen

ok ive just taken another look at my code and the odd reverse think was my code but the port number do get screwed up on my friends system.

I dont think that fredborgs getjoyproperty$() function will help because the control pads are all the same and it get the string from the driver its using. when i get my pads back ill give it a try. i left them at my friends because we also use them for Pro evolution soccer ;OP

Easiest way to handle this is to not assign the joypad ports to certain things in the game. Have a config screen come up where it asks you to press player 1 accelerate, then press the right button on the joypad. Then ask about the next button, etc...

Yeah i guess a screen that says "player one press and button" and then player 2 press any button etc.