JoyStick library

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

JoyStick library

Post by luis »

There should be a way to ask the library for the total number of buttons and pads (if not axis) available on the specified joystick. This should be a minimum prerequisite for any joystick library.

The pad concept could also be removed.
We could simply have a command returning the total number of button and axis, and then access them through their index number without juggling pad numbers.

But at least the first point is really needed, to avoid polling a random number of things to see is something is there, to appropriately show an interface for mapping, etc.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
dobro
Enthusiast
Enthusiast
Posts: 766
Joined: Sun Oct 31, 2004 10:54 am
Location: France
Contact:

Re: JoyStick library

Post by dobro »

I do not not understand why Fred used the LIB : SFML

http://www.sfml-dev.org/index.php
http://www.sfml-dev.org/index-fr.php (in French )

while containing much better than Libs of Purebasic ...
Joystick ,Screen, Sprites, FTP, FX , etc ....

G-Rom on the French forum make a Wrapper for this :D
Image
Windows 98/7/10 - PB 5.42
■ sites : http://michel.dobro.free.fr/
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: JoyStick library

Post by luis »

Actually, no lib is perfect.
I've tried probably most of them (SFML included) and if I've not tried them I've looked at the sources to see how they were structured, what kind of choices did they made, etc.
In any case SFML does too much for me, and probably for PB too.

Also every single one has some kind of problem somewhere.
Every single one was not comparable to what I can do myself on a single platform (Windows). I understand they are cross-platform and have multiple constrains to balance to keep a single API for all, but the fact is if I have to decrease the quality on a platform to support three, is not a trade-off I want to make, especially since I'm mostly interested in Windows. I don't have markets to reach, I just want to have fun.

And you end up depending ALSO on them and their time tables for fixes and enhancements, as if depending on some PB library to be fixed / maintained wasn't enough. And those times can be very long :(

But I must give an honorable mention to SDL 2.x. It has its problem too but it's the one designed in the most robust way, it's clear who has written it knows his stuff. It's the oldest and it shows (in a good way).

If the current PB joystick lib will be fixed (see my bug reports) and modified to accommodate what requested here, it will be good enough, I think. At this point, maybe I'm not going to use it depending on the time required and I'll redo this by myself, I don't know, but obviously it's irrelevant for everyone else, so I'm reporting the problems anyway.
"Have you tried turning it off and on again ?"
A little PureBasic review
Post Reply