Forums

Full Version: Control editing...finally
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I just checked in (r1557) a bunch of changes to start control editing support. The point of this is to allow the user to assign controls, then edit the properties of those controls, if they wish to. This is done in a new sub-menu and is accessed in the way that controls used to be deleted by. Instead of this method for deletion, there is now a Delete button on the control editing page. The settings on the page do not actually affect anything yet, but will soon...stay tuned 8)
Looks good so far, but it'd be nice to have a way to link the controls for deadzone gain and exponent for steering so that you don't end up with separate settings for steering left and right. Is that possible? Also, I'd like to see a real-time display of the current input before and after processing (like a raw input and then the input after the deadzone, gain, and exponent are applied)... or at least a real-time display of the input after processing.
Do you mean, that we don't want to allow users to have separate deadzones on Axis1(+) and Axis1(-)? I've been thinking about that, could there be cases where people want different deadzones/exponents/gains on different parts of the same axis? Maybe the best way to solve this would be to add a toggle to copy the settings to controls on the same axis, or adjacent controls (like if we're on steer left, copy the stuff to the steer right controls). This adds yet more complexity to the control editing process...

As for the real-time display of the input plus processing, rather than try to stuff all that in the Edit Controls menu, why don't we set up a separate menu called "Test Controls" where we can put one of the cars, show its wheels move with the steering, show the input graph, and maybe add some other cool things like moving steering wheel and gas pedals. This would let the user test all their controls, without starting a new game.
Quote:Do you mean, that we don't want to allow users to have separate deadzones on Axis1(+) and Axis1(-)?

No, I don't mean that -- I can imagine people could want different settings on gas and brake, for example.

Quote:Maybe the best way to solve this would be to add a toggle to copy the settings to ... adjacent controls (like if we're on steer left, copy the stuff to the steer right controls).

That's what I mean. I think that's a good solution if it's not too much trouble. That's the only control that I can think of that you would need to do that on, so it could be treated as a special case.

Quote:As for the real-time display of the input plus processing, rather than try to stuff all that in the Edit Controls menu, why don't we set up a separate menu called "Test Controls"

The reason I want it in the edit controls menu is because it's not immediately obvious how the different positions on the slider will influence your control. As an example: my joystick doesn't do a perfect job of centering the driving axis (it will bounce around a bit) and that causes problems, obviously, when driving. To fix this, I use the deadzone. Deadzone isn't a desirable thing, though, so I only want to add as much as needed. Having at least the processed control's output graphed on the edit controls screen is that way I can drag the deadzone slider to the right until I see the twitching go away.

Also, having the output on the edit controls screen gives you real time feedback on your other adjustments like exponent. It would suck to have to try a value, click around in the GUI for a while, try it out, click around in the GUI for a while, try another value, etc.
I haven't got any kind of copy settings to adjacent controls thing yet, but the settings changed in the edit controls menu should now be saved properly, in SVN r1564. So far, the edit controls menus let you edit the following for different types of controls:
  • type: Joy Axis - deadzone, gain, exponent
  • type: Joy Button, Mouse Button, Key - up/down and held/once
  • type: Mouse Motion - deadzone, gain, exponent
I'm not quite sure if the Mouse Motion settings will have any effect in-game. Actually deadzone and exponent don't make sense on a mouse. I'll have to fix that...

Please test this out for me and give me some ideas on how to make this a little better.

Some thoughts/problems:
  • sliders only set a value between 0.0 and 1.0. The min and max values for deadzone, gain and exponent should all be different from that. I'll have to figure out some kind of solution...
  • The slider should probably display the value that it's being set to in percentage, but the value wouldn't make much sense without having min/max values.
  • The mouse-over icon for controls in the controlgrab widget has an X over it, which doesn't make much sense anymore since the action is edit, not delete. I'll make a new icon soon, for now it doesn't change when selected.
  • There should be some way to copy settings to adjacent controls as Joe has said.
  • It'd be nice to visualize the values as Joe has mentioned, I can probably adapt some code from the joystick calibration widget and make a new widget that does this.
I'm sort of leaning towards putting off fixing the last two points until the next release cycle. They would both probably take a good bit of extra time, and if I get the other stuff finished up, we could do a release very soon...
Note that deadzone and exponent DO make sense for the mouse, deadzone because some people don't want a mouse action like braking to occur right after they stop accelerating, and exponent because some people like non-linear steering where the mouse is least sensitive around the point at which the action starts happening. I didn't describe that very well... catch me on IRC if you still aren't convinced.

Also, note that 0.0 to 1.0 is the correct range for deadzone. It's a percent value (0.1 means 10%).

Personally, I'm for releasing once you add a display showing the current deadzone/gain/exponent values (at least that way I can match the left and right steering deadzones manually).
The reason I said deadzone should be different is that no one is going to want to set their joystick axis's deadzone at 100%. That would turn it off. I'd rather they chose between 0 and 50% at the most, maybe even less, what do you think?

Thinking more about displaying values of sliders, some should display as percentages and others as raw numbers (like exponent).

What should the min and max values for gain and exponent be? I'm thinking gain should not go down to 0. would 50% to 300% be reasonable? What about exponent, 0.5 - 3.0 there too?
Exponent should not be < 1.0. Maybe 1.0 to 5.0?

Deadzone 0% to 50% sounds good.

Gain 50% to 300% also sounds good.
I just checked in support for displaying slider values in percentage or decimal, and fixed the min & max values as you've described. Check it out, SVN r1567. I'll add some new mouse over control icons soon.
Control selection icons are updated in r1568.
There is a weird bug messing this up. When I add my controls for steer left and right on my joystick it works fine. If I then return to the Car Controls menu, and edit the steer left and right controls (changing the deadzone and exponent mainly), then return to the game, suddenly...my steer left control seems to now be steering right. This is very odd. I thought maybe a value wasn't getting copied when a CONTROL object got passed around, so I wrote a proper copy constructor for this class, but that didn't help. Any ideas?

edit: If I set the exponent on the control to 2.2 or 3.0 it goes backwards. If I set it to 1.0 it's fine...this seems to be a bug with the code that applies the exponent.
If I change the exponent to 3 by hand in the controls file, I don't get any reversal. I think the problem might be in your code... can you check your controls file after you're getting goofy behavior and tell me what it looks like? Also, if you get goofy behavior, does quitting and then restarting VDrift fix it?
The controls file reflects correctly what I set in the gui, the problem persists after a restart. Playing around with it a little more, I see that if the exponent value is 3, everything is fine. However if I set both steer_left or steer_right to 2.2, 2.4, 2.6 or probably any value in between, steer_right works correctly, while steer_left works backwards (when I steer left, it steers right instead). I tested this by setting the values manually in the controls file, to be sure, and still got this problem.
Thanks for the fix Joe, seems to work alright in SVN r1571. The steering is back to normal no matter what exponent value I use on the axes.

This stuff all seems to work pretty well. I was able to adjust the deadzone on one axis during the game and eliminate brakes being applied when I let go of the gas.

What should we do now with the "Touchiness Compensation" setting in Options -> Controls? There are still some settings in there that are not covered by the individual control adjustments, like 200 degree wheel mode, and the speed-sensitive steering settings.

If the control adjustments are properly applied to the mouse, then I think we can remove the Options -> Controls -> Mouse Options menu entirely, along with its related settings.
I think we should add a "steering speed sensitivity" percentage setting (one single setting, not one for each control) and then remove the touchiness compensation setting.
Pages: 1 2