Gamepad/Joystick support
Moderator: Forum Moderators
Gamepad/Joystick support
Joystick Control Support
Purpose
Most dedicated gaming devices don't rely on mouse or keyboard input for controlling their games,
but come with internal joypad sticks and extra buttons or external gamepads.
Some of them are able to play Wesnoth by installing Linux on them (Some "Playstation3" models for example).
The Wesnoth project offers binaries for the Linux based "OpenPandora" handheld.
On the other hand might also a PC gamer want to use his gamepad instead of the classic keyboard/mouse handling.
Wesnoth's newly added support for joystick devices aims for controlling the game entirely via the external or gaming device's controller.
Whenever this document talks about "Joystick", you can always assume that the other instances of the device family are meant as well.
This includes steering wheels (for racing games), joysticks, gamepads and some other exotic devices.
Although the development focuses on gamepads, support for other devices is a free side effect and not tested.
Status
The current development version from 1.9.8 on does have basic support for joystick devices.
Supported are up to 4 joysticks (numbers from 0-3) with up to 8 axes (numbers from 0-7).
Lacking support for controlling menus/dialogs, Wesnoth is still not playable without mouse usage.
A very rare equipment on joystick devices is an on-board trackball, I can't support it for now because I don't own or know a device featuring it.
Hints to suitable hardware or donations are always welcomed.
Targeted Devices
Gamepads are the most interesting type of joystick device when it comes to playing Wesnoth.
So I try to optimize the support for them at most and provide a pre configuration aimed at a Model Controller.
Most modern gamepads come with 2 analog sticks (2 x 2 axes), one or more hats and several buttons.
Some of them also feature 2 analog thrusters (one axis each).
Get it Working
Some joysticks (only older ones?) need to get calibrated before usage. Look at your device driver's or operating system's tool in order to do so.
The joystick support is disabled by default.
Menu -> Preferences -> Advanced Preferences -> Joystick Support = Yes
enables it.
If your device and your taste fits to the default settings you are done.
Now define hotkey bindings for the controller's buttons.
Known Issues:
Purpose
Most dedicated gaming devices don't rely on mouse or keyboard input for controlling their games,
but come with internal joypad sticks and extra buttons or external gamepads.
Some of them are able to play Wesnoth by installing Linux on them (Some "Playstation3" models for example).
The Wesnoth project offers binaries for the Linux based "OpenPandora" handheld.
On the other hand might also a PC gamer want to use his gamepad instead of the classic keyboard/mouse handling.
Wesnoth's newly added support for joystick devices aims for controlling the game entirely via the external or gaming device's controller.
Whenever this document talks about "Joystick", you can always assume that the other instances of the device family are meant as well.
This includes steering wheels (for racing games), joysticks, gamepads and some other exotic devices.
Although the development focuses on gamepads, support for other devices is a free side effect and not tested.
Concept
The current development version from 1.9.8 on does have basic support for joystick devices.
Supported are up to 4 joysticks (numbers from 0-3) with up to 8 axes (numbers from 0-7).
Lacking support for controlling menus/dialogs, Wesnoth is still not playable without mouse usage.
A very rare equipment on joystick devices is an on-board trackball, I can't support it for now because I don't own or know a device featuring it.
Hints to suitable hardware or donations are always welcomed.
Targeted Devices
Gamepads are the most interesting type of joystick device when it comes to playing Wesnoth.
So I try to optimize the support for them at most and provide a pre configuration aimed at a Model Controller.
Most modern gamepads come with 2 analog sticks (2 x 2 axes), one or more hats and several buttons.
Some of them also feature 2 analog thrusters (one axis each).
Model Controller
OpenPandora
Some joysticks (only older ones?) need to get calibrated before usage. Look at your device driver's or operating system's tool in order to do so.
The joystick support is disabled by default.
Menu -> Preferences -> Advanced Preferences -> Joystick Support = Yes
enables it.
If your device and your taste fits to the default settings you are done.
Now define hotkey bindings for the controller's buttons.
Configuring and Fine-tuning
- Footsteps are not set when the cursor is moved and one of your own unit is selected.
- The right mouse click emulation does not bring up the context menu. So it currently can only be used to deselect units.
- There is still no support for using the dialogs with the controller.
- On some laptop the accelerometer, which is used to park the hard-drive in case of an accident is implemented as a 3 axes joystick device.
This means you can play Wesnoth by smashing the laptop against a wall. (not recommended)
Further Development
Re: Gamepad/Joystick support
More about locating the preferences file on our primary 3 supported platforms.
edit: manually editing the preferences file is no longer necessary.
edit: manually editing the preferences file is no longer necessary.
Last edited by fabi on June 28th, 2011, 7:14 am, edited 3 times in total.
Reason: I fail at off-topic funny comments, so funny comment about accelerometers and Neverball removed.
Reason: I fail at off-topic funny comments, so funny comment about accelerometers and Neverball removed.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: Gamepad/Joystick support
Scrolling when the cursor reaches the map boarder changed to warp.
Added support for Hats,
updated the first post.
Does someone know a device with a (track)ball on it?
Added support for Hats,
updated the first post.
Does someone know a device with a (track)ball on it?
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Gamepad/Joystick support
I once had a mouse with a (track)ball on it. It was really difficult to use and one time the heavy ball fell on my foot (painful!)fabi wrote:Scrolling when the cursor reaches the map boarder changed to warp.
Added support for Hats,
updated the first post.
Does someone know a device with a (track)ball on it?
Quick question: How can joysticks or gamepads be used in Wesnoth? Mouse and trackpads are better. Also touchscreens on the iPhone or iPad.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Gamepad/Joystick support
Once you get used to them trackballs are quite fine because they don't hurt the shoulder as much as the mouse.
I know that there are joysticks out there with balls because I see that the sdl library supports asking for their values,
and some laptops might also support reading their trackballs from the joystick driver.
Joysticks, especially analog ones might not be the best controller for Wesnoth, of course depending on your taste.
But they are spoken to through the same telephone number, so if I want to support gamepads I get the joystick support for free.
I know that there are joysticks out there with balls because I see that the sdl library supports asking for their values,
and some laptops might also support reading their trackballs from the joystick driver.
Joysticks, especially analog ones might not be the best controller for Wesnoth, of course depending on your taste.
But they are spoken to through the same telephone number, so if I want to support gamepads I get the joystick support for free.
Re: Gamepad/Joystick support
Good question. Probably not as well as a mouse or trackpad, but it may allow people to port BfW to other platforms more easily. The analog sticks can be used for cursor movement, and actually, you don’t need that much cursor control if you assign a button for ‘next unit’ and map other commonly used actions, like having a binding for right-click in order to access recruit and recall.Lord-Knightmare wrote:Quick question: How can joysticks or gamepads be used in Wesnoth? Mouse and trackpads are better. Also touchscreens on the iPhone or iPad.
Wesnoth Bestiary ( PREVIEW IT HERE )
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Re: Gamepad/Joystick support
I used to play "Battle Ilse", the first of the series on my Amiga with a digital joystick.ancestral wrote:Good question. Probably not as well as a mouse or trackpad, but it may allow people to port BfW to other platforms more easily. The analog sticks can be used for cursor movement, and actually, you don’t need that much cursor control if you assign a button for ‘next unit’ and map other commonly used actions, like having a binding for right-click in order to access recruit and recall.Lord-Knightmare wrote:Quick question: How can joysticks or gamepads be used in Wesnoth? Mouse and trackpads are better. Also touchscreens on the iPhone or iPad.
Battle Ilse is also a hex field based strategy game, the joystick interface worked quite well there.
"Battle Ilse II" was an IBM-PC/MS-DOS game.
It had mouse support but I was faster playing it with the keyboard, also hex field based strategy.
Re: Gamepad/Joystick support
Added "Advanced Preferences" options.
Implemented a third "Mouse Pointer Control" use case.
Implemented a use case for one of the thrusters.
Enabled support for hotkey bound joystick buttons in the menus.
Joystick support is now disabled at default.
The first post has been updated accordingly.
Implemented a third "Mouse Pointer Control" use case.
Implemented a use case for one of the thrusters.
Enabled support for hotkey bound joystick buttons in the menus.
Joystick support is now disabled at default.
The first post has been updated accordingly.
Re: Gamepad/Joystick support
Is Joystick still supported? I can't find option for enabling it in Advanced Preferences.
Re: Gamepad/Joystick support
Yes it is.KDolecek wrote:Is Joystick still supported? I can't find option for enabling it in Advanced Preferences.
The feature was just not stable enough and it cluttered the advanced preferences too much.
You can still edit the preferences file with a text editor to enable it.
Re: Gamepad/Joystick support
I have a Logitech Rumble Gamepad F510, which works without problems with other games. I am using Ubuntu 14.04 and BfW 1.11.15 (also tried 1.11.16). I modified the file data/advanced_preferences.cfg, and I can see the joystick options on the Menu Preferences->Advanced, (joystick support = yes). However, the gamepad does not seem to work at all. I cannot even assign any hotkeys or move any cursor. What can I do?
Re: Gamepad/Joystick support
Hello, please give me a few days to check the joystick support,hannayeah wrote:I have a Logitech Rumble Gamepad F510, which works without problems with other games. I am using Ubuntu 14.04 and BfW 1.11.15 (also tried 1.11.16). I modified the file data/advanced_preferences.cfg, and I can see the joystick options on the Menu Preferences->Advanced, (joystick support = yes). However, the gamepad does not seem to work at all. I cannot even assign any hotkeys or move any cursor. What can I do?
I will come back to this thread then.
Re: Gamepad/Joystick support
The topic post makes mention of the dinput/xinput switch on the F510, and says "Windows mode" (DirectInput) doesn't work at all in Linux. This suggests to me by omission that it is supposed to work in Windows? I don't see anything to specify dinput vs xinput in the advanced configuration file, and my dinput-only Logitech Cordless RumblePad 2 is not detected. I grew up on Master of Monsters and Langrisser and hope to recreate some of that magic with a gamepad. I'd especially like to use a Saturn pad, and while I could manage with Xpadder, I'd love to see improved native support.
With the emergence of HTPCs and dedicated multi-media-focused PCs making use of Steam Big Picture and other similar gamepad-loving front-ends, it seems proper gamepad support, including in-GUI configuration, is becoming a more pressing need by the day.
Edit: It's actually not working at all with an X360 controller either. So gamepads are not working in Linux or Windows (7 x64 in my case) at the moment, for either xinput or dinput. :/
With the emergence of HTPCs and dedicated multi-media-focused PCs making use of Steam Big Picture and other similar gamepad-loving front-ends, it seems proper gamepad support, including in-GUI configuration, is becoming a more pressing need by the day.
Edit: It's actually not working at all with an X360 controller either. So gamepads are not working in Linux or Windows (7 x64 in my case) at the moment, for either xinput or dinput. :/