Page 1 of 1

Joypad userlib (several joysticks at the same time)

Posted: Thu Aug 17, 2006 3:05 am
by Dr. Dri
Nobody has tested the small app i posted here, however, the few persons who tested it didn't have any problem. The lib is now available for download and i hope game programmers will enjoy it.

The help file doesn't work properly but i will see what i can do later... Maybe can someone fix it for me ? :lol:

Image
Joypad.zip

Image

next step : force feedback

Dri

Posted: Thu Aug 17, 2006 12:23 pm
by whertz
Excellent. This will come in very handy for my 4-player game. I will give it a try and let you know how it works.

Posted: Thu Aug 17, 2006 12:27 pm
by Dr. Dri
The compiled userlib was not the good one, if you have downloaded it, optional params may not work...
Fixed and uploaded ^^

Dri

Posted: Thu Aug 17, 2006 12:35 pm
by dontmailme
Very Nice :D

You think you can add Force Feedback ? Seems to be a minefield to me :(

Posted: Thu Aug 17, 2006 12:43 pm
by Dr. Dri
whertz wrote:Excellent. This will come in very handy for my 4-player game. I will give it a try and let you know how it works.
I hope your game will be excellent too ^^
dontmailme wrote:You think you can add Force Feedback ? Seems to be a minefield to me :(
I will add it, but i first have to see how it works. And of course i have to think about the easiest way to do it (for the user) with the maximum of force feedback effects...

Dri

Posted: Fri Aug 18, 2006 7:34 pm
by Shannara
Heh, i can continue my bomberman clone now :) Sweeeeet, thank you!

Posted: Fri Aug 18, 2006 8:14 pm
by Dr. Dri
Shannara wrote:Heh, i can continue my bomberman clone now :) Sweeeeet, thank you!
I can even say that your bombs will be able to shake our joypads :P

Good news:
joypads are now listed with an array instead of a linked list
no more "current element" problems (for example with threads...)

i'm ading force feedback support. i only plan to use standard effects.
i have made functions to list supported effects, effects names and i will probably make a stack to add effects to the joypad.

-> i wanted to use this but i really think it's too much
http://www.purebasic.fr/english/viewtopic.php?t=22367

Bad news:
if i create a unicode program that use the lib JoypadName fails, it does not append if i "includefile" the source code...

Dri

Posted: Fri Aug 18, 2006 8:24 pm
by Flype
Shannara wrote:Heh, i can continue my bomberman clone now :) Sweeeeet, thank you!
there's also the JoystickEx userlib which handle up to 16 joystick since some month, yet. but well, no problem :P

http://www.purebasic.fr/english/viewtop ... highlight=

mine is based on all the available joystick's functions of the winmm.lib
the only bad thing with the winmm is that it can't handle forcefeedback.

dr dri's one is based on directx, like the one built in purebasic.
so forcefeedback can be implemented. dr dri's working on it.

that's good to have two more joystick's userlib.
i can see one more possible implementation : SDL.
(i have done it month ago - somewhere on my harddisk)

so today, for using joysticks :

- PureBasic - only one device supported (directx)
- JoystickEx UserLib (winmm)
- Joypad UserLib (directx)
- SDL_joystick

Posted: Fri Aug 18, 2006 8:27 pm
by Flype
Bad news:
if i create a unicode program that use the lib JoypadName fails, it does not append if i "includefile" the source code...
i encountered the same problem with tailbite with some libs.
but, are you using strings inside your lib ?

Posted: Fri Aug 18, 2006 9:39 pm
by Dr. Dri
Flype wrote:i encountered the same problem with tailbite with some libs.
but, are you using strings inside your lib ?
JoypadName() and JoypadEffectName()

Dri

Posted: Wed Aug 23, 2006 2:17 pm
by Flype
hello dr dri, do you manage to implement the force feedback ?
maybe if you hesitate for the name of the functions we can vote and help.

Posted: Wed Aug 23, 2006 5:51 pm
by Dr. Dri
i'm working on something else (we talked about it on french forum, pm)
i just wait for a wheel with force feedback

i also needed some sound (synchro) functions so i got deeper in dx stuff to see what's possible.
http://www.purebasic.fr/english/viewtopic.php?t=23336

Dri

Posted: Sun Jul 22, 2007 1:00 pm
by oakvalley
I downloaded this thing, very nice! Work as expected, but only when
I added this into the Source\Joypad.pb

Macro DegToRad(Angle)
(Angle * #PI / 180)
EndMacro

at the top of the source just before the first procedure.

Otherwise it could not compile.