When I first used a joystick with bzflag, I didn't understand what this X and Y axis setting meant. I'm using an "SDL-Joystick", so the axes are just numbers. Can you tell what the axes 2 is? I couldn't.
So what I tried the last 3 days was, improving the setup of the joystick axes. It's not as easy as I thought.
While in a menu, the game still (seems to) run in the main loop. And the menu options seem to only react to keypresses, not to joystick movements. Keys are handled as events, joystick movement not.
So here is what I did to improve selection of the appropriate axis for the directions.
If you want to set an axis, first highlight the axis menu option, move the joystick into the direction you want. When you moved the joystick to the max, press enter. Bzflag then checks which axis is at is max (or min) and will set that axis.
It's not as straightforward as I would like to have it, but it's at least something.
But here are my questions
- Did you understand what I just described?
- Do you have an idea how to tell the user about this feature
- Can YOU implement the same change for the other platform specific joysticks?
I tried it with one but didn't understand the implementation details.
- Can YOU think of an idea how to enable joystick movements being treated as events while in menu and the game isn't on.
It should only be active while no game is on because you can access the menus while still playing. I think it would interfere with the game.
This could help improve the whole joystick section, I guess.