Improved(?) Joystick setup (about my implementation)

Make suggestions for improving one of the best games on the net!
Post Reply
User avatar
Private First Class
Private First Class
Posts: 122
Joined: Sun Jun 04, 2006 3:27 pm
Location: Near Aix La Chappel

Improved(?) Joystick setup (about my implementation)

Post by Skeeve » Thu Sep 25, 2008 7:10 am


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
  1. Did you understand what I just described?
  2. Do you have an idea how to tell the user about this feature
  3. Can YOU implement the same change for the other platform specific joysticks?
    I tried it with one but didn't understand the implementation details.
  4. 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.
Avatar created with South Park Studio

Don't you hate it when your posts get deleted without any note?

Post Reply