Author Topic: feature suggestion: joystick response curves  (Read 9883 times)

0 Members and 1 Guest are viewing this topic.

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: feature suggestion: joystick response curves
i kinda also want to improve input within scripting too. right now we pretty much have low level access to key presses, mouse axes and buttons, trackir and control axes. the problem is they were kinda implemented as they were needed and arent very intuitive or uniform, both for scripters and players, the way they are implemented. on the script side they all work in different ways and arent really consolidated into a simple structure. scripts that i am currently working on use a lua based parser to load a table file containing keybinds, and the only way for the player to configure them is by editing a text file. i consider this a dirty hack. making custom functions available in the control options would make script development a lot easyer (and better for players too, since they dont need to do anything new to use a new feature).
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Re: feature suggestion: joystick response curves
I agree with the 1st point : multiple input
New joytick and hotas use multiple input id for each part of it (stick/throttle/rudder) and with the last logitech g940 system you'll loose the force feed back feature with using pp joy.
X52 series is taking ages too and i guess it'll be quite soon before they renew theirs hotas product and i guess they'll use the same thing than logitech.

My x52 is getting more and more crazy and the only thing that retain me from buying the g940 is the fso support, as i ll spend  90% of its lifetime on fs2 ^^
The mod flexibility would be great too !
$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: feature suggestion: joystick response curves
I don't know much about DirectInpit and even less about SDL so I'm not sure how to even approach the multiple stick issue.



As for the different response curves... Could you please answer the following

  • What would be the preferred response curve types?
  • On what range should these exists?



Quote
1: support for more than one joystick
2: separate mouse and joystick bindings (no mixing joystick x and y with mouse x and y)
3: more axis commands (lateral thrusters, vertical thrusters, reverse thrusters, view commands (retail snap, pan snap, relative pan, absolute pan, slew, ect))
4: make it trivial to add more key or axis commands as theyre needed in the future (from c or possibly scripting)
5: ability for scripting to post custom commands to the binding options screen, and reading of these options from scripting
6: config import/export from text file
7: advanced mouse options (privateer style, freelancer style, or standard modes)
8: advanced keyboard axes with custom ramping rate settings
All of these would have to be post 3.6.12 ops.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: feature suggestion: joystick response curves
sdl isnt that hard to work with and i think freespace already uses it. heres some code from the nukesim engine.

Code: [Select]
SDL_Joystick *stick;
int numaxes;

if(SDL_NumJoysticks())
{
stick = SDL_JoystickOpen(0);
numaxes = SDL_JoystickNumAxes(stick);
}

its kinda preliminary so far, this pretty much looks for a joystick, if it finds it it opens the first one, producing a handle, and puts the number of axes into numaxes. for a system which uses multiple joysticks, you get the number of joysticks, iterate through them, count the axes on each, generate some mapping data. to get at the raw joystick data you do something like this:

Code: [Select]
int joyaxes[6] = {0,0,0,0,0,0};

if(stick && numaxes > 0) //get joystick state
{
SDL_JoystickUpdate();

for (unsigned i=0; i < numaxes; i++)
{
joyaxes[i] = SDL_JoystickGetAxis(stick, i);
}
}

« Last Edit: January 27, 2010, 03:42:32 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: feature suggestion: joystick response curves
FSO doesn't use SDL on Windows, just Linux and OS X.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: feature suggestion: joystick response curves
FSO doesn't use SDL on Windows, just Linux and OS X.

why not? sdl works just as well in windows from what i can tell from using it.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Re: feature suggestion: joystick response curves
We've been looking at it, and taylor had this to say (actually, I wish I could find it :P )

Basically, the issue is that SDL support was put in there so that other platforms would work, and so that we didn't break anything, it doesn't change the original behaviour of OSApi.
It'd be a bit of an effort to work around that issue.
STRONGTEA. Why can't the x86 be sane?

 

Offline Tomo

  • 28
Re: feature suggestion: joystick response curves
DirectInput appears (as far as I can tell from MSDN) to work pretty much the same way.

- I've only got one joystick so I can't be sure!