It would be great to have some kind of controller presets like:
- Mouse/ Keyboard
- Joystick
- Gamepad
- Wheel/ Pedals
So we could set/ deliver "Steer Sens.", "Sp. Sens" (what ever this is) and "Dead Zone" values that fits to the controller type. My gamepad needs much lower values as my mouse/ keyboard requires to drive well.
So the "Control Configuration" screen of the player could start with the type of the controller, followed by fitting presets for the game controls and on the end inputs of "Steer Sens.", "Sp. Sens", "Dead Zone" that have usefull values.
Maybe some for of 'wizard' would be a good idea, there are so many possibilities. For example the logitech wheels are 240, 270, 540 or 900' range.
If the wizard presented a list of controllers, with their names and allowed to user to select the one they wanted. The wizard could then analyse the names of the axis to do a best guess at which ones to use for what, and jump to the control select menu. The user would still need to perform calibration.
The naming of 'steer sensitity' is a little misleading, it seems to be more a 'steering linearity'. With '1' being 100% linear and increasingly smaller values less sensitive in middle/more sensitive at the outside limits.
I'm not sure that this is simple enough to implement for 2.0
Hi Simon,
tahnks foor your feedback. Did you know what "Sp. Sens" is?
"For example the logitech wheels are 240, 270, 540 or 900' range." < Waht/ where kind of range?
Sp. Sens:
https://sourceforge.net/apps/trac/speed-dreams/browser/trunk/src/drivers/human/human.cpp#L678
pow(ax0, 1.0f / cmd[CMD_LEFTSTEER].sens)
By range I mean the amount of angular turn possible, the fancy wheels can be set to turn any amount.
At present no menu work which would make this possible. Changing to 'post 2.0'.
Diff:
There are different control profiles in data/drivers/human/preferences.xml for a mouse and multiple joysticks and wheels but it looks like nothing uses them. Is this something that was never finished? Are there plans to implement this or a description of how this was intended to be implemented? I need to make changes to the control config menu and having presets for different controls or better yet presets for specific wheels would be nice.
I'm interested in finishing this if anyone has information on how this was to be implemented. Having automatic configuration when a specific wheel is found would be really nice. There are other racing games that are ready to use with zero configuration after installation. We could do that with Speed Dreams.
I have automatic steering wheel detection and calibration working on windows now. From a clean install you can just click Race -> Quick Race -> Start with a Logitech G29 and start racing. Unfortunately this doesn't work on linux because SDL doesn't use the same numbers for axes and buttons across operating systems. That's why we were getting mouse crashes a few weeks ago on linux.
There are 2 things I need to do before this is ready to commit:
Fix the OS specific button /axes mapping problem. Some games have different controller profile databases for each operating system but I hate to do that. I could do the translation in low level input code and translate everything to be windows compatible. I could put the OS specific translation in the user preferences file. I could compile in the translations. Detecting the OS at compile time or run time has problems if someone tries to run a Windows version of this game on linux using Wine. I have no idea what SDL does on bsd and apple so coming up with the translations will take some time. Lets hope SDL has consistent behavior between different versions of the same operating system but it may not.
I need to add a profile for every common wheel out there before this is ready. I added a profile for my G29 but it is incomplete because I don't have the optional H shifter. Currently an unknown steering wheel will default to the generic joystick profile that was already there and will probably be wrong for everyone. We could jump directly to the control configuration menu when an unknown steering wheel is detected after a fresh install.
Last edit: Robert Reif 2022-03-03
Hi Robert,
For 1, putting the OS specific translation in the user preferences file is probably the most flexible.
I have GhostBSD and Apple, so I can possibly help with testing. The only wheel I have is an ancient Logitech MOMO (only has two pedals).
Aside from the OS differences, some users will also have utility software/drvers for their wheels.
Simon (mungewell) did some work in this area a while ago. There is a joystick test program around that might be useful. (Can't find it right now, might have been on the old forum)
The joystick test program can be jstest-gtk ?
I don't know if can be useful, but there are a tool to configure wheels on Linux called "Oversteer". In this tool you can see the buttons and axis of the wheels. Is developed by a friend, @berarma , that also developed new-lg4ff (He tooks the work of @mungewell to create a most advanced logitech wheels driver)
Last edit: leillo1975 2022-03-04
I started sim racing 4 years ago when I retired. I used linux exclusively at home and vowed never to use windows again unless I was paid to do so. I am very familiar with new-lg4ff and oversteer. After 2 years of playing Speed Dreams I wanted to do online racing so I broke my vow and switched to Windows only for sim racing on rFactor2 and RaceRoom. After that it was hard to go back to Speed Dreams so I gradually switched over to Windows full time and only use linux to test Speed Dreams changes. I am familiar with wine (I was a major wine audio developer 15 years ago) but the games I want to play were not well supported. That may not be true anymore due to steam but it would be a PITA to switch back to linux now.
rFactor 2 and RaceRoom works great on Linux (and Automobilista 2, Assetto Corsa Competizione and the rest of sims except iRacing for his Anticheat). You only have to use Steam for Linux and activate Steam Play (Proton) on preferences. Take a look to my YT channel and you will see how they all work:
https://www.youtube.com/c/leillo1975/videos
@madbad also plays simracing games on Linux like me.
Last edit: leillo1975 2022-03-03
I have watched your channel for years. That's where I found out about Speed Dreams.
I'm at the point where I'm considering graduating from a G29 to something more serious but steering wheel support in linux is not that great. That's why I went with a G29 in the first place.
Yes, the best support in steering wheels in Linux is for Logitech. There are some Thrustmaster and Fanatec models that have experimental drivers also. Take a look:
https://jugandoenlinux.com/index.php/foro/dispositivos-de-control/193-proyectos-de-controladores-para-volantes-steering-wheel-driver-projects#577
Not sure if this is any useful for our use case, but worth taking a look
https://github.com/gabomdq/SDL_GameControllerDB
I looked at this. It's for game controllers. What we need is the same thing but for steering wheels. We would use this if we started supporting game controllers seriously someday.
Hi. I'm the Oversteer and new-lg4ff developer. Leillo took me here. ;)
I can only add some little bits of information. It seems Windows has a better abstraction layer for wheels than Linux has, and SDL uses that. Linux is lacking in that aspect and SDL isn't filling the gaps.
Most modern wheels use these axes on Linux:
This could be a good default. Some older wheels use different axes. As for the buttons and shifters, I don't know of any convention.
If the game needs to know that it's running on Wine to work correctly, that's a bug in Wine. Any game running on Wine it's supposed to work as it would on Windows without changes.
I think most games on Proton (and probably Wine) get the correct mappings. They must be already doing something to get it right. Maybe a look at the source code would bring more information.
That was for Proton/Wine versions up to 6.3. The controller layer implementation has changed in Proton 7.0 and some issues have arised related to detection and mappings.
Sometime we'll have to stop trying to fix these issues on every project and fill the gaps in SDL or wherever it needs to be fixed just once.
That new-lg4ff (out of tree) kernel driver looks awesome! Must find time to check it out... :-)
It's absolutely awesome, but it would not exist without your driver. I recommend that you install it, as it activates many effects in addition to the constant force. The perfect complement is Oversteer, to graphically configure the steering wheel options.
By the way @mungewell, nice to see you here.
Hello Simon!
Long time, hope you're well.
Last edit: beaglejoe 2022-03-04
Hello Simon,
I'm happy to see you back around here :)